patch-Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- l2tpns-2.1.21.orig/Makefile 2005-12-07 06:21:37.000000000 +0100
  3. +++ l2tpns-2.1.21/Makefile 2009-06-13 09:54:41.000000000 +0200
  4. @@ -10,18 +10,11 @@ DEFINES =
  5. DEFINES += -DLIBDIR='"$(libdir)"'
  6. DEFINES += -DETCDIR='"$(etcdir)"'
  7. -OPTIM =
  8. -OPTIM += -g
  9. -OPTIM += -O3
  10. -
  11. -CC = gcc
  12. -LD = gcc
  13. INCLUDES = -I.
  14. CPPFLAGS = $(INCLUDES) $(DEFINES)
  15. -CFLAGS = -Wall -Wformat-security -Wno-format-zero-length $(OPTIM)
  16. -LDFLAGS =
  17. +CFLAGS ?= -Wall -Wformat-security -Wno-format-zero-length
  18. LDLIBS =
  19. -INSTALL = install -c -D -o root -g root
  20. +INSTALL = install
  21. l2tpns.LIBS = -lm -lcli -ldl
  22. @@ -58,10 +51,10 @@ depend:
  23. mv Makefile.tmp Makefile
  24. l2tpns: $(OBJS)
  25. - $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS) $($@.LIBS)
  26. + $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) $($@.LIBS)
  27. nsctl: nsctl.o control.o
  28. - $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS) $($@.LIBS)
  29. + $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) $($@.LIBS)
  30. %.o: %.c
  31. $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
  32. @@ -70,6 +63,11 @@ nsctl: nsctl.o control.o
  33. $(CC) -fPIC -shared $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $<
  34. install: all
  35. + $(INSTALL) -m 0755 -d $(DESTDIR)$(libdir)
  36. + $(INSTALL) -m 0755 -d $(DESTDIR)$(bindir)
  37. + $(INSTALL) -m 0755 -d $(DESTDIR)$(etcdir)
  38. + $(INSTALL) -m 0755 -d $(DESTDIR)$(man5dir)
  39. + $(INSTALL) -m 0755 -d $(DESTDIR)$(man8dir)
  40. $(INSTALL) -m 0755 l2tpns $(DESTDIR)$(bindir)/l2tpns
  41. $(INSTALL) -m 0755 nsctl $(DESTDIR)$(bindir)/nsctl