1# $Id: Makefile,v 1.1.1.1 2008/10/15 03:30:51 james26_jang Exp $ 2VERSION=1.6.0 3RELEASE= 4 5################################################################# 6# CHANGE THIS LINE to point to the location of your pppd binary. 7PPPD = /usr/sbin/pppd 8################################################################# 9 10BINDIR=$(DESTDIR)/usr/sbin 11MANDIR=$(DESTDIR)/usr/share/man/man8 12PPPDIR=$(DESTDIR)/etc/ppp 13 14#CC = gcc 15RM = rm -f 16OPTIMIZE= -O2 17#DEBUG = -g 18INCLUDE = 19CFLAGS = -Wall $(OPTIMIZE) $(DEBUG) $(INCLUDE) 20#LIBS = -lutil 21LDFLAGS = 22 23PPTP_BIN = pptp 24 25PPTP_OBJS = pptp.o pptp_gre.o ppp_fcs.o \ 26 pptp_ctrl.o dirutil.o vector.o \ 27 inststr.o util.o version.o \ 28 pptp_quirks.o orckit_quirks.o pqueue.o pptp_callmgr.o 29 30PPTP_DEPS = pptp_callmgr.h pptp_gre.h ppp_fcs.h util.h \ 31 pptp_quirks.h orckit_quirks.h config.h pqueue.h 32 33all: config.h $(PPTP_BIN) 34 35$(PPTP_BIN): $(PPTP_OBJS) $(PPTP_DEPS) 36 $(CC) -o $(PPTP_BIN) $(PPTP_OBJS) $(LDFLAGS) $(LIBS) 37 38config.h: 39 echo "/* text added by Makefile target config.h */" > config.h 40 echo "#define PPTP_LINUX_VERSION \"$(VERSION)$(RELEASE)\"" >> config.h 41 echo "#define PPPD_BINARY \"$(PPPD)\"" >> config.h 42 43vector_test: vector_test.o vector.o 44 $(CC) -o vector_test vector_test.o vector.o 45 46clobber clean: 47 $(RM) *.o config.h $(PPTP_BIN) vector_test 48 49distclean: clobber 50 51test: vector_test 52 53install: 54 mkdir -p $(BINDIR) 55 install -o root -m 555 pptp $(BINDIR) 56 mkdir -p $(MANDIR) 57 install -m 644 pptp.8 $(MANDIR) 58 mkdir -p $(PPPDIR) 59 install -m 644 options.pptp $(PPPDIR) 60 61uninstall: 62 $(RM) $(BINDIR)/pptp $(MANDIR)/pptp.8 63 64dist: clobber 65 $(RM) pptp-$(VERSION)$(RELEASE).tar.gz 66 $(RM) -r pptp-$(VERSION) 67 mkdir pptp-$(VERSION) 68 cp --recursive ChangeLog Makefile *.c *.h options.pptp pptp.8 \ 69 Documentation Reference AUTHORS COPYING INSTALL NEWS \ 70 README DEVELOPERS TODO USING \ 71 pptp-$(VERSION)/ 72 $(RM) -r pptp-$(VERSION)/CVS pptp-$(VERSION)/*/CVS 73 tar czf pptp-$(VERSION)$(RELEASE).tar.gz pptp-$(VERSION) 74 $(RM) -r pptp-$(VERSION) 75 md5sum pptp-$(VERSION)$(RELEASE).tar.gz 76 77deb: 78 chmod +x debian/rules 79 fakeroot dpkg-buildpackage -us -uc 80 mv ../pptp_$(VERSION)-0_i386.deb . 81 82WEB=~/public_html/external/mine/pptp/pptpconfig 83release: 84 cp pptp_$(VERSION)-0_i386.deb $(WEB) 85 cd $(WEB);make 86