patch-pppd_plugins_rp-pppoe_Makefile_linux 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. --- ppp-2.4.5.orig/pppd/plugins/rp-pppoe/Makefile.linux 2009-11-16 23:26:07.000000000 +0100
  2. +++ ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux 2011-01-21 21:29:58.318658312 +0100
  3. @@ -1,6 +1,4 @@
  4. -# Generated automatically from Makefile.in by configure.
  5. #***********************************************************************
  6. -#
  7. # Makefile
  8. #
  9. # Makefile for Roaring Penguin's Linux PPPoE plugin.
  10. @@ -14,51 +12,35 @@
  11. # $Id: Makefile.linux,v 1.8 2008/06/09 08:34:23 paulus Exp $
  12. #***********************************************************************
  13. -DESTDIR = $(INSTROOT)@DESTDIR@
  14. -BINDIR = $(DESTDIR)/sbin
  15. -LIBDIR = $(DESTDIR)/lib/pppd/$(PPPDVERSION)
  16. -
  17. -PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
  18. +VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
  19. -INSTALL = install
  20. +include ../../../Makedefs.com
  21. # Version is set ONLY IN THE MAKEFILE! Don't delete this!
  22. RP_VERSION=3.8p
  23. -COPTS=-O2 -g
  24. -CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"'
  25. +CPPFLAGS += -I../../../include -I../../..
  26. +CPPFLAGS += '-DRP_VERSION="$(RP_VERSION)"'
  27. +ifeq (,$(filter -fPIC,$(CFLAGS)))
  28. +CFLAGS += -fPIC
  29. +endif
  30. +ifeq (,$(filter -shared,$(LDFLAGS)))
  31. +LDFLAGS += -shared
  32. +endif
  33. +
  34. all: rp-pppoe.so pppoe-discovery
  35. pppoe-discovery: pppoe-discovery.o debug.o
  36. - $(CC) -o pppoe-discovery pppoe-discovery.o debug.o
  37. -
  38. -pppoe-discovery.o: pppoe-discovery.c
  39. - $(CC) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c
  40. -
  41. -debug.o: debug.c
  42. - $(CC) $(CFLAGS) -c -o debug.o debug.c
  43. + $(CC) $(LDFLAGS) -o $@ $^
  44. rp-pppoe.so: plugin.o discovery.o if.o common.o
  45. - $(CC) -o rp-pppoe.so -shared plugin.o discovery.o if.o common.o
  46. + $(CC) $(LDFLAGS) -o $@ $^
  47. install: all
  48. $(INSTALL) -d -m 755 $(LIBDIR)
  49. - $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
  50. + $(INSTALL) $(STRIP) -c -m 4550 rp-pppoe.so $(LIBDIR)
  51. $(INSTALL) -d -m 755 $(BINDIR)
  52. - $(INSTALL) -s -c -m 555 pppoe-discovery $(BINDIR)
  53. + $(INSTALL) $(STRIP) -c -m 555 pppoe-discovery $(BINDIR)
  54. clean:
  55. rm -f *.o *.so pppoe-discovery
  56. -
  57. -plugin.o: plugin.c
  58. - $(CC) $(CFLAGS) -I../../.. -c -o plugin.o -fPIC plugin.c
  59. -
  60. -discovery.o: discovery.c
  61. - $(CC) $(CFLAGS) -I../../.. -c -o discovery.o -fPIC discovery.c
  62. -
  63. -if.o: if.c
  64. - $(CC) $(CFLAGS) -I../../.. -c -o if.o -fPIC if.c
  65. -
  66. -common.o: common.c
  67. - $(CC) $(CFLAGS) -I../../.. -c -o common.o -fPIC common.c
  68. -