1
0

patch-pppd_plugins_Makefile_linux 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --- ppp-2.4.5.orig/pppd/plugins/Makefile.linux 2009-11-16 23:26:07.000000000 +0100
  2. +++ ppp-2.4.5/pppd/plugins/Makefile.linux 2011-01-21 21:29:58.118658260 +0100
  3. @@ -1,13 +1,13 @@
  4. -#CC = gcc
  5. -COPTS = -O2 -g
  6. -CFLAGS = $(COPTS) -I.. -I../../include -fPIC
  7. -LDFLAGS = -shared
  8. -INSTALL = install
  9. +#
  10. +# makefile for pppd/plugins
  11. +#
  12. +VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h)
  13. -DESTDIR = $(INSTROOT)@DESTDIR@
  14. -BINDIR = $(DESTDIR)/sbin
  15. -MANDIR = $(DESTDIR)/share/man/man8
  16. -LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
  17. +include ../../Makedefs.com
  18. +
  19. +CPPFLAGS += -I.. -I../../include
  20. +CFLAGS += -fPIC
  21. +LDFLAGS += -shared
  22. SUBDIRS := rp-pppoe pppoatm pppol2tp
  23. # Uncomment the next line to include the radius authentication plugin
  24. @@ -23,12 +23,10 @@ all: $(PLUGINS)
  25. for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done
  26. %.so: %.c
  27. - $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
  28. -
  29. -VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h)
  30. + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^
  31. install: $(PLUGINS)
  32. - $(INSTALL) -d $(LIBDIR)
  33. + $(INSTALL) -d -m 755 $(LIBDIR)
  34. $(INSTALL) $? $(LIBDIR)
  35. for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d install; done
  36. @@ -37,5 +35,4 @@ clean:
  37. for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d clean; done
  38. depend:
  39. - $(CPP) -M $(CFLAGS) *.c >.depend
  40. - for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d depend; done
  41. + $(CPP) -M $(CPPFLAGS) *.c >.depend