1# The olsr.org Optimized Link-State Routing daemon (olsrd)
2#
3# (c) by the OLSR project
4#
5# See our Git repository to find out who worked on this file
6# and thus is a copyright holder on it.
7#
8# All rights reserved.
9#
10# Redistribution and use in source and binary forms, with or without
11# modification, are permitted provided that the following conditions
12# are met:
13#
14# * Redistributions of source code must retain the above copyright
15#   notice, this list of conditions and the following disclaimer.
16# * Redistributions in binary form must reproduce the above copyright
17#   notice, this list of conditions and the following disclaimer in
18#   the documentation and/or other materials provided with the
19#   distribution.
20# * Neither the name of olsr.org, olsrd nor the names of its
21#   contributors may be used to endorse or promote products derived
22#   from this software without specific prior written permission.
23#
24# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35# POSSIBILITY OF SUCH DAMAGE.
36#
37# Visit http://www.olsr.org for more information.
38#
39# If you find this software useful feel free to make a donation
40# to the project. For more information see the website or contact
41# the copyright holders.
42#
43
44# Please also write a new version to:
45# gui/win32/Main/Frontend.rc (line 71, around "CAPTION [...]")
46# gui/win32/Inst/installer.nsi (line 57, around "MessageBox MB_YESNO [...]")
47VERS =		0.9.8
48
49TOPDIR = $(shell pwd)
50INSTALLOVERWRITE ?=
51include Makefile.inc
52
53# pass generated variables to save time
54MAKECMD = $(MAKE) OS="$(OS)" WARNINGS="$(WARNINGS)" VERBOSE="$(VERBOSE)" SANITIZE_ADDRESS="$(SANITIZE_ADDRESS)"
55
56LIBS +=		$(OS_LIB_DYNLOAD)
57ifeq ($(OS), win32)
58LDFLAGS +=	-Wl,--out-implib=libolsrd.a
59LDFLAGS +=	-Wl,--export-all-symbols
60endif
61
62SWITCHDIR =	src/olsr_switch
63CFGDIR =	src/cfgparser
64include $(CFGDIR)/local.mk
65TAG_SRCS =	$(SRCS) $(HDRS) $(sort $(wildcard $(CFGDIR)/*.[ch] $(SWITCHDIR)/*.[ch]))
66
67SGW_SUPPORT = 0
68ifeq ($(OS),linux)
69  SGW_SUPPORT = 1
70endif
71ifeq ($(OS),android)
72  SGW_SUPPORT = 1
73endif
74
75
76.PHONY: default_target switch
77default_target: $(EXENAME)
78
79ANDROIDREGEX=
80ifeq ($(OS),android)
81# On Android Google forgot to include regex engine code for Froyo version (but also there was
82# no support in older versions for it) so we have here this missing code.
83# http://groups.google.com/group/android-ndk/browse_thread/thread/5ea6f0650f0e3fc
84CFLAGS += -D__POSIX_VISIBLE
85ANDROIDREGEX=$(REGEX_LIB)
86endif
87
88$(EXENAME):	$(OBJS) $(ANDROIDREGEX) src/builddata.o
89ifeq ($(VERBOSE),0)
90		@echo "[LD] $@"
91endif
92		$(MAKECMDPREFIX)$(CC) $(LDFLAGS) -lm -o $@ $^ $(LIBS)
93
94cfgparser:	$(CFGDEPS) src/builddata.o
95		$(MAKECMDPREFIX)$(MAKECMD) -C $(CFGDIR)
96
97switch:
98	$(MAKECMDPREFIX)$(MAKECMD) -C $(SWITCHDIR)
99
100# generate it always
101.PHONY: builddata.txt
102builddata.txt:
103	$(MAKECMDPREFIX)./make/hash_source.sh "$@" "$(VERS)" "$(VERBOSE)"
104
105# only overwrite it when it doesn't exists or when it has changed
106src/builddata.c: builddata.txt
107	$(MAKECMDPREFIX)if [ ! -f "$@" ] || [ -n "$$(diff "$<" "$@")" ]; then cp -p "$<" "$@"; fi
108
109.PHONY: help libs clean_libs libs_clean clean distclean uberclean install_libs uninstall_libs libs_install libs_uninstall install_bin uninstall_bin install_olsrd uninstall_olsrd install uninstall build_all install_all uninstall_all clean_all gui clean_gui cfgparser_install cfgparser_clean
110
111clean:
112	-rm -f $(OBJS) $(SRCS:%.c=%.d) $(EXENAME) $(EXENAME).exe src/builddata.c $(TMPFILES)
113	-rm -f libolsrd.a
114	-rm -f olsr_switch.exe
115	-rm -f gui/win32/Main/olsrd_cfgparser.lib
116	-rm -f olsr-setup.exe
117	-rm -fr gui/win32/Main/Release
118	-rm -fr gui/win32/Shim/Release
119
120gui:
121ifeq ($(OS),linux)
122	$(MAKECMDPREFIX)$(MAKECMD) -C gui/linux-gtk all
123else
124	@echo "target gui not supported on $(OS)"
125	@exit 1
126endif
127
128clean_gui:
129	$(MAKECMDPREFIX)$(MAKECMD) -C gui/linux-gtk clean
130
131distclean: uberclean
132uberclean:	clean clean_libs clean_gui
133	-rm -f $(TAGFILE)
134#	BSD-xargs has no "--no-run-if-empty" aka "-r"
135	find . \( -name '*.[od]' -o -name '*~' \) -not -path "*/.hg*" -type f -print0 | xargs -0 rm -f
136	$(MAKECMDPREFIX)$(MAKECMD) -C $(SWITCHDIR) clean
137	$(MAKECMDPREFIX)$(MAKECMD) -C $(CFGDIR) clean
138	$(MAKECMDPREFIX)rm -f builddata.txt
139
140install: install_olsrd
141
142uninstall: uninstall_olsrd
143
144cfgparser_install: cfgparser
145		$(MAKECMDPREFIX)$(MAKECMD) -C $(CFGDIR) install
146
147cfgparser_clean:
148		$(MAKECMDPREFIX)$(MAKECMD) -C $(CFGDIR) clean
149
150install_bin:
151		mkdir -p $(SBINDIR)
152		install -m 755 $(EXENAME) $(SBINDIR)
153		$(STRIP) $(SBINDIR)/$(EXENAME)
154ifeq ($(SGW_SUPPORT),1)
155		$(MAKECMDPREFIX)if [ -e $(SBINDIR)/$(SGW_POLICY_SCRIPT) ]; then \
156			cp -f files/$(SGW_POLICY_SCRIPT) $(SBINDIR)/$(SGW_POLICY_SCRIPT).new; \
157			echo "Policy routing script was saved as $(SBINDIR)/$(SGW_POLICY_SCRIPT).new"; \
158		else \
159			cp -f files/$(SGW_POLICY_SCRIPT) $(SBINDIR)/$(SGW_POLICY_SCRIPT); \
160		fi
161endif
162
163uninstall_bin:
164		rm -f $(SBINDIR)/$(EXENAME)
165		rmdir -p $(SBINDIR) || true
166
167install_olsrd:	install_bin
168		@echo ========= C O N F I G U R A T I O N - F I L E ============
169		@echo $(EXENAME) uses the configfile $(CFGFILE)
170		@echo a default configfile. Sample config files are installed
171		@echo as $(CFGFILE).default.full, $(CFGFILE).default.rfc,
172		@echo $(CFGFILE).default.lq and $(CFGFILE).default.lq-fisheye
173		@echo copy and edit one of these to $(CFGFILE)
174		@echo If in doubt start with $(CFGFILE).default.lq
175		@echo ==========================================================
176		mkdir -p $(ETCDIR)
177		-cp files/olsrd.conf.default.full $(CFGFILE).default.full
178		-cp files/olsrd.conf.default.rfc $(CFGFILE).default.rfc
179		-cp files/olsrd.conf.default.lq $(CFGFILE).default.lq
180		-cp files/olsrd.conf.default.lq-fisheye $(CFGFILE).default.lq-fisheye
181		@echo -------------------------------------------
182		@echo Edit $(CFGFILE) before running olsrd!!
183		@echo -------------------------------------------
184		@echo Installing manpages $(EXENAME)\(8\) and $(CFGNAME)\(5\)
185ifneq ($(MANDIR),)
186		mkdir -p $(MANDIR)/man8/
187		cp files/olsrd.8.gz $(MANDIR)/man8/$(EXENAME).8.gz
188		mkdir -p $(MANDIR)/man5/
189		cp files/olsrd.conf.5.gz $(MANDIR)/man5/$(CFGNAME).5.gz
190endif
191ifneq ($(RCDIR),)
192		cp $(RCFILE) $(RCDIR)/olsrd
193endif
194ifneq ($(DOCDIR_OLSRD),)
195		mkdir -p "$(DOCDIR_OLSRD)"
196		cp "CHANGELOG" "README-Olsr-Extensions" \
197		  "README-LINUX_NL80211.txt" "files/olsrd.conf.default" \
198		  "files/olsrd.conf.default.txt" "license.txt" \
199		  "$(DOCDIR_OLSRD)"
200endif
201
202uninstall_olsrd:	uninstall_bin
203ifneq ($(DOCDIR_OLSRD),)
204		rm -f "$(DOCDIR_OLSRD)/CHANGELOG" "$(DOCDIR_OLSRD)/README-Olsr-Extensions" \
205		  "$(DOCDIR_OLSRD)/README-LINUX_NL80211.txt" "$(DOCDIR_OLSRD)/olsrd.conf.default" \
206		  "$(DOCDIR_OLSRD)/olsrd.conf.default.txt" "$(DOCDIR_OLSRD)/license.txt"
207		rmdir -p --ignore-fail-on-non-empty "$(DOCDIR_OLSRD)"
208endif
209ifneq ($(MANDIR),)
210		rm -f $(MANDIR)/man5/$(CFGNAME).5.gz
211		rmdir -p $(MANDIR)/man5/ || true
212		rm -f $(MANDIR)/man8/$(EXENAME).8.gz
213		rmdir -p $(MANDIR)/man8/ || true
214endif
215		rm -f $(CFGFILE) $(CFGFILE).new
216		rmdir -p $(ETCDIR) || true
217ifneq ($(RCDIR),)
218		rm -f $(RCDIR)/olsrd
219		rmdir -p $(RCDIR) || true
220endif
221
222tags:
223		$(TAGCMD) -o $(TAGFILE) $(TAG_SRCS)
224
225rpm:
226	$(MAKECMDPREFIX)$(MAKECMD) -C redhat
227
228
229#
230# PLUGINS
231#
232
233# This is quite ugly but at least it works
234ifeq ($(OS),linux)
235SUBDIRS := arprefresh bmf dot_draw dyn_gw dyn_gw_plain httpinfo info jsoninfo mdns mini nameservice netjson poprouting p2pd pgraph pud quagga secure sgwdynspeed txtinfo watchdog
236else
237ifeq ($(OS),win32)
238SUBDIRS := dot_draw httpinfo info jsoninfo mini netjson pgraph secure txtinfo
239else
240ifeq ($(OS),android)
241SUBDIRS := arprefresh bmf dot_draw dyn_gw dyn_gw_plain httpinfo info jsoninfo mdns mini nameservice netjson p2pd pgraph secure sgwdynspeed txtinfo watchdog
242else
243SUBDIRS := dot_draw httpinfo info jsoninfo mini nameservice netjson pgraph secure txtinfo watchdog
244endif
245endif
246endif
247
248libs:
249		$(MAKECMDPREFIX)set -e;for dir in $(SUBDIRS);do $(MAKECMD) -C lib/$$dir LIBDIR=$(LIBDIR);done
250
251libs_clean clean_libs:
252		-for dir in $(SUBDIRS);do $(MAKECMD) -C lib/$$dir LIBDIR=$(LIBDIR) clean;rm -f lib/$$dir/*.so lib/$$dir/*.dll;done
253
254libs_install install_libs:
255		$(MAKECMDPREFIX)set -e;for dir in $(SUBDIRS);do $(MAKECMD) -C lib/$$dir LIBDIR=$(LIBDIR) install;done
256
257libs_uninstall uninstall_libs:
258		$(MAKECMDPREFIX)set -e;for dir in $(SUBDIRS);do $(MAKECMD) -C lib/$$dir LIBDIR=$(LIBDIR) uninstall;done
259		rmdir -p $(LIBDIR) || true
260
261#
262# DOCUMENTATION
263#
264.PHONY: doc doc_clean
265doc:
266		$(MAKECMDPREFIX)$(MAKECMD) -C doc OS=$(OS)
267
268doc-pdf:
269		$(MAKECMDPREFIX)$(MAKECMD) -C doc-pdf OS=$(OS)
270
271doc_clean:
272		$(MAKECMDPREFIX)$(MAKECMD) -C doc OS=$(OS) clean
273
274#
275# PLUGINS
276#
277
278arprefresh:
279		$(MAKECMDPREFIX)$(MAKECMD) -C lib/arprefresh
280
281arprefresh_clean:
282		$(MAKECMDPREFIX)$(MAKECMD) -C lib/arprefresh DESTDIR=$(DESTDIR) clean
283
284arprefresh_install:
285		$(MAKECMDPREFIX)$(MAKECMD) -C lib/arprefresh DESTDIR=$(DESTDIR) install
286
287arprefresh_uninstall:
288		$(MAKECMDPREFIX)$(MAKECMD) -C lib/arprefresh DESTDIR=$(DESTDIR) uninstall
289
290bmf:
291		$(MAKECMDPREFIX)$(MAKECMD) -C lib/bmf
292
293bmf_clean:
294		$(MAKECMDPREFIX)$(MAKECMD) -C lib/bmf DESTDIR=$(DESTDIR) clean
295
296bmf_install:
297		$(MAKECMDPREFIX)$(MAKECMD) -C lib/bmf DESTDIR=$(DESTDIR) install
298
299bmf_uninstall:
300		$(MAKECMDPREFIX)$(MAKECMD) -C lib/bmf DESTDIR=$(DESTDIR) uninstall
301
302dot_draw:
303		$(MAKECMDPREFIX)$(MAKECMD) -C lib/dot_draw
304
305dot_draw_clean:
306		$(MAKECMDPREFIX)$(MAKECMD) -C lib/dot_draw DESTDIR=$(DESTDIR) clean
307
308dot_draw_install:
309		$(MAKECMDPREFIX)$(MAKECMD) -C lib/dot_draw DESTDIR=$(DESTDIR) install
310
311dot_draw_uninstall:
312		$(MAKECMDPREFIX)$(MAKECMD) -C lib/dot_draw DESTDIR=$(DESTDIR) uninstall
313
314dyn_gw:
315		$(MAKECMDPREFIX)$(MAKECMD) -C lib/dyn_gw
316
317dyn_gw_clean:
318		$(MAKECMDPREFIX)$(MAKECMD) -C lib/dyn_gw DESTDIR=$(DESTDIR) clean
319
320dyn_gw_install:
321		$(MAKECMDPREFIX)$(MAKECMD) -C lib/dyn_gw DESTDIR=$(DESTDIR) install
322
323dyn_gw_uninstall:
324		$(MAKECMDPREFIX)$(MAKECMD) -C lib/dyn_gw DESTDIR=$(DESTDIR) uninstall
325
326dyn_gw_plain:
327		$(MAKECMDPREFIX)$(MAKECMD) -C lib/dyn_gw_plain
328
329dyn_gw_plain_clean:
330		$(MAKECMDPREFIX)$(MAKECMD) -C lib/dyn_gw_plain DESTDIR=$(DESTDIR) clean
331
332dyn_gw_plain_install:
333		$(MAKECMDPREFIX)$(MAKECMD) -C lib/dyn_gw_plain DESTDIR=$(DESTDIR) install
334
335dyn_gw_plain_uninstall:
336		$(MAKECMDPREFIX)$(MAKECMD) -C lib/dyn_gw_plain DESTDIR=$(DESTDIR) uninstall
337
338httpinfo:
339		$(MAKECMDPREFIX)$(MAKECMD) -C lib/httpinfo
340
341httpinfo_clean:
342		$(MAKECMDPREFIX)$(MAKECMD) -C lib/httpinfo DESTDIR=$(DESTDIR) clean
343
344httpinfo_install:
345		$(MAKECMDPREFIX)$(MAKECMD) -C lib/httpinfo DESTDIR=$(DESTDIR) install
346
347httpinfo_uninstall:
348		$(MAKECMDPREFIX)$(MAKECMD) -C lib/httpinfo DESTDIR=$(DESTDIR) uninstall
349
350info:
351		$(MAKECMDPREFIX)$(MAKECMD) -C lib/info
352
353info_clean:
354		$(MAKECMDPREFIX)$(MAKECMD) -C lib/info DESTDIR=$(DESTDIR) clean
355
356info_install:
357		$(MAKECMDPREFIX)$(MAKECMD) -C lib/info DESTDIR=$(DESTDIR) install
358
359info_uninstall:
360		$(MAKECMDPREFIX)$(MAKECMD) -C lib/info DESTDIR=$(DESTDIR) uninstall
361
362info_java:
363		$(MAKECMDPREFIX)$(MAKECMD) -C lib/info.java
364
365info_java_clean:
366		$(MAKECMDPREFIX)$(MAKECMD) -C lib/info.java DESTDIR=$(DESTDIR) clean
367
368info_java_install:
369		$(MAKECMDPREFIX)$(MAKECMD) -C lib/info.java DESTDIR=$(DESTDIR) install
370
371info_java_uninstall:
372		$(MAKECMDPREFIX)$(MAKECMD) -C lib/info.java DESTDIR=$(DESTDIR) uninstall
373
374jsoninfo: info
375		$(MAKECMDPREFIX)$(MAKECMD) -C lib/jsoninfo
376
377jsoninfo_clean: info_clean
378		$(MAKECMDPREFIX)$(MAKECMD) -C lib/jsoninfo DESTDIR=$(DESTDIR) clean
379
380jsoninfo_install: info_install
381		$(MAKECMDPREFIX)$(MAKECMD) -C lib/jsoninfo DESTDIR=$(DESTDIR) install
382
383jsoninfo_uninstall: info_uninstall
384		$(MAKECMDPREFIX)$(MAKECMD) -C lib/jsoninfo DESTDIR=$(DESTDIR) uninstall
385
386mdns:
387		$(MAKECMDPREFIX)$(MAKECMD) -C lib/mdns
388
389mdns_clean:
390		$(MAKECMDPREFIX)$(MAKECMD) -C lib/mdns DESTDIR=$(DESTDIR) clean
391
392mdns_install:
393		$(MAKECMDPREFIX)$(MAKECMD) -C lib/mdns DESTDIR=$(DESTDIR) install
394
395mdns_uninstall:
396		$(MAKECMDPREFIX)$(MAKECMD) -C lib/mdns DESTDIR=$(DESTDIR) uninstall
397
398#
399# no targets for mini: it's an example plugin
400#
401
402nameservice:
403		$(MAKECMDPREFIX)$(MAKECMD) -C lib/nameservice clean
404		$(MAKECMDPREFIX)$(MAKECMD) -C lib/nameservice
405
406nameservice_clean:
407		$(MAKECMDPREFIX)$(MAKECMD) -C lib/nameservice DESTDIR=$(DESTDIR) clean
408
409nameservice_install:
410		$(MAKECMDPREFIX)$(MAKECMD) -C lib/nameservice DESTDIR=$(DESTDIR) install
411
412nameservice_uninstall:
413		$(MAKECMDPREFIX)$(MAKECMD) -C lib/nameservice DESTDIR=$(DESTDIR) uninstall
414
415netjson: info
416		$(MAKECMDPREFIX)$(MAKECMD) -C lib/netjson
417
418netjson_clean: info_clean
419		$(MAKECMDPREFIX)$(MAKECMD) -C lib/netjson DESTDIR=$(DESTDIR) clean
420
421netjson_install: info_install
422		$(MAKECMDPREFIX)$(MAKECMD) -C lib/netjson DESTDIR=$(DESTDIR) install
423
424netjson_uninstall: info_uninstall
425		$(MAKECMDPREFIX)$(MAKECMD) -C lib/netjson DESTDIR=$(DESTDIR) uninstall
426
427poprouting: info
428		$(MAKECMDPREFIX)$(MAKECMD) -C lib/poprouting
429
430poprouting_clean: info_clean
431		$(MAKECMDPREFIX)$(MAKECMD) -C lib/poprouting DESTDIR=$(DESTDIR) clean
432
433poprouting_install: info_install
434		$(MAKECMDPREFIX)$(MAKECMD) -C lib/poprouting DESTDIR=$(DESTDIR) install
435
436poprouting_uninstall: info_uninstall
437		$(MAKECMDPREFIX)$(MAKECMD) -C lib/poprouting DESTDIR=$(DESTDIR) uninstall
438
439p2pd:
440		$(MAKECMDPREFIX)$(MAKECMD) -C lib/p2pd
441
442p2pd_clean:
443		$(MAKECMDPREFIX)$(MAKECMD) -C lib/p2pd DESTDIR=$(DESTDIR) clean
444
445p2pd_install:
446		$(MAKECMDPREFIX)$(MAKECMD) -C lib/p2pd DESTDIR=$(DESTDIR) install
447
448p2pd_uninstall:
449		$(MAKECMDPREFIX)$(MAKECMD) -C lib/p2pd DESTDIR=$(DESTDIR) uninstall
450
451pgraph:
452		$(MAKECMDPREFIX)$(MAKECMD) -C lib/pgraph
453
454pgraph_clean:
455		$(MAKECMDPREFIX)$(MAKECMD) -C lib/pgraph DESTDIR=$(DESTDIR) clean
456
457pgraph_install:
458		$(MAKECMDPREFIX)$(MAKECMD) -C lib/pgraph DESTDIR=$(DESTDIR) install
459
460pgraph_uninstall:
461		$(MAKECMDPREFIX)$(MAKECMD) -C lib/pgraph DESTDIR=$(DESTDIR) uninstall
462
463pud:
464		$(MAKECMDPREFIX)$(MAKECMD) -C lib/pud
465
466pud_clean:
467		$(MAKECMDPREFIX)$(MAKECMD) -C lib/pud DESTDIR=$(DESTDIR) clean
468
469pud_install:
470		$(MAKECMDPREFIX)$(MAKECMD) -C lib/pud DESTDIR=$(DESTDIR) install
471
472pud_uninstall:
473		$(MAKECMDPREFIX)$(MAKECMD) -C lib/pud DESTDIR=$(DESTDIR) uninstall
474
475pud_java: pud
476		$(MAKECMDPREFIX)$(MAKECMD) -C lib/pud DESTDIR=$(DESTDIR) java
477
478pud_java_install:
479		$(MAKECMDPREFIX)$(MAKECMD) -C lib/pud DESTDIR=$(DESTDIR) java-install
480
481pud_java_uninstall:
482		$(MAKECMDPREFIX)$(MAKECMD) -C lib/pud DESTDIR=$(DESTDIR) java-uninstall
483
484quagga:
485		$(MAKECMDPREFIX)$(MAKECMD) -C lib/quagga
486
487quagga_clean:
488		$(MAKECMDPREFIX)$(MAKECMD) -C lib/quagga DESTDIR=$(DESTDIR) clean
489
490quagga_install:
491		$(MAKECMDPREFIX)$(MAKECMD) -C lib/quagga DESTDIR=$(DESTDIR) install
492
493quagga_uninstall:
494		$(MAKECMDPREFIX)$(MAKECMD) -C lib/quagga DESTDIR=$(DESTDIR) uninstall
495
496secure:
497		$(MAKECMDPREFIX)$(MAKECMD) -C lib/secure
498
499secure_clean:
500		$(MAKECMDPREFIX)$(MAKECMD) -C lib/secure DESTDIR=$(DESTDIR) clean
501
502secure_install:
503		$(MAKECMDPREFIX)$(MAKECMD) -C lib/secure DESTDIR=$(DESTDIR) install
504
505secure_uninstall:
506		$(MAKECMDPREFIX)$(MAKECMD) -C lib/secure DESTDIR=$(DESTDIR) uninstall
507
508sgwdynspeed:
509		$(MAKECMDPREFIX)$(MAKECMD) -C lib/sgwdynspeed
510
511sgwdynspeed_clean:
512		$(MAKECMDPREFIX)$(MAKECMD) -C lib/sgwdynspeed DESTDIR=$(DESTDIR) clean
513
514sgwdynspeed_install:
515		$(MAKECMDPREFIX)$(MAKECMD) -C lib/sgwdynspeed DESTDIR=$(DESTDIR) install
516
517sgwdynspeed_uninstall:
518		$(MAKECMDPREFIX)$(MAKECMD) -C lib/sgwdynspeed DESTDIR=$(DESTDIR) uninstall
519
520txtinfo: info
521		$(MAKECMDPREFIX)$(MAKECMD) -C lib/txtinfo
522
523txtinfo_clean: info_clean
524		$(MAKECMDPREFIX)$(MAKECMD) -C lib/txtinfo DESTDIR=$(DESTDIR) clean
525
526txtinfo_install: info_install
527		$(MAKECMDPREFIX)$(MAKECMD) -C lib/txtinfo DESTDIR=$(DESTDIR) install
528
529txtinfo_uninstall: info_uninstall
530		$(MAKECMDPREFIX)$(MAKECMD) -C lib/txtinfo DESTDIR=$(DESTDIR) uninstall
531
532watchdog:
533		$(MAKECMDPREFIX)$(MAKECMD) -C lib/watchdog
534
535watchdog_clean:
536		$(MAKECMDPREFIX)$(MAKECMD) -C lib/watchdog DESTDIR=$(DESTDIR) clean
537
538watchdog_install:
539		$(MAKECMDPREFIX)$(MAKECMD) -C lib/watchdog DESTDIR=$(DESTDIR) install
540
541watchdog_uninstall:
542		$(MAKECMDPREFIX)$(MAKECMD) -C lib/watchdog DESTDIR=$(DESTDIR) uninstall
543
544
545build_all:	all switch libs
546install_all:	install install_libs
547uninstall_all:	uninstall uninstall_libs
548clean_all:	uberclean clean_libs
549