--- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ L2TP_FEATURE_LAIC_SUPPORT= y L2TP_FEATURE_LAOC_SUPPORT= y L2TP_FEATURE_LNIC_SUPPORT= y L2TP_FEATURE_LNOC_SUPPORT= y -L2TP_FEATURE_LOCAL_CONF_FILE= y +#L2TP_FEATURE_LOCAL_CONF_FILE= y #L2TP_FEATURE_LOCAL_STAT_FILE= y # Define USE_DMALLOC to enable dmalloc memory debugging @@ -55,17 +55,17 @@ endif # in the pppd subdirectory of the compiler's default search path # (e.g. /usr/include/pppd). but can be pointed to another directory if # desired. -PPPD_VERSION= 2.4.5 +#PPPD_VERSION= 2.4.5 # PPPD_INCDIR= /usr/include/pppd # PPPD_LIBDIR= $(SYS_LIBDIR)/pppd/$(PPPD_VERSION) # Points to readline install root. READLINE_DIR should have lib/ & # include/ subdirs If not defined, readline is assumed to be installed # in the standard places that the compiler looks. -READLINE_DIR= +#READLINE_DIR= # For cross-compiling -CROSS_COMPILE= +#CROSS_COMPILE= # END CONFIGURABLE SETTINGS @@ -158,7 +158,7 @@ CFLAGS= -I. -Iusl -Icli -isystem inclu $(CPPFLAGS) $(CPPFLAGS.dmalloc) \ -DSYS_LIBDIR=$(SYS_LIBDIR) 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 @@ -185,11 +185,11 @@ RPCGENFLAGS= -N -M -C -L .PHONY: all clean distclean install daemon app test -all: generated-files daemon $(APP) +all: daemon $(APP) -daemon: generated-files $(SUBDIRS:%=subdir-%) openl2tpd +daemon: $(SUBDIRS:%=subdir-%) openl2tpd -app: generated-files l2tpconfig +app: l2tpconfig test: subdir-test $(MAKE) -C $@ $(MFLAGS) $@ @@ -197,7 +197,7 @@ test: subdir-test .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) @@ -265,9 +265,13 @@ TAGS: @for d in $(SUBDIRS); do $(MAKE) -C $$d $(MFLAGS) $@; done etags $(wildcard *.c) $(wildcard *.h) +$(L2TPD_SRCS.o): generated-files + openl2tpd: $(L2TPD_SRCS.o) $(CC) -o $@ $^ $(LDFLAGS.l2tpd) +$(L2TPCONFIG_SRCS.o): generated-files + l2tpconfig: $(L2TPCONFIG_SRCS.o) $(CC) -o $@ $^ $(LDFLAGS.l2tpconfig) @@ -317,6 +321,7 @@ endif else \ mv $@.tmp $@ ;\ fi + @echo '$@ generated.' .PHONY: all install-all install-daemon install-app