1# $Id: Makefile,v 1.38 2005/03/10 01:18:20 quozl Exp $ 2 3include ../config.mk 4include ../config.in 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) 26ifeq ($(PROFILE),R7000) 27#LIBS = -lutil 28else 29LIBS = -lutil 30endif 31 32LDFLAGS = 33 34ifeq ($(CONFIG_STATIC_PPPOE),y) 35CFLAGS += -DSTATIC_PPPOE 36else 37CFLAGS += -USTATIC_PPPOE 38endif 39 40PPTP_BIN = pptp 41 42PPTP_OBJS = pptp.o pptp_gre.o ppp_fcs.o \ 43 pptp_ctrl.o dirutil.o vector.o \ 44 inststr.o util.o version.o \ 45 pptp_quirks.o orckit_quirks.o pqueue.o pptp_callmgr.o 46 47PPTP_DEPS = pptp_callmgr.h pptp_gre.h ppp_fcs.h util.h \ 48 pptp_quirks.h orckit_quirks.h config.h pqueue.h 49 50all: config.h $(PPTP_BIN) 51 52$(PPTP_BIN): $(PPTP_OBJS) $(PPTP_DEPS) 53 $(CC) -o $(PPTP_BIN) $(PPTP_OBJS) $(LDFLAGS) $(LIBS) 54 55config.h: 56 echo "/* text added by Makefile target config.h */" > config.h 57 echo "#define PPTP_LINUX_VERSION \"$(VERSION)$(RELEASE)\"" >> config.h 58 echo "#define PPPD_BINARY \"$(PPPD)\"" >> config.h 59 60vector_test: vector_test.o vector.o 61 $(CC) -o vector_test vector_test.o vector.o 62 63clean: 64 $(RM) *.o config.h 65 66clobber: clean 67 $(RM) $(PPTP_BIN) vector_test 68 69distclean: clobber 70 71test: vector_test 72 73install: 74 mkdir -p $(BINDIR) 75 install -m 755 pptp $(BINDIR) 76# mkdir -p $(MANDIR) 77# install -m 644 pptp.8 $(MANDIR) 78 mkdir -p $(PPPDIR) 79# install -m 644 options.pptp $(PPPDIR) 80 $(STRIP) $(BINDIR)/pptp 81 rm -f $(BINDIR)/st* 82 83uninstall: 84 $(RM) $(BINDIR)/pptp $(MANDIR)/pptp.8 85 86dist: clobber 87 $(RM) pptp-$(VERSION)$(RELEASE).tar.gz 88 $(RM) -r pptp-$(VERSION) 89 mkdir pptp-$(VERSION) 90 cp --recursive ChangeLog Makefile *.c *.h options.pptp pptp.8 \ 91 Documentation Reference AUTHORS COPYING INSTALL NEWS \ 92 README DEVELOPERS TODO USING \ 93 pptp-$(VERSION)/ 94 $(RM) -r pptp-$(VERSION)/CVS pptp-$(VERSION)/*/CVS 95 tar czf pptp-$(VERSION)$(RELEASE).tar.gz pptp-$(VERSION) 96 $(RM) -r pptp-$(VERSION) 97 md5sum pptp-$(VERSION)$(RELEASE).tar.gz 98 99deb: 100 chmod +x debian/rules 101 fakeroot dpkg-buildpackage -us -uc 102 mv ../pptp_$(VERSION)-0_i386.deb . 103 104WEB=~/public_html/external/mine/pptp/pptpconfig 105release: 106 cp pptp_$(VERSION)-0_i386.deb $(WEB) 107 cd $(WEB);make 108