CC = gcc
-CFLAGS = -g -O2 -I.. -I../../include -D_linux_=1 -fPIC
+COPTS = -O2 -g
+CFLAGS = $(COPTS) -I.. -I../../include -fPIC
LDFLAGS = -shared
-INSTALL = install -o root
+INSTALL = install
-SUBDIRS = rp-pppoe radius
-PLUGINS = minconn.so passprompt.so passwordfd.so
+DESTDIR = $(INSTROOT)@DESTDIR@
+BINDIR = $(DESTDIR)/sbin
+MANDIR = $(DESTDIR)/share/man/man8
+LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
+
+SUBDIRS := rp-pppoe pppoatm
+# Uncomment the next line to include the radius authentication plugin
+SUBDIRS += radius
+PLUGINS := minconn.so passprompt.so passwordfd.so winbind.so
# include dependencies if present
ifeq (.depend,$(wildcard .depend))
$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h)
-LIBDIR = $(DESTDIR)/usr/lib/pppd/$(VERSION)
install: $(PLUGINS)
$(INSTALL) -d $(LIBDIR)
$(INSTALL) $? $(LIBDIR)
- for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d INSTALL=$(INSTALL) \
- LIBDIR=$(LIBDIR) install; done
+ for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d install; done
clean:
rm -f *.o *.so *.a