1# 2# Layer Two Tunneling Protocol Daemon 3# Copyright (C)1998 Adtran, Inc. 4# 5# Mark Spencer <markster@marko.net> 6# 7# This is free software. You may distribute it under 8# the terms of the GNU General Public License, 9# version 2, or at your option any later version. 10# 11# Note on debugging flags: 12# -DDEBUG_ZLB shows all ZLB exchange traffic 13# -DDEBUG_CONTROL debugs the /var/run/l2tp-control pipe interface 14# -DDEBUG_HELLO debugs when hello messages are sent 15# -DDEBUG_CLOSE debugs call and tunnel closing 16# -DDEBUG_FLOW debugs flow control system 17# -DDEBUG_FILE debugs file format 18# -DDEBUG_AAA debugs authentication, accounting, and access control 19# -DDEBUG_PAYLOAD shows info on every payload packet 20# -DDEBUG_CONTROL shows info on every control packet 21# -DDEBUG_PPPD shows the command line of pppd 22# -DDEBUG_HIDDEN debugs hidden AVP's 23# -DDEBUG_ENTROPY debug entropy generation 24# -DTEST_HIDDEN makes Assigned Call ID sent as a hidden AVP 25# 26# Also look at the top of network.c for some other (eventually to 27# become runtime options) debugging flags 28# 29include ../config.in 30include ../config.mk 31 32#CC= /opt/brcm/hndtools-mipsel-uclibc-3.2.3/bin/mipsel-uclibc-gcc 33#DFLAGS= -g -O2 -DDEBUG_PPPD 34DFLAGS= -g -O2 -DDEBUG_PPPD -DDEBUG_CONTROL -DDEBUG_ENTROPY -DDEBUG_CLOSE -DPPPOX_L2TP 35# 36# Uncomment the next line for Linux 37# 38#OSFLAGS= -DLINUX -I/usr/include 39OSFLAGS= -DLINUX -I/opt/brcm/hndtools-mipsel-uclibc-3.2.3/include/ 40 41OSFLAGS+= -I$(LINUXDIR)/include/ 42 43# 44# Uncomment the following to use the kernel interface under Linux 45# 46#OSFLAGS+= -DUSE_KERNEL 47# 48# Uncomment the next line for FreeBSD 49# 50#OSFLAGS= -DFREEBSD 51# 52# Uncomment the next line for Solaris. For solaris, at least, 53# we don't want to specify -I/usr/include because it is in 54# the basic search path, and will over-ride some gcc-specific 55# include paths and cause problems. 56# 57#OSFLAGS= -DSOLARIS 58#OSLIBS= -lnsl -lsocket 59# 60# Feature flags 61# 62# Comment the following line to disable l2tpd maintaining IP address 63# pools to pass to pppd to control IP address allocation 64 65FFLAGS= -DIP_ALLOCATION 66 67CFLAGS= $(DFLAGS) -Wall -DSANITY $(OSFLAGS) $(FFLAGS) 68 69#add static_pppoe define. 70ifeq ($(CONFIG_STATIC_PPPOE),y) 71CFLAGS += -DSTATIC_PPPOE 72else 73CFLAGS += -USTATIC_PPPOE 74endif 75 76HDRS=l2tp.h avp.h misc.h control.h call.h scheduler.h file.h aaa.h md5.h 77OBJS=l2tpd.o pty.o misc.o control.o avp.o call.o network.o avpsend.o scheduler.o file.o aaa.o md5.o 78LIBS= $(OSLIB) # -lefence # efence for malloc checking 79BIN=l2tpd 80BINDIR=$(TARGETDIR)/usr/sbin 81ETCDIR=$(TARGETDIR)/etc 82 83all: $(BIN) 84 85clean: 86 rm -f $(OBJS) $(BIN) 87 88$(BIN): $(OBJS) $(HDRS) 89 $(CC) -o $(BIN) $(DFLAGS) $(OBJS) $(LIBS) 90 91install: 92 mkdir -p $(BINDIR) 93 install -m 755 l2tpd $(BINDIR) 94 $(STRIP) $(BINDIR)/l2tpd 95 rm -f $(BINDIR)/st* 96