-PREFIX=
-bindir = $(PREFIX)/usr/sbin
-etcdir = $(PREFIX)/etc/l2tpns
-libdir = $(PREFIX)/usr/lib/l2tpns
+DESTDIR =
+bindir = $(DESTDIR)/usr/sbin
+etcdir = $(DESTDIR)/etc/l2tpns
+libdir = $(DESTDIR)/usr/lib/l2tpns
CC = gcc
-DEFINES= -DBGP -DRINGBUFFER -DSTAT_CALLS -DSTATISTICS
-OPTIM=-g -O3 -funroll-loops -fomit-frame-pointer -finline-functions
-CFLAGS=-Wall $(OPTIM) $(DEFINES)
+DEFINES = -DBGP -DRINGBUFFER -DSTAT_CALLS -DSTATISTICS
+OPTIM = -g -O3 -funroll-loops -fomit-frame-pointer -finline-functions
+CFLAGS = -Wall $(OPTIM) $(DEFINES)
LDFLAGS =
LIBS = -lm -ldl -lcli
INSTALL = /usr/bin/install -c
install: all
$(INSTALL) -D -o root -g root -m 0755 l2tpns $(bindir)/l2tpns
$(INSTALL) -D -o root -g root -m 0755 nsctl $(bindir)/nsctl
- $(INSTALL) -D -o root -g root -m 0600 etc/l2tpns.cfg.default $(etcdir)/l2tpns.cfg
+ $(INSTALL) -D -o root -g root -m 0600 etc/startup-config.default $(etcdir)/startup-config
$(INSTALL) -D -o root -g root -m 0644 etc/ip_pool.default $(etcdir)/l2tpns.ip_pool
$(INSTALL) -D -o root -g root -m 0600 etc/users.default $(etcdir)/l2tpns.users
- for PLUGIN in $(PLUGINS); do \
- $(INSTALL) -D -o root -g root -m 0755 $(PLUGIN) $(libdir)/$(PLUGIN); \
+ for plugin in $(PLUGINS); do \
+ $(INSTALL) -D -o root -g root -m 0755 $$plugin $(libdir)/$$plugin; \
done
if [ ! -e /dev/net/tun ]; then \
mkdir /dev/net; \
## Dependencies: (autogenerated) ##
md5.o: md5.c md5.h
icmp.o: icmp.c l2tpns.h config.h
-cli.o: cli.c l2tpns.h config.h util.h cluster.h tbf.h bgp.h
+cli.o: cli.c l2tpns.h config.h util.h cluster.h tbf.h ll.h bgp.h
l2tpns.o: l2tpns.c md5.h l2tpns.h config.h cluster.h plugin.h ll.h \
constants.h control.h util.h tbf.h bgp.h
ppp.o: ppp.c l2tpns.h config.h constants.h plugin.h util.h tbf.h \
ll.o: ll.c ll.h
control.o: control.c control.h
util.o: util.c l2tpns.h config.h
-tbf.o: tbf.c l2tpns.h config.h tbf.h
+tbf.o: tbf.c l2tpns.h config.h util.h tbf.h
bgp.o: bgp.c l2tpns.h config.h bgp.h util.h
garden.so: garden.c l2tpns.h config.h plugin.h control.h
autothrottle.so: autothrottle.c l2tpns.h config.h plugin.h control.h