17790cfbdab78fc4cadbfc8a3142ddb6b8aaaffb
[packages.git] / net / openl2tp / patches / 001-makefile.patch
1 --- a/Makefile
2 +++ b/Makefile
3 @@ -8,7 +8,7 @@ L2TP_FEATURE_LAIC_SUPPORT=      y
4  L2TP_FEATURE_LAOC_SUPPORT=     y
5  L2TP_FEATURE_LNIC_SUPPORT=     y
6  L2TP_FEATURE_LNOC_SUPPORT=     y
7 -L2TP_FEATURE_LOCAL_CONF_FILE=  y
8 +#L2TP_FEATURE_LOCAL_CONF_FILE= y
9  #L2TP_FEATURE_LOCAL_STAT_FILE= y
10  
11  # Define USE_DMALLOC to enable dmalloc memory debugging
12 @@ -55,17 +55,17 @@ endif
13  # in the pppd subdirectory of the compiler's default search path
14  # (e.g. /usr/include/pppd). but can be pointed to another directory if
15  # desired.
16 -PPPD_VERSION=          2.4.5
17 +#PPPD_VERSION=         2.4.5
18  # PPPD_INCDIR=         /usr/include/pppd
19  # PPPD_LIBDIR=         $(SYS_LIBDIR)/pppd/$(PPPD_VERSION)
20  
21  # Points to readline install root. READLINE_DIR should have lib/ &
22  # include/ subdirs If not defined, readline is assumed to be installed
23  # in the standard places that the compiler looks.
24 -READLINE_DIR=          
25 +#READLINE_DIR=         
26  
27  # For cross-compiling
28 -CROSS_COMPILE=
29 +#CROSS_COMPILE=
30  
31  # END CONFIGURABLE SETTINGS
32  
33 @@ -158,7 +158,7 @@ CFLAGS=                     -I. -Iusl -Icli -isystem inclu
34                                 $(CPPFLAGS) $(CPPFLAGS.dmalloc) \
35                                 -DSYS_LIBDIR=$(SYS_LIBDIR)
36  LDFLAGS.l2tpd=         -Wl,-E -L. -Lusl -lusl -ldl $(LIBS.dmalloc) -lc
37 -LDFLAGS.l2tpconfig=    -Lcli -lcli -lreadline $(LIBS.dmalloc) $(READLINE_LDFLAGS) -lc
38 +LDFLAGS.l2tpconfig=    -Lcli -lcli -lreadline -lncurses $(LIBS.dmalloc) $(READLINE_LDFLAGS) -lc
39  
40  OPT_CFLAGS?=           -O
41  
42 @@ -185,11 +185,11 @@ RPCGENFLAGS=              -N -M -C -L
43  
44  .PHONY:                        all clean distclean install daemon app test
45  
46 -all:                   generated-files daemon $(APP)
47 +all:                   daemon $(APP)
48  
49 -daemon:                        generated-files $(SUBDIRS:%=subdir-%) openl2tpd
50 +daemon:                        $(SUBDIRS:%=subdir-%) openl2tpd
51  
52 -app:                   generated-files l2tpconfig
53 +app:                   l2tpconfig
54  
55  test:                  subdir-test
56                         $(MAKE) -C $@ $(MFLAGS) $@
57 @@ -197,7 +197,7 @@ test:                       subdir-test
58  
59  .PHONY:                        $(SUBDIRS:%=subdir-%)
60  
61 -$(SUBDIRS:%=subdir-%): FORCE
62 +$(SUBDIRS:%=subdir-%): FORCE generated-files
63                         $(MAKE) -C $(@:subdir-%=%) $(MFLAGS) EXTRA_CFLAGS="$(CPPFLAGS)"
64  
65  ifeq ($(L2TP_FEATURE_LOCAL_CONF_FILE),y)
66 @@ -265,9 +265,13 @@ TAGS:
67                         @for d in $(SUBDIRS); do $(MAKE) -C $$d $(MFLAGS) $@; done
68                         etags $(wildcard *.c) $(wildcard *.h)
69  
70 +$(L2TPD_SRCS.o):       generated-files
71 +
72  openl2tpd:             $(L2TPD_SRCS.o)
73                         $(CC) -o $@ $^ $(LDFLAGS.l2tpd)
74  
75 +$(L2TPCONFIG_SRCS.o):  generated-files
76 +
77  l2tpconfig:            $(L2TPCONFIG_SRCS.o)
78                         $(CC) -o $@ $^ $(LDFLAGS.l2tpconfig)
79  
80 @@ -317,6 +321,7 @@ endif
81         else \
82                 mv $@.tmp $@ ;\
83         fi
84 +       @echo '$@ generated.'
85  
86  .PHONY:                        all install-all install-daemon install-app
87