1# $Id: Makefile,v 1.38 2005/03/10 01:18:20 quozl Exp $ 2 3include ../config.in 4include ../config.mk 5 6VERSION=1.7.0 7RELEASE= 8 9################################################################# 10# CHANGE THIS LINE to point to the location of your pppd binary. 11PPPD = /usr/sbin/pppd 12################################################################# 13 14BINDIR=$(TARGETDIR)/usr/sbin 15MANDIR=$(TARGETDIR)/usr/share/man/man8 16PPPDIR=$(TARGETDIR)/etc/ppp 17 18RM = rm -f 19OPTIMIZE= -O0 20DEBUG = -g 21INCLUDE = 22## Add undefine CODE_IN_USE compile flag on 05/12/2006, -Uxxx: Undefined, -Dxxx: Defined 23#COMPILE_FLAGS = -UCODE_IN_USE 24#CFLAGS = -Wall $(OPTIMIZE) $(DEBUG) $(INCLUDE) $(COMPILE_FLAGS) 25CFLAGS = -Wall $(OPTIMIZE) $(DEBUG) $(INCLUDE) 26LIBS = -lutil 27LDFLAGS = 28 29ifeq ($(CONFIG_STATIC_PPPOE),y) 30CFLAGS += -DSTATIC_PPPOE 31else 32CFLAGS += -USTATIC_PPPOE 33endif 34 35PPTP_BIN = pptp 36 37PPTP_OBJS = pptp.o pptp_gre.o ppp_fcs.o \ 38 pptp_ctrl.o dirutil.o vector.o \ 39 inststr.o util.o version.o \ 40 pptp_quirks.o orckit_quirks.o pqueue.o pptp_callmgr.o 41 42PPTP_DEPS = pptp_callmgr.h pptp_gre.h ppp_fcs.h util.h \ 43 pptp_quirks.h orckit_quirks.h config.h pqueue.h 44 45all: config.h $(PPTP_BIN) 46 47$(PPTP_BIN): $(PPTP_OBJS) $(PPTP_DEPS) 48 $(CC) -o $(PPTP_BIN) $(PPTP_OBJS) $(LDFLAGS) $(LIBS) 49 50config.h: 51 echo "/* text added by Makefile target config.h */" > config.h 52 echo "#define PPTP_LINUX_VERSION \"$(VERSION)$(RELEASE)\"" >> config.h 53 echo "#define PPPD_BINARY \"$(PPPD)\"" >> config.h 54 55vector_test: vector_test.o vector.o 56 $(CC) -o vector_test vector_test.o vector.o 57 58clean: 59 $(RM) *.o config.h 60 61clobber: clean 62 $(RM) $(PPTP_BIN) vector_test 63 64distclean: clobber 65 66test: vector_test 67 68install: 69 mkdir -p $(BINDIR) 70 install -m 755 pptp $(BINDIR) 71# mkdir -p $(MANDIR) 72# install -m 644 pptp.8 $(MANDIR) 73 mkdir -p $(PPPDIR) 74# install -m 644 options.pptp $(PPPDIR) 75 $(STRIP) $(BINDIR)/pptp 76 rm -f $(BINDIR)/st* 77 78uninstall: 79 $(RM) $(BINDIR)/pptp $(MANDIR)/pptp.8 80 81dist: clobber 82 $(RM) pptp-$(VERSION)$(RELEASE).tar.gz 83 $(RM) -r pptp-$(VERSION) 84 mkdir pptp-$(VERSION) 85 cp --recursive ChangeLog Makefile *.c *.h options.pptp pptp.8 \ 86 Documentation Reference AUTHORS COPYING INSTALL NEWS \ 87 README DEVELOPERS TODO USING \ 88 pptp-$(VERSION)/ 89 $(RM) -r pptp-$(VERSION)/CVS pptp-$(VERSION)/*/CVS 90 tar czf pptp-$(VERSION)$(RELEASE).tar.gz pptp-$(VERSION) 91 $(RM) -r pptp-$(VERSION) 92 md5sum pptp-$(VERSION)$(RELEASE).tar.gz 93 94deb: 95 chmod +x debian/rules 96 fakeroot dpkg-buildpackage -us -uc 97 mv ../pptp_$(VERSION)-0_i386.deb . 98 99WEB=~/public_html/external/mine/pptp/pptpconfig 100release: 101 cp pptp_$(VERSION)-0_i386.deb $(WEB) 102 cd $(WEB);make 103