2011-04-09 16:10:31 +00:00
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
|
|
|
@@ -158,7 +158,7 @@ CFLAGS= -I. -Iusl -Icli -isystem inclu
|
|
|
|
$(CPPFLAGS) $(CPPFLAGS.dmalloc) \
|
|
|
|
-DSYS_LIBDIR=$(SYS_LIBDIR)
|
2009-07-26 10:26:13 +00:00
|
|
|
LDFLAGS.l2tpd= -Wl,-E -L. -Lusl -lusl -ldl $(LIBS.dmalloc) -lc
|
|
|
|
-LDFLAGS.l2tpconfig= -Lcli -lcli -lreadline $(LIBS.dmalloc) $(READLINE_LDFLAGS) -lc
|
|
|
|
+LDFLAGS.l2tpconfig= -Lcli -lcli -lreadline -lncurses $(LIBS.dmalloc) $(READLINE_LDFLAGS) -lc
|
|
|
|
|
|
|
|
OPT_CFLAGS?= -O
|
|
|
|
|
2011-04-09 16:10:31 +00:00
|
|
|
@@ -185,11 +185,11 @@ RPCGENFLAGS= -N -M -C -L
|
2010-11-01 17:29:31 +00:00
|
|
|
|
2011-04-09 16:10:31 +00:00
|
|
|
.PHONY: all clean distclean install daemon app test
|
2010-11-01 17:29:31 +00:00
|
|
|
|
2011-04-09 16:10:31 +00:00
|
|
|
-all: generated-files daemon $(APP)
|
|
|
|
+all: daemon $(APP)
|
2010-11-01 17:29:31 +00:00
|
|
|
|
|
|
|
-daemon: generated-files $(SUBDIRS:%=subdir-%) openl2tpd
|
|
|
|
+daemon: $(SUBDIRS:%=subdir-%) openl2tpd
|
|
|
|
|
|
|
|
-app: generated-files l2tpconfig
|
|
|
|
+app: l2tpconfig
|
|
|
|
|
|
|
|
test: subdir-test
|
|
|
|
$(MAKE) -C $@ $(MFLAGS) $@
|
2011-04-09 16:10:31 +00:00
|
|
|
@@ -197,7 +197,7 @@ test: subdir-test
|
2010-11-01 15:10:47 +00:00
|
|
|
|
|
|
|
.PHONY: $(SUBDIRS:%=subdir-%)
|
|
|
|
|
|
|
|
-$(SUBDIRS:%=subdir-%): FORCE
|
|
|
|
+$(SUBDIRS:%=subdir-%): FORCE generated-files
|
|
|
|
$(MAKE) -C $(@:subdir-%=%) $(MFLAGS) EXTRA_CFLAGS="$(CPPFLAGS)"
|
|
|
|
|
|
|
|
ifeq ($(L2TP_FEATURE_LOCAL_CONF_FILE),y)
|
2011-11-04 23:28:07 +00:00
|
|
|
@@ -212,10 +212,10 @@ LDFLAGS.l2tpd+= -lfl
|
|
|
|
$(YACC) -d -o l2tp_config_parse.c $<
|
|
|
|
|
|
|
|
l2tp_config_token.o: l2tp_config_token.c
|
|
|
|
- $(CC) -I. -MMD -w $(CFLAGS.optimize) -c -DYY_NO_UNPUT $<
|
|
|
|
+ $(CC) -I. -MMD -w $(CFLAGS.optimize) -c $(CPPFLAGS) -DYY_NO_UNPUT $<
|
|
|
|
|
|
|
|
l2tp_config_parse.o: l2tp_config_parse.c l2tp_config_parse.h
|
|
|
|
- $(CC) -I. -MMD -w $(CFLAGS.optimize) -c -DYY_NO_UNPUT $<
|
|
|
|
+ $(CC) -I. -MMD -w $(CFLAGS.optimize) -c $(CPPFLAGS) -DYY_NO_UNPUT $<
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Compile without -Wall because rpcgen-generated code is full of warnings.
|
2011-04-09 16:10:31 +00:00
|
|
|
@@ -265,9 +265,13 @@ TAGS:
|
2010-11-01 17:29:31 +00:00
|
|
|
@for d in $(SUBDIRS); do $(MAKE) -C $$d $(MFLAGS) $@; done
|
|
|
|
etags $(wildcard *.c) $(wildcard *.h)
|
|
|
|
|
|
|
|
+$(L2TPD_SRCS.o): generated-files
|
|
|
|
+
|
2010-11-01 15:10:47 +00:00
|
|
|
openl2tpd: $(L2TPD_SRCS.o)
|
|
|
|
$(CC) -o $@ $^ $(LDFLAGS.l2tpd)
|
|
|
|
|
2010-11-01 17:29:31 +00:00
|
|
|
+$(L2TPCONFIG_SRCS.o): generated-files
|
|
|
|
+
|
|
|
|
l2tpconfig: $(L2TPCONFIG_SRCS.o)
|
|
|
|
$(CC) -o $@ $^ $(LDFLAGS.l2tpconfig)
|
|
|
|
|
2011-04-09 16:10:31 +00:00
|
|
|
@@ -317,6 +321,7 @@ endif
|
2010-11-01 17:29:31 +00:00
|
|
|
else \
|
|
|
|
mv $@.tmp $@ ;\
|
|
|
|
fi
|
|
|
|
+ @echo '$@ generated.'
|
|
|
|
|
|
|
|
.PHONY: all install-all install-daemon install-app
|
2010-11-01 15:10:47 +00:00
|
|
|
|