patch-pppd_plugins_radius_Makefile_linux 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. --- ppp-2.4.5.orig/pppd/plugins/radius/Makefile.linux 2009-11-16 23:26:07.000000000 +0100
  2. +++ ppp-2.4.5/pppd/plugins/radius/Makefile.linux 2011-01-21 21:29:58.278658282 +0100
  3. @@ -1,18 +1,20 @@
  4. # Makefile for RADIUS plugin
  5. -#
  6. # Copyright 2002 Roaring Penguin Software Inc.
  7. #
  8. -DESTDIR = $(INSTROOT)@DESTDIR@
  9. -MANDIR = $(DESTDIR)/share/man/man8
  10. -LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
  11. -
  12. VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
  13. -INSTALL = install
  14. +include ../../../Makedefs.com
  15. -PLUGIN=radius.so radattr.so radrealms.so
  16. -CFLAGS=-I. -I../.. -I../../../include -O2 -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
  17. +CPPFLAGS += -I. -I../.. -I../../../include -DRC_LOG_FACILITY=LOG_DAEMON
  18. +ifeq (,$(filter -fPIC,$(CFLAGS)))
  19. +CFLAGS += -fPIC
  20. +endif
  21. +ifeq (,$(filter -shared,$(LDFLAGS)))
  22. +LDFLAGS += -shared
  23. +endif
  24. +
  25. +PLUGINS = radius.so radattr.so radrealms.so
  26. # Uncomment the next line to include support for Microsoft's
  27. # MS-CHAP authentication protocol.
  28. @@ -23,43 +25,40 @@ MPPE=y
  29. MAXOCTETS=y
  30. ifdef CHAPMS
  31. -CFLAGS += -DCHAPMS=1
  32. +CPPFLAGS += -DCHAPMS=1
  33. ifdef MPPE
  34. -CFLAGS += -DMPPE=1
  35. +CPPFLAGS += -DMPPE=1
  36. endif
  37. endif
  38. ifdef MAXOCTETS
  39. -CFLAGS += -DMAXOCTETS=1
  40. +CPPFLAGS += -DMAXOCTETS=1
  41. endif
  42. -all: $(PLUGIN)
  43. +CLIENTOBJS = avpair.o buildreq.o config.o dict.o ip_util.o \
  44. + clientid.o sendserver.o lock.o util.o md5.o
  45. -install: all
  46. - $(INSTALL) -d -m 755 $(LIBDIR)
  47. - $(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
  48. - $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
  49. - $(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR)
  50. - $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
  51. - $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
  52. +all: $(PLUGINS)
  53. radius.so: radius.o libradiusclient.a
  54. - $(CC) -o radius.so -shared radius.o libradiusclient.a
  55. + $(CC) $(LDFLAGS) -o $@ $^
  56. radattr.so: radattr.o
  57. - $(CC) -o radattr.so -shared radattr.o
  58. + $(CC) $(LDFLAGS) -o $@ $^
  59. radrealms.so: radrealms.o
  60. - $(CC) -o radrealms.so -shared radrealms.o
  61. + $(CC) $(LDFLAGS) -o $@ $^
  62. -CLIENTOBJS = avpair.o buildreq.o config.o dict.o ip_util.o \
  63. - clientid.o sendserver.o lock.o util.o md5.o
  64. libradiusclient.a: $(CLIENTOBJS)
  65. - $(AR) rv $@ $?
  66. + $(AR) $(ARFLAGS) $@ $?
  67. -clean:
  68. - rm -f *.o *.so *.a
  69. +install: $(PLUGINS)
  70. + $(INSTALL) -d -m 755 $(LIBDIR)
  71. + $(INSTALL) -d -m 755 $(MANDIR)
  72. + $(INSTALL) $(STRIP) -c -m 755 radius.so $(LIBDIR)
  73. + $(INSTALL) $(STRIP) -c -m 755 radattr.so $(LIBDIR)
  74. + $(INSTALL) $(STRIP) -c -m 755 radrealms.so $(LIBDIR)
  75. + $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
  76. + $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
  77. -distclean:
  78. +clean:
  79. rm -f *.o *.so *.a
  80. -
  81. -dist-clean: distclean