patch-Makefile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 2011-02-26 23:05:41.000000000 +0100
  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
  42. @@ -77,7 +75,7 @@ install: all
  43. $(INSTALL) -m 0644 Docs/l2tpns.8 $(DESTDIR)$(man8dir)/l2tpns.8
  44. $(INSTALL) -m 0644 Docs/nsctl.8 $(DESTDIR)$(man8dir)/nsctl.8
  45. - gzip --best --force $(DESTDIR)$(man5dir)/*.5 $(DESTDIR)$(man8dir)/*.8
  46. + gzip $(DESTDIR)$(man5dir)/*.5 $(DESTDIR)$(man8dir)/*.8
  47. @for config in startup-config users ip_pool; \
  48. do \