1#PPPD := $(shell /usr/sbin/pppd --version 2>&1 | grep version) 2#PPPD := $(patsubst pppd,,$(PPPD)) 3#PPPD := $(patsubst version,,$(PPPD)) 4#PPPD := $(strip $(PPPD)) 5 6default: module plugin pptpd 7client: module plugin 8server: pptpd 9 10module: 11 echo Building kernel module 12 (cd kernel/driver; make KDIR=$(LINUXDIR)) 13 14plugin: pppd_plugin/Makefile 15 echo Building pppd plugin 16 (cd pppd_plugin; make) 17 18pptpd: pptpd-1.3.3/Makefile 19 echo Building pptpd 20 (cd pptpd-1.3.3; make) 21 22pppd_plugin/Makefile: pptpd-1.3.3/Makefile 23 (cd pppd_plugin; $(CONFIGURE) --prefix=/usr PPPDIR=$(TOP)/pppd) 24pptpd-1.3.3/Makefile: 25 (cd pptpd-1.3.3; $(CONFIGURE) --prefix=$(INSTALLDIR)/pptpd --enable-bcrelay) 26 27module_install: module 28 (cd kernel/driver; make install TDIR=$(TARGETDIR)) 29 30plugin_install: plugin 31 install -D pppd_plugin/src/.libs/pptp.so.0.0.0 $(INSTALLDIR)/accel-pptpd/usr/lib/pppd/pptp.so 32 $(STRIP) $(INSTALLDIR)/accel-pptpd/usr/lib/pppd/pptp.so 33 34client_install: plugin_install 35 36server_install: server 37 install -D pptpd-1.3.3/pptpd $(INSTALLDIR)/accel-pptpd/usr/sbin/pptpd 38 install -D pptpd-1.3.3/bcrelay $(INSTALLDIR)/accel-pptpd/usr/sbin/bcrelay 39 install -D pptpd-1.3.3/pptpctrl $(INSTALLDIR)/accel-pptpd/usr/sbin/pptpctrl 40 $(STRIP) $(INSTALLDIR)/accel-pptpd/usr/sbin/pptpd 41 $(STRIP) $(INSTALLDIR)/accel-pptpd/usr/sbin/bcrelay 42 $(STRIP) $(INSTALLDIR)/accel-pptpd/usr/sbin/pptpctrl 43 44clean: 45 -(cd kernel/driver; make clean) 46 -(cd pppd_plugin; make clean) 47 -(cd pptpd-1.3.3; make clean) 48 49distclean: 50 -(cd kernel/driver; make clean) 51 -(cd pppd_plugin; make distclean) 52 -(cd pptpd-1.3.3; make distclean) 53