Migrate UI cleanup phase 4 from MIPS into ARM
[tomato.git] / release / src-rt-6.x.4708 / router / Makefile
blobc4e6c38aec88195e25925b5120be263c9e74e935
1 # Broadcom Linux Router Makefile
3 # Copyright 2005, Broadcom Corporation
4 # All Rights Reserved.
6 # THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
7 # KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
8 # SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
9 # FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
13 include common.mak
15 #TOMATO_EXPERIMENTAL=0
17 #export PARALLEL_BUILD :=
18 export PARALLEL_BUILD := -j`grep -c '^processor' /proc/cpuinfo`
24 SEP=echo "\033[41;1m $@ \033[0m"
26 export CFLAGS += -DBCMWPA2
27 ifeq ($(TCONFIG_BCMWL6),y)
28 export CFLAGS += -DBCMQOS
29 export CFLAGS += -DBCM_DCS
30 export CFLAGS += -DEXT_ACS
31 export CFLAGS += -DD11AC_IOTYPES
32 export CFLAGS += -DNAS_GTK_PER_STA
33 export CFLAGS += -DPHYMON
34 export CFLAGS += -DPROXYARP
35 export CFLAGS += -DTRAFFIC_MGMT
36 export CFLAGS += -DTRAFFIC_MGMT_RSSI_POLICY
37 endif
38 export CFLAGS += $(EXTRACFLAGS)
41 # standard packages
43 ifeq ($(TCONFIG_BCMARM),y)
44 obj-y += libbcm
45 else
46 obj-y += lzma-loader
47 endif
48 obj-y += shared
49 obj-y += nvram$(BCMEX)
50 obj-y += eapd$(BCMEX)/linux
51 obj-y += libbcmcrypto
52 obj-y += wlconf$(BCMEX)
53 obj-y += nas$(BCMEX)
54 ifeq ($(TCONFIG_DHDAP),)
55 obj-y += prebuilt
56 endif
57 obj-y += igmpproxy
58 obj-y += rc
59 ifeq ($(TCONFIG_BCMARM),y)
60 obj-y += iptables-1.4.x
61 obj-y += iproute2-3.x
62 else
63 obj-y += iptables
64 obj-y += iproute2
65 endif
66 obj-$(TCONFIG_DHDAP) += dhd $(if $(TCONFIG_BCM7),pciefd)
67 obj-y += rom
68 obj-y += others
69 obj-y += busybox
70 obj-y += httpd
71 obj-y += www
72 obj-y += wwwAT
73 obj-y += bridge
74 obj-y += dnsmasq
75 obj-y += etc
76 # obj-y += vlan # use Busybox vconfig
77 obj-y += pppd
78 obj-y += rp-pppoe
79 obj-y += utils$(BCMEX)
80 #obj-y += ntpclient #Asus version
81 obj-y += ntpc
82 obj-y += rstats
83 obj-y += cstats
84 obj-y += udpxy
85 obj-$(TCONFIG_TOR) += tor
86 obj-$(TCONFIG_TOR) += libevent
87 obj-$(TCONFIG_TOR) += zlib
88 obj-$(TCONFIG_DNSCRYPT) += libsodium
89 obj-$(TCONFIG_DNSCRYPT) += dnscrypt
90 obj-$(TCONFIG_SNMP) += snmp
91 obj-$(TCONFIG_SDHC) += mmc
93 #obj-y += cyassl
94 obj-y += mssl
95 obj-y += mdu
96 obj-$(TCONFIG_RAID) += mdadm
98 obj-$(TCONFIG_NFS) += portmap
99 obj-$(TCONFIG_NFS) += e2fsprogs
100 obj-$(TCONFIG_NFS) += libevent
101 obj-$(TCONFIG_NFS) += libnfsidmap
102 obj-$(TCONFIG_NFS) += nfs-utils
104 #Roadkill
105 obj-$(TCONFIG_NOCAT) += nocat
107 # !!TB
108 obj-$(TCONFIG_USB) += p910nd
109 obj-$(TCONFIG_USB) += comgt
110 obj-$(TCONFIG_USB) += uqmi
112 obj-$(TCONFIG_UPS) += apcupsd
114 ifeq ($(CONFIG_LINUX26),y)
115 obj-$(TCONFIG_USB) += sd-idle
116 else
117 obj-$(TCONFIG_USB) += scsi-idle
118 endif
120 obj-y += libusb10
121 #obj-y += libusb
122 obj-y += usbmodeswitch
123 obj-$(TCONFIG_FTP) += vsftpd
125 ifeq ($(CONFIG_LINUX26),y)
126 ifeq ($(TCONFIG_SAMBASRV),y)
127 NEED_EX_NLS = y
128 endif
129 ifeq ($(TCONFIG_USB_EXTRAS),y)
130 NEED_EX_USB = y
131 endif
132 ifeq ($(TCONFIG_MICROSD),y)
133 NEED_SD_MODULES = y
134 endif
135 endif
137 ifeq ($(TCONFIG_SAMBASRV),y)
138 ifeq ($(TCONFIG_SAMBA3),y)
139 NEED_SAMBA3 = y
140 else
141 NEED_SAMBA2 = y
142 endif
143 endif
145 ifeq ($(TCONFIG_IPV6),y)
146 export TCONFIG_IPV6 := y
147 else
148 TCONFIG_IPV6 :=
149 endif
151 ifeq ($(TCONFIG_IPSEC),y)
152 export TCONFIG_IPSEC := y
153 else
154 TCONFIG_IPSEC :=
155 endif
157 ifeq ($(TCONFIG_RAID),y)
158 export TCONFIG_RAID := y
159 else
160 TCONFIG_RAID :=
161 endif
163 obj-$(NEED_SAMBA2) += samba
164 #ifeq ($(TCONFIG_BCMARM),y)
165 #obj-$(NEED_SAMBA3) += samba-3.5.8
166 obj-y += taskset
167 #else
168 obj-$(NEED_SAMBA3) += samba3
169 #endif
171 ifeq ($(CONFIG_BCMWL6),y)
172 ifeq ($(TCONFIG_TUXERA),y)
173 obj-y += tuxera
174 else
175 ifeq ($(TCONFIG_UFSDA),y)
176 obj-$(TCONFIG_NTFS) += ufsd-asus
177 else
178 ifeq ($(TCONFIG_UFSDN),y)
179 obj-$(TCONFIG_NTFS) += ufsd-netgear
180 endif
181 endif
182 endif
183 endif
184 obj-$(TCONFIG_NTFS) += ntfs-3g
186 obj-$(TCONFIG_EBTABLES) += ebtables
187 #obj-$(TCONFIG_IPV6) += libdaemon
188 #obj-$(TCONFIG_IPV6) += radvd
189 obj-$(TCONFIG_IPV6) += dhcpv6
191 obj-$(TCONFIG_MEDIA_SERVER) += zlib
192 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
193 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
194 obj-$(TCONFIG_MEDIA_SERVER) += libiconv
195 obj-$(TCONFIG_MEDIA_SERVER) += libogg
196 obj-$(TCONFIG_MEDIA_SERVER) += flac
197 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
198 obj-$(TCONFIG_MEDIA_SERVER) += libexif
199 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
200 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
201 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
202 MEDIA_SERVER_STATIC=y
203 #MEDIA_SERVER_STATIC :=
205 obj-y += libnfnetlink
206 obj-y += miniupnpd
207 # obj-y += upnp
208 obj-$(CONFIG_LINUX26) += libmnl
209 obj-$(CONFIG_LINUX26) += ipset
213 # configurable packages
215 obj-$(TCONFIG_L2TP) += xl2tpd
216 obj-$(TCONFIG_PPTP) += accel-pptp
217 obj-$(TCONFIG_PPTPD) += pptpd
218 obj-$(TCONFIG_HTTPS) += openssl
219 obj-$(TCONFIG_SSH) += dropbear
220 #obj-$(TCONFIG_ZEBRA) += zebra
221 # obj-$(TCONFIG_IPP2P) += ipp2p
222 obj-$(TCONFIG_LZO) += lzo
223 obj-$(TCONFIG_OPENVPN) += openvpn
224 obj-$(TCONFIG_OPENVPN) += openvpn_plugin_auth_nvram
225 obj-$(TCONFIG_TINC) += tinc
226 obj-$(TCONFIG_EMF) += emf
227 obj-$(TCONFIG_EMF) += igs
229 # Tomato RAF
230 # additional modules for nginx
231 ifeq (obj-$(TCONFIG_NGINX),y)
232 ifndef ($(ADDITIONAL_MODULES))
233 ADDITIONAL_MODULES:=
234 else
235 ifeq ($(TCONFIG_IPV6),y)
236 ADDITIONAL_MODULES += --with-ipv6
237 endif
238 endif
239 endif
240 obj-$(TCONFIG_NGINX) += libncurses
241 obj-$(TCONFIG_NGINX) += mysql
242 obj-$(TCONFIG_NGINX) += openssl
243 obj-$(TCONFIG_NGINX) += spawn-fcgi
244 obj-$(TCONFIG_NGINX) += pcre
245 obj-$(TCONFIG_NGINX) += sqlite
246 obj-$(TCONFIG_NGINX) += libiconv
247 obj-$(TCONFIG_NGINX) += libxml2
248 obj-$(TCONFIG_NGINX) += libpng
249 obj-$(TCONFIG_NGINX) += jpeg
250 obj-$(TCONFIG_NGINX) += php
251 obj-$(TCONFIG_NGINX) += nginx
253 obj-$(TCONFIG_NANO) += libncurses
254 obj-$(TCONFIG_NANO) += nano
256 obj-$(TCONFIG_BBT) += openssl
257 obj-$(TCONFIG_BBT) += libevent
258 obj-$(TCONFIG_BBT) += libcurl
259 obj-$(TCONFIG_BBT) += transmission
260 obj-$(TCONFIG_BT) += btgui
261 obj-$(TCONFIG_BBT) += zlib
262 #obj-$(TCONFIG_BBT) += libiconv
264 obj-$(CONFIG_LINUX26) += hotplug2
265 obj-$(CONFIG_LINUX26) += udevtrigger
267 ifeq ($(TCONFIG_OPENVPN),y)
268 export FULL_OPENSSL := y
269 else
270 ifeq ($(TCONFIG_FTP_SSL),y)
271 export FULL_OPENSSL := y
272 else
273 ifeq ($(TCONFIG_BBT),y)
274 export FULL_OPENSSL := y
275 else
276 ifeq ($(TCONFIG_TOR),y)
277 export FULL_OPENSSL := y
278 else
279 ifeq ($(TCONFIG_TOR),y)
280 export FULL_OPENSSL := y
281 else
282 ifeq ($(TCONFIG_TINC),y)
283 export FULL_OPENSSL := y
284 else
285 FULL_OPENSSL :=
286 endif
287 endif
288 endif
289 endif
290 endif
291 endif
293 obj-y += wanuptime
295 ifeq ($(TCONFIG_IPV6),y)
296 export TCONFIG_IPV6 := y
297 IPTABLES_IPV6_OPT := --enable-ipv6
298 else
299 TCONFIG_IPV6 :=
300 IPTABLES_IPV6_OPT := --disable-ipv6
301 endif
304 # Specify iptables path and target for miniupnpd
305 ifeq ($(TCONFIG_BCMARM),y)
306 IPTABLESPATH=$(TOP)/iptables-1.4.x
307 IPTABLES_TARGET = iptables-1.4.x
308 IPROUTE_TARGET = iproute2-3.x
309 else
310 IPTABLESPATH=$(TOP)/iptables
311 IPTABLES_TARGET = iptables
312 IPROUTE_TARGET = iproute2
313 endif
314 export IPTABLESPATH
315 export IPTABLES_TARGET
316 export IPROUTE_TARGET
318 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
319 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
321 ifeq ($(TCONFIG_BCMARM),y)
322 LINUX_VERSION=2_6_36
323 LINUX_KERNEL=2.6.36
324 export PLATFORM LIBDIR USRLIBDIR LINUX_VERSION
326 ifeq ($(TCONFIG_BCM7),y)
327 export BCMSRC=src-rt-7.x.main/src
329 ifeq ($(TCONFIG_DHDAP),y)
330 export CONFIG_DHDAP=y
331 export CFLAGS += -D__CONFIG_DHDAP__
332 export DHDAP_USE_SEPARATE_CHECKOUTS := 1
333 export SRCBASE_DHD := $(SRCBASE)/../..
334 export SRCBASE_FW := $(SRCBASE)/../../43602/src
335 PCIEFD_TARGETS_LIST := 43602a1-roml
336 ifeq ($(WLTEST),1)
337 PCIEFD_TARGET_NAME := pcie-ag-splitrx-fdap-mbss-mfgtest-seqcmds-phydbg-txbf-pktctx-amsdutx-ampduretry-chkd2hdma
338 else
339 PCIEFD_TARGET_NAME := pcie-ag-splitrx-fdap-mbss-mfp-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus
340 endif
342 PCIEFD_EMBED_HEADER_TEMPLATE := $(SRCBASE_DHD)/shared/rtecdc_router.h.in
343 PCIEFD_EMBED_HEADER := $(SRCBASE_DHD)/shared/rtecdc_router.h
344 obj-pciefd := $(patsubst %,%-obj,$(PCIEFD_TARGETS_LIST))
345 install-pciefd := $(patsubst %,%-install,$(PCIEFD_TARGETS_LIST))
346 endif #dhdap
348 ifeq ($(TCONFIG_GMAC3),y)
349 export CFLAGS += -D__CONFIG_GMAC3__
350 endif
352 else #BCM7
353 export BCMSRC=src-rt-6.x.4708
354 endif #bcm7
356 WLAN_ComponentsInUse := bcmwifi clm ppr olpc
357 include ../makefiles/WLAN_Common.mk
358 export BASEDIR := $(WLAN_TreeBaseA)
359 export EXTRALDFLAGS = -lgcc_s
360 export EXTRALDFLAGS2 = -L$(TOP)/nvram$(BCMEX) -lnvram -L$(TOP)/shared -lshared
362 export LD_LIBRARY_PATH := $(SRCBASE)/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3/lib
363 ifeq (2_6_36,$(LINUX_VERSION))
364 export LINUXDIR := $(SRCBASE)/linux/linux-2.6.36
365 export KBUILD_VERBOSE := 1
366 export BUILD_MFG := 0
367 endif
368 SUBMAKE_SETTINGS = SRCBASE=$(SRCBASE) BASEDIR=$(BASEDIR)
369 SUBMAKE_SETTINGS += ARCH=$(ARCH)
370 export CFLAGS += -O2
371 export OPTCFLAGS = -O2
372 WLCFGDIR=$(SRCBASE)/wl/config
374 export CFLAGS += -D__CONFIG_EMF__
376 ROOT_IMG := target.squashfs
377 CRAMFSDIR := cramfs
379 export MKSYM :=
380 endif
382 ifeq ($(TCONFIG_BCMARM),y)
383 obj-prelibs =$(filter nvram$(BCMEX) libbcmcrypto shared netconf libupnp libz libbcm, $(obj-y))
384 obj-postlibs := $(filter-out $(obj-prelibs), $(obj-y))
385 endif
387 ifeq ($(TCONFIG_BCMWL6), y)
388 include ../../$(SRCBASE)/makefiles/WLAN_Common.mk
389 endif
392 # Basic rules
395 all: clean-build libc $(obj-y) version kernel
397 ifeq ($(TCONFIG_BCMARM),y)
398 version: $(SRCBASE)/include/epivers.h
400 $(SRCBASE)/include/epivers.h:
401 $(MAKE) -C $(SRCBASE)/include
402 ifeq ($(TCONFIG_DHDAP),y)
403 $(MAKE) -C $(SRCBASE_DHD)/include
404 $(MAKE) -C $(SRCBASE_FW)/include
405 endif
406 endif
408 kernel: $(LINUXDIR)/.config
409 @$(SEP)
411 ifneq ($(TCONFIG_BCMARM),y)
412 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
413 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC) $(PARALLEL_BUILD); \
415 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
416 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD); \
418 ifeq ($(CONFIG_LINUX26),y)
419 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR) $(PARALLEL_BUILD)
420 endif
421 else # TCONFIG_BCMARM
422 $(MAKE) compressed-clean #shibby
423 (echo '.NOTPARALLEL:' ; cat ${LINUXDIR}/Makefile) |\
424 $(MAKE) -C ${LINUXDIR} -f - $(SUBMAKE_SETTINGS) zImage
425 +$(MAKE) CONFIG_SQUASHFS=$(CONFIG_SQUASHFS) -C $(SRCBASE)/router/compressed ARCH=$(ARCH)
427 $(if $(shell grep "CONFIG_MODULES=y" ${LINUXDIR}/.config), \
428 (echo '.NOTPARALLEL:' ; cat ${LINUXDIR}/Makefile) | $(MAKE) -C ${LINUXDIR} -f - $(SUBMAKE_SETTINGS) MFG_WAR=1 zImage ; \
429 (echo '.NOTPARALLEL:' ; cat ${LINUXDIR}/Makefile) | $(MAKE) -C ${LINUXDIR} -f - ARCH=$(ARCH) modules)
430 # Preserve the debug versions of these and strip for release
431 $(call STRIP_DEBUG_SYMBOLS,$(LINUXDIR)/vmlinux)
432 $(call STRIP_DEBUG_SYMBOLS,$(LINUXDIR)/drivers/net/wl/wl.ko)
433 $(call STRIP_DEBUG_SYMBOLS,$(LINUXDIR)/drivers/net/et/et.ko)
434 $(call STRIP_DEBUG_SYMBOLS,$(LINUXDIR)/drivers/net/ctf/ctf.ko)
435 $(call STRIP_DEBUG_SYMBOLS,$(LINUXDIR)/drivers/net/bcm57xx/bcm57xx.ko)
436 $(call STRIP_DEBUG_SYMBOLS,$(LINUXDIR)/drivers/net/emf/emf.ko)
437 $(call STRIP_DEBUG_SYMBOLS,$(LINUXDIR)/drivers/net/igs/igs.ko)
438 endif # TCONFIG_BCMARM
440 ifneq ($(TCONFIG_BCMARM),y)
441 lzma-loader:
442 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD) $(PARALLEL_BUILD)
444 lzma-loader-install: lzma-loader
445 @$(SEP)
446 endif
448 kmod: dummy
449 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD)
451 testfind:
452 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
453 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
455 install package: $(obj-install) $(LINUXDIR)/.config
456 @$(SEP)
458 install -d $(TARGETDIR)
461 # kernel modules
462 $(MAKE) -C $(LINUXDIR) modules_install \
463 INSTALL_MOD_STRIP="--strip-debug -x -R .comment -R .note -R .pdr -R .mdebug.abi32 -R .note.gnu.build-id -R .gnu.attributes -R .reginfo" \
464 DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
466 ifneq ($(CONFIG_LINUX26),y)
467 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded -x {} \;
468 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded -x {} \;
469 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded -x {} \;
470 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded -x {} \;
471 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded -x {} \;
472 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded -x {} \;
473 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded -x {} \;
475 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug -x -R .mdebug.abi32 {} \;
476 endif
478 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
480 # nice and clean
481 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
482 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et || true
483 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl || true
484 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
485 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
486 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
487 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
488 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
489 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
490 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
492 ##!!TB
493 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
494 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
495 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
496 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
497 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exfat/* . && rm -rf exfat || true
498 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jfs/* . && rm -rf jfs || true
499 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
500 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
501 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
502 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
503 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
504 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
505 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfs/* . && rm -rf hfs || true
506 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
507 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
508 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
509 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
510 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
511 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
512 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
513 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
514 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
515 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
516 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
517 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
518 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
519 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
520 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
521 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
522 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
523 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
524 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
525 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
526 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
527 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv core/* . && rm -rf core || true
528 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv card/* . && rm -rf card || true
529 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv host/* . && rm -rf host || true
530 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
531 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
532 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
533 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
534 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
535 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
536 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv pwc/* . && rm -rf pwc || true
537 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv gl860/* . && rm -rf gl860 || true
538 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv m5602/* . && rm -rf m5602 || true
539 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv stv06xx/* . && rm -rf stv06xx || true
540 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv gspca/* . && rm -rf gspca || true
541 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
543 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
544 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
545 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
546 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
547 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv usb/* . && rm -rf usb || true
548 cd $(TARGETDIR)/lib/modules && rm -f */source || true
550 # misc
551 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
552 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
553 done
555 ifneq ($(TCONFIG_L7),y)
556 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
557 endif
559 # uClibc
560 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
561 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
562 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
563 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
564 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
565 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
566 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
567 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
568 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
569 ifeq ($(TCONFIG_SSH),y)
570 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
571 endif
572 ifeq ($(TCONFIG_BBT),y)
573 install $(LIBDIR)/librt.so.0 $(TARGETDIR)/lib/librt.so.0
574 endif
575 ifeq ($(TCONFIG_NGINX),y)
576 install $(LIBDIR)/../arm-linux/lib/libstdc++.so.6 $(TARGETDIR)/lib/libstdc++.so.6
577 cd $(TARGETDIR)/lib && ln -sf libstdc++.so.6 libstdc++.so
578 $(STRIP) $(TARGETDIR)/lib/libstdc++.so.6
579 endif
580 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
581 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
582 $(STRIP) $(TARGETDIR)/lib/*.so.0
583 endif
585 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
587 @echo ---
589 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
590 ifneq ($(TCONFIG_BCMARM),y)
591 @$(SRCBASE)/btools/libfoo.pl
592 endif
593 else
594 @$(SRCBASE)/btools/libfoo.pl --noopt
595 endif
596 @chmod 0555 $(TARGETDIR)/lib/*.so*
597 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
599 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
600 # separated/copied extra stuff
601 @rm -rf $(PLATFORMDIR)/extras
602 @mkdir $(PLATFORMDIR)/extras
603 @mkdir $(PLATFORMDIR)/extras/ipsec
604 @mkdir $(PLATFORMDIR)/extras/raid
605 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
606 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/usr/lib/iptables/libipt_policy.*o $(PLATFORMDIR)/extras/ipsec/ || true
608 $(if $(TCONFIG_OPENVPN),@cp -f,$(if $(TCONFIG_USB_EXTRAS),@cp -f,$(if $(TCONFIG_IPV6),@cp -f,@mv))) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/tun.*o $(PLATFORMDIR)/extras/ || true
609 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
611 $(if $(TCONFIG_RAID),@cp -f,@mv) $(TARGETDIR)/usr/sbin/mdadm $(PLATFORMDIR)/extras/raid/ || true
612 $(if $(TCONFIG_RAID),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/md/*.ko $(PLATFORMDIR)/extras/raid/ || true
613 $(if $(TCONFIG_RAID),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/drivers/md || true
615 @cp $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ip_set*o $(PLATFORMDIR)/extras/ || true
616 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
617 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
618 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
619 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
620 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
621 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/jfs.*o $(PLATFORMDIR)/extras/ || true
622 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
623 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
624 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
625 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
626 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
627 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
628 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
629 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
630 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
631 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
633 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
634 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
635 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
636 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
637 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/cdc-acm.*o $(PLATFORMDIR)/extras/ || true
638 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
639 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/cdc_*.*o $(PLATFORMDIR)/extras/ || true
640 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usbnet.*o $(PLATFORMDIR)/extras/ || true
641 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/cdc-wdm.*o $(PLATFORMDIR)/extras/ || true
642 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/qmi_wwan.*o $(PLATFORMDIR)/extras/ || true
643 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
644 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
645 $(if $(NEED_SD_MODULES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc/*.*o $(PLATFORMDIR)/extras/ || true
646 $(if $(NEED_SD_MODULES),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc || true
648 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ch341.*o $(PLATFORMDIR)/extras/ || true
649 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
650 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
651 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
652 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
653 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
654 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
655 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
656 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
657 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
658 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
659 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/rndis_host.*o $(PLATFORMDIR)/extras/ || true
660 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ipheth.*o $(PLATFORMDIR)/extras/ || true
661 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb || true
662 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
663 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
664 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
665 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
666 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
667 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
668 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
669 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
670 $(if $(TCONFIG_UPS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
671 $(if $(TCONFIG_UPS),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
672 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
673 $(if $(TCONFIG_CTF),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ctf*.*o $(PLATFORMDIR)/extras/ || true
674 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
675 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
676 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
677 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/crypto/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
678 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/crypto || true
679 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
680 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm || true
681 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/key/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
682 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/net/key || true
683 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/xfrm*.ko $(PLATFORMDIR)/extras/ipsec/ || true
684 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/tunnel*.ko $(PLATFORMDIR)/extras/ipsec/ || true
685 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ah*.ko $(PLATFORMDIR)/extras/ipsec/ || true
686 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/esp*.ko $(PLATFORMDIR)/extras/ipsec/ || true
687 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ipcomp*.ko $(PLATFORMDIR)/extras/ipsec/ || true
688 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_policy.ko $(PLATFORMDIR)/extras/ipsec/ || true
690 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
691 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
692 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
693 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
694 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
695 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
696 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
698 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
699 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
700 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
701 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
702 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
703 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
704 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
705 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
706 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
707 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
708 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/exfat.*o $(PLATFORMDIR)/extras/ || true
709 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
710 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
711 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfs.*o $(PLATFORMDIR)/extras/ || true
712 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
714 ifneq ($(TCONFIG_USB),y)
715 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
716 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
717 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
718 endif
720 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
721 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
722 ifneq ($(TCONFIG_USB_EXTRAS),y)
723 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
724 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
725 endif
726 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
727 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
728 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
729 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
730 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
731 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
732 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
734 @mkdir -p $(PLATFORMDIR)/extras/apps
735 @mkdir -p $(PLATFORMDIR)/extras/lib
737 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
738 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
739 @cp -r $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
741 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
742 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
743 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
744 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
745 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
746 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
747 ifneq ($(NEED_EX_USB),y)
748 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
749 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
750 endif
751 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
753 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
754 ifeq ($(TCONFIG_L7PAT),y)
755 @cd layer7 && ./squish.sh
756 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
757 endif
759 ifeq ($(TCONFIG_PPTPD),y)
760 @mkdir -p $(TARGETDIR)/rom/etc/vpn
761 cp rc/vpn/* $(TARGETDIR)/rom/etc/vpn
762 chmod +x $(TARGETDIR)/rom/etc/vpn/*
763 endif
765 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
766 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
767 @echo ---
769 @rm -f $(TARGETDIR)/lib/modules/*/build
771 image:
772 ifneq ($(TCONFIG_BCMARM),y)
773 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
774 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -no-duplicates | tee target.info
775 else
776 $(MAKE) -C squashfs-4.2 mksquashfs
777 squashfs-4.2/mksquashfs $(TARGETDIR) $(PLATFORMDIR)/$(ROOT_IMG) -noappend -all-root
778 endif
781 libc: $(LIBDIR)/ld-uClibc.so.0
782 # $(MAKE) -C ../../../tools-src/uClibc all
783 # $(MAKE) -C ../../../tools-src/uClibc install
787 # cleaners
790 clean: clean-build $(obj-clean)
791 rm -rf layer7/squished
792 rm -f .ipv6-y .ipv6-n
793 rm -f .fullssl-y .fullssl-n
794 make -C config clean
796 clean-build: dummy
797 rm -rf $(TARGETDIR)
798 rm -rf $(INSTALLDIR)
799 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
800 rm -rf $(PLATFORMDIR)/extras
802 distclean: clean
803 ifneq ($(INSIDE_MAK),1)
804 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
805 endif
806 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
809 # configuration
812 CONFIG_IN := config/config.in
814 config/conf config/mconf:
815 @$(MAKE) -C config
817 rconf: config/conf
818 @config/conf $(CONFIG_IN)
820 rmconf: config/mconf
821 @config/mconf $(CONFIG_IN)
823 roldconf: config/conf
824 config/conf -o $(CONFIG_IN)
825 $(MAKE) shared-clean libdisk-clean rc-clean nvram$(BCMEX)-clean httpd-clean prebuilt-clean libbcmcrypto-clean
826 $(MAKE) dnsmasq-clean iproute2-clean
827 ifeq ($(TCONFIG_BCMARM),y)
828 $(MAKE) compressed-clean
829 endif
830 ifeq ($(TCONFIG_DHDAP),y)
831 ifeq ($(TCONFIG_BCM7),y)
832 ifneq ($(wildcard $(SRCBASE_FW)/wl/sys),)
833 ifeq ($(wildcard /opt/hndtools-armeabi-2011.09),)
834 # build 43602 src and to match its path
835 sudo rm -rf /opt/hndtools-armeabi-2011.09
836 sudo ln -sf $(SRCBASE)/toolchains/hndtools-armeabi-2011.09 /opt/hndtools-armeabi-2011.09
837 endif
838 endif
839 endif
840 endif
843 kconf:
844 @$(MAKE) -C $(LINUXDIR) config
846 kmconf:
847 @$(MAKE) -C $(LINUXDIR) menuconfig
849 koldconf:
850 @$(MAKE) -C $(LINUXDIR) oldconfig
851 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
853 bboldconf:
854 @$(MAKE) -C busybox oldconfig
856 config conf: rconf kconf
858 menuconfig mconf: rmconf kmconf
860 .ipv6-y .ipv6-n:
861 @rm -f .ipv6-y .ipv6-n
862 @$(MAKE) $(IPTABLES_TARGET)-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean $(IPROUTE_TARGET)-clean
863 @touch $@
865 .fullssl-y .fullssl-n:
866 @rm -f .fullssl-y .fullssl-n
867 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
868 @touch $@
870 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
872 oldconfig oldconf: koldconf roldconf dependconf bboldconf
876 # overrides and extra dependencies
879 ifeq ($(TCONFIG_BCM7),y)
880 $(obj-pciefd) :
881 # Build PCIEFD firmware only if it is not prebuilt
882 ifeq ($(TCONFIG_DHDAP),y)
883 ifneq ($(wildcard $(SRCBASE_FW)/wl/sys),)
884 +$(MAKE) CROSS_COMPILE=arm-none-eabi -C $(SRCBASE_FW)/dongle/rte/wl $(patsubst %-obj,%,$@)/$(PCIEFD_TARGET_NAME)
885 if [ -f $(SRCBASE_FW)/dongle/rte/wl/builds/$(patsubst %-obj,%,$@)/$(PCIEFD_TARGET_NAME)/rtecdc_$(patsubst %-roml-obj,%,$@).h ]; then \
886 cp $(SRCBASE_FW)/dongle/rte/wl/builds/$(patsubst %-obj,%,$@)/$(PCIEFD_TARGET_NAME)/rtecdc_$(patsubst %-roml-obj,%,$@).h $(SRCBASE_DHD)/shared/rtecdc_$(patsubst %-roml-obj,%,$@).h && \
887 echo "#include <rtecdc_$(patsubst %-roml-obj,%,$@).h>" >> $(PCIEFD_EMBED_HEADER); \
889 if [ -f $(SRCBASE_FW)/dongle/rte/wl/builds/$(patsubst %-obj,%,$@)/$(PCIEFD_TARGET_NAME)/rtecdc_$(patsubst %-ram-obj,%,$@).h ]; then \
890 cp $(SRCBASE_FW)/dongle/rte/wl/builds/$(patsubst %-obj,%,$@)/$(PCIEFD_TARGET_NAME)/rtecdc_$(patsubst %-ram-obj,%,$@).h $(SRCBASE_DHD)/shared/rtecdc_$(patsubst %-ram-obj,%,$@).h && \
891 echo "#include <rtecdc_$(patsubst %-ram-obj,%,$@).h>" >> $(PCIEFD_EMBED_HEADER); \
893 if [ -f $(SRCBASE_FW)/dongle/rte/wl/builds/$(patsubst %-obj,%,$@)/$(PCIEFD_TARGET_NAME)/wlc_clm_data.c ]; then \
894 cp $(SRCBASE_FW)/dongle/rte/wl/builds/$(patsubst %-obj,%,$@)/$(PCIEFD_TARGET_NAME)/wlc_clm_data.c $(SRCBASE_FW)/wl/clm/src/wlc_clm_data.c.GEN && \
895 cp $(SRCBASE_FW)/dongle/rte/wl/builds/$(patsubst %-obj,%,$@)/$(PCIEFD_TARGET_NAME)/wlc_clm_data_inc.c $(SRCBASE_FW)/wl/clm/src/wlc_clm_data_inc.c.GEN; \
897 endif
898 endif
900 pciefd-cleangen: pciefd-clean
901 # Clean PCIEFD firmware only if it is not prebuilt
902 ifeq ($(TCONFIG_DHDAP),y)
903 ifneq ($(wildcard $(SRCBASE_FW)/wl/sys),)
904 rm -f $(PCIEFD_EMBED_HEADER)
905 cp -f $(PCIEFD_EMBED_HEADER_TEMPLATE) $(PCIEFD_EMBED_HEADER)
906 endif
907 endif
909 pciefd: pciefd-cleangen $(obj-pciefd)
911 pciefd-clean :
912 ifeq ($(TCONFIG_DHDAP),y)
913 ifneq ($(wildcard $(SRCBASE_FW)/wl/sys),)
914 +$(MAKE) CROSS_COMPILE=arm-none-eabi -C $(SRCBASE_FW)/dongle/rte/wl clean
915 rm -f $(SRCBASE_DHD)/shared/rtecdc*.h
916 endif
917 endif
919 pciefd-install :
920 # Nothing to be done here
921 @true
922 endif # BCM7
924 ifeq ($(TCONFIG_DHDAP),y)
925 dhd:
926 @true
927 ifneq ($(wildcard $(SRCBASE_DHD)/dhd/exe),)
928 -$(MAKE) TARGET_PREFIX=$(CROSS_COMPILE) -C $(SRCBASE_DHD)/dhd/exe
929 endif
931 dhd-clean:
932 ifneq ($(wildcard $(SRCBASE_DHD)/dhd/exe),)
933 -$(MAKE) TARGET_PREFIX=$(CROSS_COMPILE) -C $(SRCBASE_DHD)/dhd/exe clean
934 rm -f $(INSTALLDIR)/dhd/usr/sbin/dhd
935 cd $(SRCBASE_DHD)/dhd/exe && rm -f `find ./ -name "*.cmd" && find ./ -name "*.o"`
936 endif
938 dhd-install:
939 ifneq ($(wildcard $(SRCBASE_DHD)/dhd/exe),)
940 install -d $(INSTALLDIR)/dhd/usr/sbin
941 install $(SRCBASE_DHD)/dhd/exe/dhd $(INSTALLDIR)/dhd/usr/sbin/dhd
942 $(STRIP) $(INSTALLDIR)/dhd/usr/sbin/dhd
943 endif
944 endif
946 busybox: dummy
947 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" $(PARALLEL_BUILD)
949 busybox-install:
950 rm -rf $(INSTALLDIR)/busybox
951 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
953 busybox-clean:
954 -@$(MAKE) -C busybox distclean
956 busybox-config:
957 $(MAKE) -C busybox menuconfig
960 httpd: shared nvram$(BCMEX) mssl
961 @$(SEP)
962 @$(MAKE) -C httpd
964 www-install:
965 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
967 matrixssl:
968 @$(SEP)
969 @$(MAKE) -C matrixssl/src
971 matrixssl-install:
972 @true
974 matrixssl-clean:
975 -@$(MAKE) -C matrixssl/src clean
977 cyassl/stamp-h1:
978 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
979 CFLAGS="-Os -Wall -fPIC $(EXTRACFLAGS) -ffunction-sections -fdata-sections \
980 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
981 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
982 PTHREAD_LIBS="-lpthread" \
983 $(CONFIGURE)
984 @touch cyassl/stamp-h1
986 cyassl: cyassl/stamp-h1
987 @$(SEP)
988 @$(MAKE) -C cyassl
990 cyassl-clean:
991 -@$(MAKE) -C cyassl clean
992 @rm -f cyassl/stamp-h1
994 cyassl-install:
995 @true
997 ifeq ($(FULL_OPENSSL),y)
998 OPENSSL_CIPHERS:=enable-rc5
999 else
1000 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-engine no-aes192 no-cast
1001 endif
1003 openssl/stamp-h1:
1004 cd openssl && \
1005 ./Configure $(HOSTCONFIG) --openssldir=/etc --cross-compile-prefix=' ' \
1006 -ffunction-sections -fdata-sections -Wl,--gc-sections \
1007 shared $(OPENSSL_CIPHERS) \
1008 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
1009 no-seed no-capieng no-gms no-gmp no-rfc3779 \
1010 no-err no-hw no-jpake \
1011 no-zlib no-engines no-sse2 no-libunbound no-ssl-trace \
1012 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
1014 @$(MAKE) -C openssl clean
1015 @touch openssl/stamp-h1
1017 openssl: openssl/stamp-h1
1019 openssl-clean:
1020 -@$(MAKE) -C openssl clean
1021 @rm -f openssl/stamp-h1
1023 openssl-install: openssl
1024 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
1025 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
1026 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
1028 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
1029 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
1030 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
1032 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
1034 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
1035 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
1037 #ifeq ($(FULL_OPENSSL),y)
1038 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
1039 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
1040 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
1041 #endif
1043 mssl: openssl
1045 mdu: shared mssl
1047 rc: nvram$(BCMEX) shared
1050 eapd$(BCMEX)-clean:
1051 -@cd eapd$(BCMEX)/linux && make clean
1054 bridge/Makefile:
1055 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
1056 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
1058 bridge: bridge/Makefile
1059 @$(SEP)
1060 @$(MAKE) -C bridge
1062 bridge-clean:
1063 -@$(MAKE) -C bridge clean
1064 @rm -f bridge/Makefile
1066 bridge-install:
1067 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
1068 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
1070 dnsmasq: $(if $(TCONFIG_DNSSEC),nettle,)
1071 @$(SEP)
1072 @$(MAKE) -C dnsmasq $(PARALLEL_BUILD) \
1073 COPTS="$(if $(TCONFIG_DNSSEC),-I$(TOP)/nettle/include -I$(TOP)/gmp -DHAVE_DNSSEC -DHAVE_DNSSEC_STATIC,) \
1074 $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6) \
1075 $(if $(CONFIG_LINUX26),-DUSE_IPSET,-DNO_IPSET) \
1076 -DHAVE_BROKEN_RTC -DHAVE_TOMATO $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1077 LDFLAGS="$(if $(TCONFIG_DNSSEC),-L$(TOP)/nettle/lib -L$(TOP)/gmp/.libs,) -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1078 $(if $(TCONFIG_DNSSEC),PKG_CONFIG_PATH="$(TOP)/nettle/lib/pkgconfig",)
1080 dnsmasq-install:
1081 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
1082 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
1084 nettle/stamp-h1: gmp
1085 @cd nettle && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1086 CPPFLAGS="-I$(TOP)/gmp" \
1087 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1088 LDFLAGS="-L$(TOP)/gmp/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1089 $(CONFIGURE) prefix=$(TOP)/nettle --disable-documentation
1090 @touch nettle/stamp-h1
1092 nettle: nettle/stamp-h1
1093 @$(SEP)
1094 @$(MAKE) -C nettle
1095 @$(MAKE) -C nettle install
1097 nettle-clean:
1098 -@$(MAKE) -C nettle clean
1099 @rm -f nettle/stamp-h1
1100 @rm -rf nettle/include nettle/lib nettle/bin nettle/share
1102 gmp/stamp-h1:
1103 @cd gmp && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1104 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1105 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1106 $(CONFIGURE)
1107 @touch gmp/stamp-h1
1109 gmp: gmp/stamp-h1
1110 @$(SEP)
1111 @$(MAKE) -C gmp
1113 gmp-clean:
1114 @$(MAKE) -C gmp clean
1115 @rm -f gmp/stamp-h1
1117 iptables:
1118 ifeq ($(CONFIG_LINUX26),y)
1119 cp -f iptables/extensions/libipt_ipp2p_K26.c iptables/extensions/libipt_ipp2p.c
1120 else
1121 cp -f iptables/extensions/libipt_ipp2p_K24.c iptables/extensions/libipt_ipp2p.c
1122 endif
1123 @$(SEP)
1124 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE"
1126 iptables-install:
1127 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
1128 cd $(INSTALLDIR)/iptables/usr/sbin && \
1129 ln -sf iptables iptables-restore && \
1130 ln -sf iptables iptables-save
1132 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
1133 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
1135 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
1137 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
1138 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
1139 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
1141 ifeq ($(TCONFIG_IPV6),y)
1142 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
1143 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
1144 cd $(INSTALLDIR)/iptables/usr/sbin && \
1145 ln -sf ip6tables ip6tables-restore && \
1146 ln -sf ip6tables ip6tables-save
1147 endif
1149 iptables-clean:
1150 -@$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
1152 iptables-1.4.x: iptables-1.4.x/Makefile libnfnetlink
1153 @$(SEP)
1154 $(MAKE) -C $@ KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE" \
1155 CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/libnfnetlink/include" \
1156 LDFLAGS="-L$(TOP)/libnfnetlink/src/.libs -lnfnetlink"
1158 iptables-1.4.x/Makefile: iptables-1.4.x/configure
1159 $(MAKE) iptables-1.4.x-configure
1161 iptables-1.4.x/configure:
1162 ( cd iptables-1.4.x ; ./autogen.sh )
1164 iptables-1.4.x-configure:
1165 ( cd iptables-1.4.x ; \
1166 $(CONFIGURE) \
1167 --prefix=/usr \
1168 --bindir=/usr/sbin \
1169 --libdir=/usr/lib \
1170 $(IPTABLES_IPV6_OPT) \
1171 --with-kernel=$(LINUXDIR) \
1174 iptables-1.4.x-install:
1175 install -D iptables-1.4.x/iptables/.libs/xtables-multi $(INSTALLDIR)/iptables-1.4.x/usr/sbin/xtables-multi
1176 cd $(INSTALLDIR)/iptables-1.4.x/usr/sbin && \
1177 ln -sf xtables-multi iptables-restore && \
1178 ln -sf xtables-multi iptables
1179 install -d $(INSTALLDIR)/iptables-1.4.x/usr/lib/xtables
1180 install -D iptables-1.4.x/libiptc/.libs/lib*.so $(INSTALLDIR)/iptables-1.4.x/usr/lib/
1181 cd $(INSTALLDIR)/iptables-1.4.x/usr/lib && \
1182 ln -sf libip4tc.so libip4tc.so.0 && \
1183 ln -sf libip4tc.so libip4tc.so.0.0.0 && \
1184 ln -sf libip6tc.so libip6tc.so.0 && \
1185 ln -sf libip6tc.so libip6tc.so.0.0.0 && \
1186 ln -sf libiptc.so libiptc.so.0 && \
1187 ln -sf libiptc.so libiptc.so.0.0.0
1188 install -D iptables-1.4.x/libxtables/.libs/lib*.so $(INSTALLDIR)/iptables-1.4.x/usr/lib/
1189 cd $(INSTALLDIR)/iptables-1.4.x/usr/lib && \
1190 ln -sf libxtables.so libxtables.so.7 && \
1191 ln -sf libxtables.so libxtables.so.7.0.0
1192 install -D iptables-1.4.x/extensions/*.so $(INSTALLDIR)/iptables-1.4.x/usr/lib/xtables
1194 ifeq ($(TCONFIG_IPV6),y)
1195 cd $(INSTALLDIR)/iptables-1.4.x/usr/sbin && \
1196 ln -sf xtables-multi ip6tables-restore && \
1197 ln -sf xtables-multi ip6tables
1198 endif
1200 $(STRIP) $(INSTALLDIR)/iptables-1.4.x/usr/sbin/xtables-multi
1201 $(STRIP) $(INSTALLDIR)/iptables-1.4.x/usr/lib/*.so*
1202 $(STRIP) $(INSTALLDIR)/iptables-1.4.x/usr/lib/xtables/*.so*
1204 iptables-1.4.x-clean:
1205 [ ! -f iptables-1.4.x/Makefile ] || $(MAKE) -C iptables-1.4.x KERNEL_DIR=$(LINUXDIR) distclean
1207 ppp:
1208 @$(SEP)
1209 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,) $(PARALLEL_BUILD)
1210 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
1212 ppp-%:
1213 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
1215 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
1216 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
1217 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
1218 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
1219 @touch rp-pppoe/src/stamp-h1
1221 rp-pppoe: pppd rp-pppoe/src/stamp-h1
1222 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so $(PARALLEL_BUILD)
1224 rp-pppoe-clean:
1225 -@$(MAKE) -C rp-pppoe/src clean
1226 @rm -f rp-pppoe/src/pppoe-relay
1227 @rm -f rp-pppoe/src/stamp-h1
1229 rp-pppoe-install: rp-pppoe
1230 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
1231 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
1232 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
1233 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
1236 upnp: nvram$(BCMEX) shared iptables
1239 libnfnetlink/stamp-h1:
1240 # tomatoraf.com, Victek
1241 # last sources is dated March 22,2014 from netfilter.org git
1242 # ./genconfig.sh and make with automake 1.13
1243 cd $(TOP)/libnfnetlink && CC=$(CC) STRIP=$(STRIP) \
1244 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1245 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1246 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
1247 touch libnfnetlink/stamp-h1
1249 libnfnetlink: libnfnetlink/stamp-h1
1250 @$(SEP)
1251 $(MAKE) -C libnfnetlink
1253 libnfnetlink-install:
1254 install -D libnfnetlink/src/.libs/libnfnetlink.so.0.2.0 $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
1255 $(STRIP) -s $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
1256 cd $(INSTALLDIR)/libnfnetlink/usr/lib/ && \
1257 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so.0 && \
1258 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so
1260 miniupnpd-config:
1261 @cd miniupnpd && ./genconfig.sh --leasefile --vendorcfg
1263 miniupnpd: $(IPTABLES_TARGET) miniupnpd-config
1264 @$(SEP)
1265 $(MAKE) -C miniupnpd -f Makefile.linux
1267 miniupnpd-clean:
1268 -@$(MAKE) -C miniupnpd -f Makefile.linux clean
1269 @rm -f miniupnpd/config.h
1271 miniupnpd-install:
1272 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
1273 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
1275 # !!TB
1276 shared: busybox
1278 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
1279 @$(SEP)
1280 $(MAKE) -C vsftpd $(PARALLEL_BUILD)
1282 vsftpd-install: vsftpd
1283 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
1284 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
1286 ufsd-asus: kernel_header kernel
1287 @$(MAKE) -C ufsd-asus all
1289 ufsd-asus-install: ufsd-asus
1290 @$(MAKE) -C ufsd-asus install INSTALLDIR=$(INSTALLDIR)/ufsd-asus
1292 ufsd-netgear-install:
1293 @$(MAKE) -C ufsd-netgear install INSTALLDIR=$(INSTALLDIR)/ufsd-netgear
1295 ntfs-3g/Makefile:
1296 cd ntfs-3g && \
1297 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1298 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1299 $(CONFIGURE) --enable-shared=no --enable-static=no \
1300 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
1301 --disable-ntfsprogs --disable-crypto --without-uuid \
1302 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
1304 ntfs-3g: ntfs-3g/Makefile
1305 @$(MAKE) -C ntfs-3g $(PARALLEL_BUILD)
1307 ntfs-3g-clean:
1308 -@$(MAKE) -C ntfs-3g clean
1309 @rm -f ntfs-3g/Makefile
1311 ntfs-3g-install: ntfs-3g
1312 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
1313 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
1314 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
1315 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
1316 ln -sf ../bin/ntfs-3g mount.ntfs
1318 libusb10/Makefile: libusb10/Makefile.in
1319 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
1320 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
1322 libusb10: libusb10/Makefile
1323 $(MAKE) -C $@
1325 libusb10-install: libusb10
1326 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
1327 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
1328 cd $(INSTALLDIR)/libusb10/usr/lib && \
1329 ln -sf libusb-1.0.so libusb-1.0.so.0
1331 libusb10-clean:
1332 -@$(MAKE) -C $@ clean
1333 @rm -rf libusb10/Makefile
1335 libusb/Makefile: libusb/Makefile.in
1336 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
1337 $(CONFIGURE) --prefix=/usr \
1338 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
1339 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
1340 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
1342 libusb: libusb10 libusb/Makefile
1343 $(MAKE) -C $@
1345 libusb-install: libusb
1346 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
1347 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
1349 libusb-clean:
1350 -@$(MAKE) -C $@ clean
1351 @rm -rf libusb/Makefile
1353 usbmodeswitch: libusb10
1354 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
1355 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
1356 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
1358 usbmodeswitchdb-install:
1359 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
1360 # compress whitespace
1361 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
1362 F=`basename $$D`; \
1363 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
1364 done
1366 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
1367 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
1368 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
1369 @mkdir -p $(TARGETDIR)/rom/etc
1370 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
1372 dhcpv6/stamp-h1:
1373 @cd dhcpv6 && \
1374 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections -DUSE_DHCP6SRV" \
1375 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1376 ac_cv_func_setpgrp_void=yes \
1377 $(CONFIGURE) --prefix= --with-localdbdir=/var
1378 -@$(MAKE) -C dhcpv6 clean
1379 @touch $@
1381 dhcpv6: dhcpv6/stamp-h1
1382 @$(SEP)
1383 @$(MAKE) -C dhcpv6 dhcp6c
1385 dhcpv6-install: dhcpv6
1386 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
1387 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
1389 dhcpv6-clean:
1390 -@$(MAKE) -C dhcpv6 clean
1391 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
1394 p910nd:
1395 samba:
1396 samba3:
1398 samba-3.5.8:
1399 @$(MAKE) -C samba-3.5.8 $(PARALLEL_BUILD)
1401 nvram_arm: shared
1403 prebuilt: shared libbcmcrypto
1405 vlan:
1406 @$(SEP)
1407 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
1409 vlan-install:
1410 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
1411 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
1414 pptp-client-install:
1415 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1416 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1419 accel-pptp: pppd accel-pptp/Makefile
1420 @$(MAKE) -C accel-pptp
1422 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
1423 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS) $(if $(TCONFIG_VPNC), -DTCONFIG_VPNC,)" \
1424 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
1426 accel-pptp-clean:
1427 -@$(MAKE) -C accel-pptp clean
1428 @rm -f accel-pptp/Makefile
1430 accel-pptp-install: accel-pptp
1431 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
1432 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
1434 pptpd/stamp-h1:
1435 cd pptpd && $(CONFIGURE) --prefix=$(INSTALLDIR)/pptpd --enable-bcrelay \
1436 CC=$(CC) RANLIB=$(RANLIB) LD=$(LD) STRIP=$(STRIP)
1437 touch pptpd/stamp-h1
1439 pptpd: pptpd/stamp-h1
1441 pptpd-install: pptpd
1442 @echo pptpd
1443 @install -D pptpd/pptpd $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1444 @install -D pptpd/bcrelay $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1445 @install -D pptpd/pptpctrl $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1446 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1447 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1448 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1450 pptpd-clean:
1451 -@$(MAKE) -C pptpd clean
1452 rm -rf pptpd/stamp-h1 pptpd/.deps
1454 pppd/Makefile: pppd/linux/Makefile.top
1455 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
1457 pppd: pppd/Makefile
1458 @$(SEP)
1459 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
1461 pppd-clean:
1462 -@$(MAKE) -C pppd clean
1463 @rm -f pppd/Makefile
1465 pppd-install: pppd
1466 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
1467 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
1468 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
1469 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
1470 ifeq ($(TCONFIG_L2TP),y)
1471 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
1472 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
1473 endif
1475 # ipupdate-install:
1476 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1477 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1479 zebra/stamp-h1:
1480 @cd zebra && rm -f config.cache && \
1481 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1482 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1483 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1484 $(CONFIGURE) --sysconfdir=/etc \
1485 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
1486 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
1487 @touch zebra/stamp-h1
1489 zebra: zebra/stamp-h1
1490 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
1492 zebra-clean:
1493 -@$(MAKE) -C zebra clean
1494 @rm -f zebra/stamp-h1
1496 zebra-install: zebra
1497 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
1498 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
1499 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1500 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
1501 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
1502 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1505 rp-l2tp-install:
1506 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1507 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1508 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
1509 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1510 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1511 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1512 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1514 xl2tpd: pppd
1515 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
1517 xl2tpd-install: xl2tpd
1518 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1519 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1522 bpalogin-install:
1523 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1524 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1527 # libnet:
1528 # @$(SEP)
1529 # @-mkdir -p libnet/lib
1530 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1532 # libpcap:
1533 # @$(SEP)
1534 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1536 libbcm:
1537 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
1539 libbcm-install:
1540 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1541 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1544 iproute2:
1545 @$(SEP)
1546 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1548 iproute2-install: iproute2
1549 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1550 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1551 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1552 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1554 iproute2-3.x: kernel_header iptables-1.4.x
1555 @$(SEP)
1556 @$(MAKE) -C $@ IPTABLES_DIR=$(TOP)/iptables-1.4.x KERNEL_INCLUDE=$(TOP)/kernel_header/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1558 iproute2-3.x-install: iproute2-3.x
1559 install -D iproute2-3.x/tc/tc $(INSTALLDIR)/iproute2-3.x/usr/sbin/tc
1560 $(STRIP) $(INSTALLDIR)/iproute2-3.x/usr/sbin/tc
1561 install -D iproute2-3.x/ip/ip $(INSTALLDIR)/iproute2-3.x/usr/sbin/ip
1562 $(STRIP) $(INSTALLDIR)/iproute2-3.x/usr/sbin/ip
1563 @if [ -e iproute2-3.x/tc/m_xt.so ] ; then \
1564 install -D iproute2-3.x/tc/m_xt.so $(INSTALLDIR)/iproute2-3.x/usr/lib/tc/m_xt.so ; \
1565 ln -sf m_xt.so $(INSTALLDIR)/iproute2-3.x/usr/lib/tc/m_ipt.so ; \
1566 $(STRIP) $(INSTALLDIR)/iproute2-3.x/usr/lib/tc/*.so ; \
1569 iproute2-3.x-clean:
1570 -@$(MAKE) -C iproute2-3.x clean
1571 -rm -f iproute2-3.x/Config
1574 ntpclient: nvram$(BCMEX) shared
1576 ntpc: nvram$(BCMEX) shared
1578 dropbear: dropbear/config.h
1579 @$(SEP)
1580 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1 $(PARALLEL_BUILD)
1582 dropbear-install:
1583 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1584 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1585 cd $(INSTALLDIR)/dropbear/usr/bin && \
1586 ln -sf dropbearmulti dropbear && \
1587 ln -sf dropbearmulti dropbearconvert && \
1588 ln -sf dropbearmulti dropbearkey && \
1589 ln -sf dropbearmulti dbclient && \
1590 ln -sf dropbearmulti ssh && \
1591 ln -sf dropbearmulti scp
1593 dropbear-clean:
1594 -@$(MAKE) -C dropbear clean
1595 @rm -f dropbear/config.h
1597 dropbear/config.h:
1598 cd dropbear && \
1599 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1600 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1601 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1602 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1603 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1604 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty --enable-bundled-libtom
1605 @$(MAKE) -C dropbear clean
1607 # Media libraries
1609 sqlite/stamp-h1:
1610 cd sqlite && \
1611 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1612 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1613 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1614 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1615 touch sqlite/stamp-h1
1617 sqlite: sqlite/stamp-h1
1618 @$(MAKE) -C sqlite all $(PARALLEL_BUILD)
1620 sqlite-clean:
1621 -@$(MAKE) -C sqlite clean
1622 @rm -f sqlite/stamp-h1
1624 sqlite-install: sqlite
1625 @$(SEP)
1626 ifeq ($(TCONFIG_NGINX),y)
1627 install -D sqlite/.libs/libsqlite3.so.0.8.6 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0.8.6
1628 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0.8.6
1629 cd $(INSTALLDIR)/sqlite/usr/lib/ && \
1630 ln -sf libsqlite3.so.0.8.6 libsqlite3.so.0 && \
1631 ln -sf libsqlite3.so.0.8.6 libsqlite3.so
1632 endif
1634 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1636 FFMPEG_DECODERS:=aac ac3 atrac3 flac h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1637 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1639 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1640 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1642 FFMPEG_PROTOCOLS:=file
1643 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1645 FFMPEG_DISABLED_DEMUXERS:=amr apc ape ass bethsoftvid bfi c93 daud dnxhd dsicin dxa ffm gsm gxf idcin iff image2 image2pipe ingenient ipmovie lmlm4 mm mmf msnwc_tcp mtv mxf nsv nut oma pva rawvideo rl2 roq rpl segafilm shorten siff smacker sol str thp tiertexseq tta txd vmd voc wc3 wsaud wsvqa xa yuv4mpegpipe
1646 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1648 ffmpeg/stamp-h1: zlib
1649 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1650 ./configure --enable-cross-compile --arch=$(ARCH) --target_os=linux \
1651 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1652 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1653 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1654 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1655 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1656 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1657 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1658 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1659 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1660 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1661 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1662 --extra-libs="-L$(TOP)/zlib -lz" \
1663 --enable-zlib --disable-debug --prefix=''
1664 touch ffmpeg/stamp-h1
1666 ffmpeg: ffmpeg/stamp-h1 zlib
1667 @$(MAKE) -C ffmpeg all $(PARALLEL_BUILD)
1669 ffmpeg-clean:
1670 -@$(MAKE) -C ffmpeg clean
1671 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1673 ffmpeg-install: ffmpeg
1674 @$(SEP)
1675 ifneq ($(MEDIA_SERVER_STATIC),y)
1676 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1677 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1678 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1679 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1680 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1681 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1682 endif
1684 libogg/stamp-h1:
1685 cd libogg && \
1686 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1687 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1688 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1689 touch libogg/stamp-h1
1691 libogg: libogg/stamp-h1
1692 @$(MAKE) -C libogg all $(PARALLEL_BUILD)
1694 libogg-clean:
1695 -@$(MAKE) -C libogg clean
1696 @rm -f libogg/stamp-h1
1698 libogg-install: libogg
1699 @$(SEP)
1700 ifneq ($(MEDIA_SERVER_STATIC),y)
1701 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1702 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1703 endif
1705 flac/stamp-h1: libogg
1706 cd flac && \
1707 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1708 CPPFLAGS="-I$(TOP)/libogg/include -I$(LINUXDIR)/include" \
1709 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1710 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1711 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1712 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1713 touch flac/stamp-h1
1715 flac: flac/stamp-h1 libogg
1716 @$(MAKE) -C flac/src/libFLAC all $(PARALLEL_BUILD)
1718 flac-clean:
1719 -@$(MAKE) -C flac clean
1720 @rm -f flac/stamp-h1
1722 flac-install: flac
1723 @$(SEP)
1724 ifneq ($(MEDIA_SERVER_STATIC),y)
1725 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1726 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1727 endif
1729 jpeg/stamp-h1:
1730 cd jpeg && \
1731 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1732 touch jpeg/stamp-h1
1734 jpeg: jpeg/stamp-h1
1735 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so $(PARALLEL_BUILD)
1736 install -d $(TOP)/jpeg/staged/include
1737 install -d $(TOP)/jpeg/staged/lib
1738 install -d $(TOP)/jpeg/staged/bin
1739 install -d $(TOP)/jpeg/staged/man/man1
1740 @$(MAKE) -C jpeg LIBTOOL="" prefix=$(TOP)/jpeg/staged install
1741 install -D jpeg/libjpeg.so $(TOP)/jpeg/staged/lib/libjpeg.so
1742 rm -f $(TOP)/jpeg/staged/lib/libjpeg.la
1744 jpeg-clean:
1745 -@$(MAKE) -C jpeg clean
1746 @rm -f jpeg/stamp-h1 jpeg/Makefile
1747 @rm -rf jpeg/staged
1749 jpeg-install: jpeg
1750 @$(SEP)
1751 ifneq ($(MEDIA_SERVER_STATIC),y)
1752 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1753 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1754 endif
1755 ifeq ($(TCONFIG_NGINX),y)
1756 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1757 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1758 endif
1760 libexif/stamp-h1:
1761 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1762 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1763 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1764 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1765 touch libexif/stamp-h1
1767 libexif: libexif/stamp-h1
1768 @$(MAKE) -C libexif all
1770 libexif-clean:
1771 -@$(MAKE) -C libexif clean
1772 @rm -f libexif/stamp-h1
1774 libexif-install: libexif
1775 @$(SEP)
1776 ifneq ($(MEDIA_SERVER_STATIC),y)
1777 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1778 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1779 endif
1781 zlib/stamp-h1:
1782 cd zlib && \
1783 CC=$(CC) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC" LDSHAREDLIBC="$(EXTRALDFLAGS)" \
1784 ./configure --shared --prefix=/usr --libdir=/usr/lib
1785 touch zlib/stamp-h1
1787 zlib: zlib/stamp-h1
1788 @$(MAKE) -C zlib all
1789 @$(MAKE) -C zlib DESTDIR=$(TOP)/zlib/staged install
1791 zlib-clean:
1792 -@$(MAKE) -C zlib clean
1793 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1794 @rm -rf zlib/staged
1796 zlib-install: zlib
1797 @$(SEP)
1798 ifneq ($(MEDIA_SERVER_STATIC),y)
1799 install -d $(INSTALLDIR)/zlib/usr/lib
1800 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1801 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1802 endif
1803 ifeq ($(TCONFIG_BT),y)
1804 install -d $(INSTALLDIR)/zlib/usr/lib
1805 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1806 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1807 endif
1808 ifeq ($(TCONFIG_TOR),y)
1809 install -d $(INSTALLDIR)/zlib/usr/lib
1810 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1811 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1812 endif
1813 ifeq ($(TCONFIG_SNMP),y)
1814 install -d $(INSTALLDIR)/zlib/usr/lib
1815 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1816 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1817 endif
1819 libid3tag/stamp-h1: zlib
1820 cd libid3tag && \
1821 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1822 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1823 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1824 --disable-debugging --disable-profiling
1825 touch libid3tag/stamp-h1
1827 libid3tag: libid3tag/stamp-h1 zlib
1828 @$(MAKE) -C libid3tag all $(PARALLEL_BUILD)
1830 libid3tag-clean:
1831 -@$(MAKE) -C libid3tag clean
1832 @rm -f libid3tag/stamp-h1
1834 libid3tag-install: libid3tag
1835 @$(SEP)
1836 ifneq ($(MEDIA_SERVER_STATIC),y)
1837 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1838 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1839 endif
1841 libvorbis/stamp-h1: libogg
1842 cd libvorbis && \
1843 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1844 CPPFLAGS="-I$(TOP)/libogg/include" \
1845 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1846 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1847 --with-ogg-includes="$(TOP)/libogg/include" \
1848 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1849 touch libvorbis/stamp-h1
1851 libvorbis: libvorbis/stamp-h1
1852 @$(MAKE) -C libvorbis/lib all $(PARALLEL_BUILD)
1854 libvorbis-clean:
1855 -@$(MAKE) -C libvorbis clean
1856 @rm -f libvorbis/stamp-h1
1858 libvorbis-install: libvorbis
1859 @$(SEP)
1860 ifneq ($(MEDIA_SERVER_STATIC),y)
1861 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1862 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1863 endif
1865 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1866 @$(SEP)
1867 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna $(PARALLEL_BUILD)
1869 minidlna-clean:
1870 -@$(MAKE) -C minidlna clean
1871 @rm -f minidlna/stamp-h1
1873 minidlna-install: minidlna
1874 @$(SEP)
1875 install -D minidlna/minidlna $(INSTALLDIR)/minidlna/usr/sbin/minidlna
1876 $(STRIP) $(INSTALLDIR)/minidlna/usr/sbin/minidlna
1878 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1879 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1880 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1881 $(CONFIGURE) --prefix=/usr
1883 igmpproxy: igmpproxy/src/Makefile
1884 @$(SEP)
1885 @$(MAKE) -C igmpproxy/src $(PARALLEL_BUILD)
1887 igmpproxy-install: igmpproxy
1888 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1889 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1891 igmpproxy-clean:
1892 -@$(MAKE) -C igmpproxy/src clean
1893 @rm -f igmpproxy/src/Makefile
1895 udev:
1896 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1897 PROGRAMS=udevtrigger
1899 udev-install: udev
1900 install -d $(INSTALLDIR)
1901 install -d $(TARGETDIR)
1902 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1904 hotplug2:
1905 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) CC=$(CC) EXTRACFLAGS="$(EXTRACFLAGS)"
1907 hotplug2-install: hotplug2
1908 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1909 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1911 emf$(BCMEX):
1912 $(MAKE) -C emf$(BCMEX)/emfconf CROSS=$(CROSS_COMPILE)
1914 emf$(BCMEX)-install:
1915 ifeq ($(TCONFIG_EMF),y)
1916 install -d $(TARGETDIR)
1917 $(MAKE) -C emf$(BCMEX)/emfconf CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install
1918 endif
1920 emf$(BCMEX)-clean:
1921 -@$(MAKE) -C emf$(BCMEX)/emfconf clean
1923 igs:
1924 $(MAKE) -C emf$(BCMEX)/igsconf CROSS=$(CROSS_COMPILE)
1926 igs-install:
1927 ifeq ($(TCONFIG_EMF),y)
1928 install -d $(TARGETDIR)
1929 $(MAKE) -C emf$(BCMEX)/igsconf CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install
1930 endif
1932 igs-clean:
1933 -@$(MAKE) -C emf$(BCMEX)/igsconf clean
1935 wanuptime: nvram$(BCMEX) shared
1936 @$(SEP)
1937 @$(MAKE) -C wanuptime
1939 wanuptime-clean:
1940 -@$(MAKE) -C wanuptime clean
1942 wanuptime-install:
1943 install -D wanuptime/wanuptime $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1944 $(STRIP) $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1946 ebtables: dummy
1947 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1948 CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1949 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1950 LOCKFILE="/var/lock/ebtables" LOCKDIR="/var/lock" \
1951 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_DIR=$(LINUXDIR) KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1953 ebtables-install: ebtables
1954 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1956 @mkdir -p $(TARGETDIR)/rom/etc
1957 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1958 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1960 install -d $(INSTALLDIR)/ebtables/usr/lib
1961 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1962 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1963 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1965 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1966 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1967 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1969 ebtables-clean:
1970 -@$(MAKE) -C ebtables clean
1972 #Roadkill
1973 spawn-fcgi/stamp-h1:
1974 cd spawn-fcgi && autoreconf && CC=$(CC) \
1975 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1976 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1977 ac_cv_func_malloc_0_nonnull=yes \
1978 $(CONFIGURE) --prefix=/usr
1979 touch spawn-fcgi/stamp-h1
1981 spawn-fcgi: spawn-fcgi/stamp-h1
1982 @$(MAKE) -C spawn-fcgi $(PARALLEL_BUILD)
1984 spawn-fcgi-clean:
1985 -@$(MAKE) -C spawn-fcgi clean
1986 rm -f spawn-fcgi/stamp-h1
1988 spawn-fcgi-install: spawn-fcgi
1989 install -d $(INSTALLDIR)/spawn-fcgi/usr/bin
1990 install spawn-fcgi/src/spawn-fcgi $(INSTALLDIR)/spawn-fcgi/usr/bin/spawn-fcgi
1991 $(STRIP) -s $(INSTALLDIR)/spawn-fcgi/usr/bin/spawn-fcgi
1993 #Roadkill
1994 glib/stamp-h1:
1995 @$(SEP)
1996 @cd glib && $(CONFIGURE) --prefix=/usr glib_cv_prog_cc_ansi_proto=no glib_cv_has__inline=yes glib_cv_has__inline__=yes glib_cv_hasinline=yes \
1997 glib_cv_sane_realloc=yes glib_cv_va_copy=no glib_cv___va_copy=yes glib_cv_va_val_copy=yes glib_cv_rtldglobal_broken=no \
1998 glib_cv_uscore=no glib_cv_func_pthread_mutex_trylock_posix=yes glib_cv_func_pthread_cond_timedwait_posix=yes glib_cv_sizeof_gmutex=24 \
1999 glib_cv_byte_contents_gmutex="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0" glib_cv_sys_pthread_getspecific_posix=yes \
2000 glib_cv_sys_pthread_mutex_trylock_posix=yes glib_cv_sys_pthread_cond_timedwait_posix=yes ac_cv_func_getpwuid_r=yes ac_cv_func_getpwuid_r_posix=yes
2001 @$(MAKE) -C glib
2002 touch glib/stamp-h1
2004 glib: glib/stamp-h1
2005 @$(MAKE) -C glib $(PARALLEL_BUILD)
2007 glib-clean:
2008 -@$(MAKE) -C glib clean
2009 rm -f glib/stamp-h1
2011 glib-install: glib
2012 @$(MAKE) -C glib DESTDIR=$(INSTALLDIR)/glib install
2014 nocat/stamp-h1: glib-install
2015 @$(SEP)
2016 @cd nocat && \
2017 NC_CONF_PATH="/" \
2018 $(CONFIGURE) --with-firewall=iptables --with-glib-prefix="$(INSTALLDIR)/glib/usr" --localstatedir=/var --sysconfdir=/etc
2019 @$(MAKE) -C nocat
2021 echo *** integrate glib to nocat installdir
2022 install -d $(INSTALLDIR)/nocat/usr/lib
2023 install -D glib/.libs/libglib-1.2.so.0.0.10 $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
2024 cd $(INSTALLDIR)/nocat/usr/lib && ln -s libglib-1.2.so.0.0.10 libglib-1.2.so.0
2025 $(STRIP) $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
2026 touch nocat/stamp-h1
2028 nocat: nocat/stamp-h1
2029 @$(MAKE) -C nocat $(PARALLEL_BUILD)
2031 nocat-clean:
2032 -@$(MAKE) -C nocat clean
2033 rm -f nocat/stamp-h1
2035 nocat-install:
2036 install -D nocat/src/splashd $(INSTALLDIR)/nocat/usr/sbin/splashd
2037 $(STRIP) $(INSTALLDIR)/nocat/usr/sbin/splashd
2038 mkdir -p $(INSTALLDIR)/nocat/usr/libexec/nocat
2039 install -D nocat/libexec/iptables/* $(INSTALLDIR)/nocat/usr/libexec/nocat
2041 #Tomato RAF
2042 pcre/stamp-h1:
2043 $(SEP)
2044 cd pcre && \
2045 CC=$(CC) CXX=$(HOST)-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2046 $(CONFIGURE) --prefix=/usr --disable-dependency-tracking --enable-utf8 --enable-unicode-properties --disable-cpp
2047 @touch pcre/stamp-h1
2048 [ -d pcre/m4 ] || mkdir pcre/m4
2050 pcre: pcre/stamp-h1
2052 pcre-install: pcre
2053 @$(SEP)
2054 install -D pcre/.libs/libpcre.so.1 $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1.2.3
2055 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1.2.3
2056 install -D pcre/.libs/libpcreposix.so.0.0.2 $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.2
2057 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.2
2058 cd $(INSTALLDIR)/pcre/usr/lib/ && \
2059 ln -sf libpcre.so.1.2.3 libpcre.so.1 && \
2060 ln -sf libpcreposix.so.0.0.2 libpcreposix.so.0
2062 pcre-clean:
2063 ( if [ -f pcre/Makefile ]; then \
2064 $(MAKE) -C pcre clean; \
2065 rm -rf pcre/stamp-h1; \
2066 fi )
2068 libxml2/stamp-h1:
2069 cd libxml2 && \
2070 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2071 $(CONFIGURE) --prefix=/usr --without-python --enable-static --enable-shared
2072 touch $@
2074 libxml2: libxml2/stamp-h1
2075 @$(MAKE) -C libxml2 all $(PARALLEL_BUILD)
2076 @$(MAKE) -C libxml2 DESTDIR=$(TOP)/libxml2/staged install
2078 libxml2-install: libxml2
2079 @$(SEP)
2080 install -D libxml2/.libs/libxml2.so.2.9.1 $(INSTALLDIR)/libxml2/usr/lib/libxml2.so.2.9.1
2081 $(STRIP) $(INSTALLDIR)/libxml2/usr/lib/libxml2.so.2.9.1
2082 cd $(INSTALLDIR)/libxml2/usr/lib && \
2083 ln -sf libxml2.so.2.9.1 libxml2.so.2 && \
2084 ln -sf libxml2.so.2.9.1 libxml2.so
2086 libxml2-clean:
2087 -@$(MAKE) -C libxml2 clean
2088 @rm -f libxml2/stamp-h1
2089 @rm -rf libxml2/staged
2091 libpng/stamp-h1:
2092 cd libpng && \
2093 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2094 $(CONFIGURE) --prefix=/usr --enable-static --enable-shared
2095 touch $@
2097 libpng: libpng/stamp-h1
2098 @$(MAKE) -C libpng all $(PARALLEL_BUILD)
2099 @$(MAKE) -C libpng DESTDIR=$(TOP)/libpng/staged install
2101 libpng-install: libpng
2102 @$(SEP)
2103 install -D libpng/.libs/libpng.so.3.51.0 $(INSTALLDIR)/libpng/usr/lib/libpng.so.3.51.0
2104 $(STRIP) $(INSTALLDIR)/libpng/usr/lib/libpng.so.3.51.0
2105 cd $(INSTALLDIR)/libpng/usr/lib && \
2106 ln -sf libpng.so.3.51.0 libpng.so && \
2107 ln -sf libpng.so.3.51.0 libpng.so.3
2108 install -D libpng/.libs/libpng12.so.0.51.0 $(INSTALLDIR)/libpng/usr/lib/libpng12.so.0.51.0
2109 $(STRIP) $(INSTALLDIR)/libpng/usr/lib/libpng12.so.0.51.0
2110 cd $(INSTALLDIR)/libpng/usr/lib && \
2111 ln -sf libpng12.so.0.51.0 libpng12.so && \
2112 ln -sf libpng12.so.0.51.0 libpng12.so.0
2114 libpng-clean:
2115 -@$(MAKE) -C libpng clean
2116 @rm -f libpng/stamp-h1
2117 @rm -rf libpng/staged
2119 php/stamp-h1: pcre zlib libiconv sqlite libxml2 libpng jpeg libcurl
2120 @$(SEP)
2121 cd php && CC=$(CC) CXX=$(ARCH)-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
2122 CFLAGS="-Os -Wall -I$(TOP)/zlib -I$(TOP)/libxml2/include/libxml -I$(TOP)/libxml2/include -I$(TOP)/pcre -I$(TOP)/libiconv/include \
2123 -I$(TOP)/libpng/staged/usr/include -I$(TOP)/libcurl/staged/include" \
2124 LDFLAGS="-L$(TOP)/pcre/.libs -L$(TOP)/sqlite/.libs -L$(TOP)/zlib -L$(TOP)/libxml2/.libs -L$(TOP)/libiconv/lib/.libs \
2125 -L$(TOP)/libpng/.libs -L$(TOP)/libcurl/staged/lib" \
2126 CPPFLAGS="-L$(TOP)/pcre/.libs -L$(TOP)/sqlite/.libs -L$(TOP)/zlib -L$(TOP)/libxml2/.libs -L$(TOP)/libiconv/lib/.libs -L$(TOP)/libpng/.libs" \
2127 LIBS="-L$(TOP)/pcre/.libs -L$(TOP)/sqlite/.libs -L$(TOP)/zlib -L$(TOP)/libxml2/.libs -L$(TOP)/libiconv/lib/.libs -L$(TOP)/libpng/.libs -lz \
2128 -lsqlite3 -ldl -lpthread -liconv -lxml2 -lstdc++ -lcurl" \
2129 PHP_FCGI_LIBXML_DIR="$(TOP)/libxml2/staged/usr" \
2130 ac_cv_func_memcmp_working=yes \
2131 cv_php_mbstring_stdarg=yes \
2132 $(CONFIGURE) --prefix=/usr \
2133 --enable-shared \
2134 --disable-static \
2135 --disable-rpath \
2136 --disable-debug \
2137 --without-pear \
2138 --with-config-file-path=/etc \
2139 --with-config-file-scan-dir=/etc/php5 \
2140 --disable-short-tags \
2141 --with-zlib \
2142 --with-zlib-dir="$(TOP)/zlib/staged/usr" \
2143 --disable-phar \
2144 --enable-cli \
2145 --enable-cgi \
2146 --disable-calendar \
2147 --enable-ctype \
2148 --with-curl="$(TOP)/libcurl/staged" \
2149 --enable-fileinfo \
2150 --without-gettext \
2151 --enable-dom \
2152 --enable-exif \
2153 --disable-ftp \
2154 --without-gmp \
2155 --with-gd \
2156 --with-png-dir="$(TOP)/libpng/staged/usr" \
2157 --with-jpeg-dir="$(TOP)/jpeg/staged" \
2158 --enable-hash \
2159 --with-iconv="$(TOP)/libiconv/staged/usr" \
2160 --with-iconv-dir="$(TOP)/libiconv/staged/usr" \
2161 --enable-json \
2162 --without-ldap \
2163 --enable-mbstring \
2164 --without-mcrypt \
2165 --without-openssl \
2166 --disable-pcntl \
2167 --without-mysqli \
2168 --with-mysql \
2169 --with-mysql-sock="/var/run/mysqld.sock" \
2170 --with-pdo-mysql \
2171 --without-pdo-pgsql \
2172 --with-pdo-sqlite \
2173 --enable-pdo \
2174 --without-pgsql \
2175 --enable-session \
2176 --disable-shmop \
2177 --enable-simplexml \
2178 --disable-soap \
2179 --disable-sockets \
2180 --with-sqlite3 \
2181 --disable-sysvmsg \
2182 --disable-sysvsem \
2183 --disable-sysvshm \
2184 --disable-tokenizer \
2185 --enable-xml \
2186 --enable-xmlreader \
2187 --enable-xmlwriter \
2188 --enable-zip \
2189 --disable-filter \
2190 --with-libxml-dir="$(TOP)/libxml2/staged/usr"
2191 @touch php/stamp-h1
2193 php: php/stamp-h1
2194 @$(SEP)
2195 @$(MAKE) -C php
2197 php-clean:
2198 -@$(MAKE) -C php clean
2199 -@rm php/stamp-h1
2201 php-install: php
2202 @$(SEP)
2203 install -d $(INSTALLDIR)/php/usr/sbin
2204 install -D php/sapi/cli/.libs/php $(INSTALLDIR)/php/usr/sbin/php-cli && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cli
2205 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cli
2206 install -D php/sapi/cgi/.libs/php-cgi $(INSTALLDIR)/php/usr/sbin/php-cgi && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cgi
2207 cd $(INSTALLDIR)/php/usr/sbin && ln -sf php-cgi php-fcgi
2208 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cgi
2210 nginx/stamp-h1: openssl zlib pcre
2211 @$(SEP)
2212 cd $(TOP)/nginx && ./configure --crossbuild=Linux::$(ARCH) \
2213 --prefix=/usr \
2214 --sbin-path=/usr/sbin \
2215 --conf-path=/etc/nginx/nginx.conf \
2216 --error-log-path=/tmp/var/log/nginx/error.log \
2217 --http-log-path=/tmp/var/log/nginx/access.log \
2218 --pid-path=/tmp/var/run/nginx.pid \
2219 --lock-path=/tmp/var/run/nginx.lock.accept \
2220 --http-client-body-temp-path=/tmp/var/lib/nginx/client \
2221 --http-fastcgi-temp-path=/tmp/var/lib/nginx/fastcgi \
2222 --with-http_flv_module \
2223 --with-http_ssl_module \
2224 --with-http_gzip_static_module \
2225 --http-uwsgi-temp-path=/tmp/var/lib/nginx/uwsgi \
2226 --http-scgi-temp-path=/tmp/var/lib/nginx/scgi \
2227 --http-proxy-temp-path=/tmp/var/lib/nginx/proxy \
2228 --with-cc="$(CC)" \
2229 --with-ld-opt="$(LDFLAGS) -L $(TOP)/pcre/.libs -L $(TOP)/zlib -L $(TOP)/openssl" \
2230 --with-cc-opt="$(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) -I $(TOP)/openssl/include -I $(TOP)/openssl/include/openssl -I $(TOP)/pcre -I $(TOP)/zlib" \
2231 $(ADDITIONAL_MODULES)
2233 nginx: nginx/stamp-h1
2234 @$(SEP)
2235 @$(MAKE) -C nginx
2237 nginx-clean:
2238 -@$(MAKE) -C nginx clean
2239 -@rm -f nginx/stamp-h1
2241 nginx-install: nginx
2242 install -d $(INSTALLDIR)/nginx/usr/sbin
2243 install -D nginx/objs/nginx $(INSTALLDIR)/nginx/usr/sbin/nginx && chmod 755 $(INSTALLDIR)/nginx/usr/sbin/nginx
2244 $(STRIP) $(INSTALLDIR)/nginx/usr/sbin/nginx
2246 libncurses/stamp-h1:
2247 cd libncurses && CC=$(CC) \
2248 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC" \
2249 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2250 LIBS="-lstdc++" \
2251 $(CONFIGURE) --prefix=/usr --with-shared --with-normal --disable-debug --without-ada --without-manpages --without-progs --without-tests
2252 touch libncurses/stamp-h1
2254 libncurses: libncurses/stamp-h1
2255 @$(SEP)
2256 $(MAKE) -C libncurses $(PARALLEL_BUILD)
2257 $(MAKE) -C libncurses DESTDIR=$(TOP)/libncurses/staged install
2259 libncurses-clean:
2260 -@$(MAKE) -C libncurses clean
2261 @rm -f libncurses/stamp-h1 libncurses/Makefile
2262 @rm -rf libncurses/staged
2264 libncurses-install: libncurses
2265 install -d $(INSTALLDIR)/libncurses/usr/lib
2266 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo
2267 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo/l
2268 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo/v
2269 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo/x
2270 install -D -m 0644 libncurses/staged/usr/share/terminfo/l/linux $(INSTALLDIR)/libncurses/usr/share/terminfo/l
2271 install -D -m 0644 libncurses/staged/usr/share/terminfo/v/vt100 $(INSTALLDIR)/libncurses/usr/share/terminfo/v
2272 install -D -m 0644 libncurses/staged/usr/share/terminfo/v/vt220 $(INSTALLDIR)/libncurses/usr/share/terminfo/v
2273 install -D -m 0644 libncurses/staged/usr/share/terminfo/x/xterm $(INSTALLDIR)/libncurses/usr/share/terminfo/x
2274 cd $(INSTALLDIR)/libncurses/usr/lib && ln -sf ../share/terminfo terminfo
2275 install libncurses/lib/libncurses.so.6.0 $(INSTALLDIR)/libncurses/usr/lib/libncurses.so.6
2276 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libncurses.so.6
2277 install libncurses/lib/libpanel.so.6.0 $(INSTALLDIR)/libncurses/usr/lib/libpanel.so.6
2278 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libpanel.so.6
2279 install libncurses/lib/libform.so.6.0 $(INSTALLDIR)/libncurses/usr/lib/libform.so.6
2280 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libform.so.6
2281 install libncurses/lib/libmenu.so.6.0 $(INSTALLDIR)/libncurses/usr/lib/libmenu.so.6
2282 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libmenu.so.6
2283 cd $(INSTALLDIR)/libncurses/usr/lib/ && \
2284 ln -sf libncurses.so.6 libncurses.so && \
2285 ln -sf libpanel.so.6 libpanel.so && \
2286 ln -sf libform.so.6 libform.so && \
2287 ln -sf libmenu.so.6 libmenu.so
2289 mysql/stamp-h1: openssl zlib libncurses
2290 @$(SEP)
2291 cd mysql && \
2292 CFLAGS="-O2 -Wall -fno-delete-null-pointer-checks -funit-at-a-time --param large-function-growth=800 \
2293 --param max-inline-insns-single=3000 -ffunction-sections -fdata-sections -I$(TOP)/zlib \
2294 -I$(TOP)/openssl/include -I$(TOP)/libncurses/include" \
2295 CPPFLAGS="-O2 -Wall -fno-delete-null-pointer-checks -funit-at-a-time --param large-function-growth=800 \
2296 --param max-inline-insns-single=3000 -ffunction-sections -fdata-sections -I$(TOP)/zlib \
2297 -I$(TOP)/openssl/include -I$(TOP)/libncurses/include" \
2298 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/zlib/staged/usr/lib -L$(TOP)/libncurses/lib -fPIC -EL" \
2299 LIBS="-lcrypt -lz -lstdc++ -lssl -lcrypto -lncurses" \
2300 $(CONFIGURE) --host=$(HOST) --build=x86_64-linux-gnu --prefix=/usr \
2301 --without-debug --without-docs --without-man --with-charset=utf8 --with-extra-charsets=ascii,latin1,gb2312,gbk \
2302 --enable-shared --disable-static \
2303 --without-mysqlmanager \
2304 --with-pthread \
2305 --with-ssl \
2306 --without-docs \
2307 --with-geometry \
2308 --with-low-memory \
2309 --enable-assembler \
2310 --with-zlib-dir="$(TOP)/zlib/staged/usr" \
2311 ac_cv_c_stack_direction=-1
2312 cd mysql && tar xvfz .host.tgz
2313 # Update time of config.status to avoid run 'config.status --recheck'
2314 touch mysql/config.status
2315 # Update time of Makefile to avoid regenerate it when do make
2316 sleep 5
2317 -find mysql -name Makefile -print | xargs -i touch {}
2318 touch mysql/stamp-h1
2320 mysql: mysql/stamp-h1
2321 @$(SEP)
2322 @$(MAKE) -C mysql
2323 @$(MAKE) -C mysql DESTDIR=$(TOP)/mysql/staged install
2325 mysql-clean:
2326 -@$(MAKE) -C mysql clean
2327 -@rm -f mysql/stamp-h1
2328 -@rm -rf mysql/staged mysql/host
2330 mysql-install:
2331 install -d $(INSTALLDIR)/mysql/usr/bin
2332 install -d $(INSTALLDIR)/mysql/usr/lib
2333 install -d $(INSTALLDIR)/mysql/usr/libexec
2334 install -d $(INSTALLDIR)/mysql/usr/lib/mysql
2335 install -d $(INSTALLDIR)/mysql/usr/lib/mysql/plugin
2336 install -d $(INSTALLDIR)/mysql/usr/share
2337 install -d $(INSTALLDIR)/mysql/usr/share/mysql
2338 install -D -m 755 mysql/mycheck $(INSTALLDIR)/mysql/usr/bin
2339 install -D -m 755 mysql/staged/usr/bin/my_print_defaults $(INSTALLDIR)/mysql/usr/bin
2340 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/my_print_defaults
2341 install -D -m 755 mysql/staged/usr/bin/myisamchk $(INSTALLDIR)/mysql/usr/bin
2342 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/myisamchk
2343 install -D -m 755 mysql/staged/usr/bin/mysql $(INSTALLDIR)/mysql/usr/bin
2344 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/mysql
2345 install -D -m 755 mysql/staged/usr/bin/mysql_install_db $(INSTALLDIR)/mysql/usr/bin
2346 install -D -m 755 mysql/staged/usr/bin/mysqladmin $(INSTALLDIR)/mysql/usr/bin
2347 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/mysqladmin
2348 install -D -m 755 mysql/staged/usr/bin/mysqldump $(INSTALLDIR)/mysql/usr/bin
2349 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/mysqldump
2350 install -D -m 755 mysql/staged/usr/libexec/mysqld $(INSTALLDIR)/mysql/usr/libexec
2351 $(STRIP) $(INSTALLDIR)/mysql/usr/libexec/mysqld
2352 cd $(INSTALLDIR)/mysql/usr/bin && ln -sf ../libexec/mysqld mysqld
2353 # install -D -m 755 mysql/staged/usr/bin/mysqld_safe $(INSTALLDIR)/mysql/usr/bin
2354 install -D -m 755 mysql/staged/usr/lib/mysql/libmysqlclient.so.16.0.0 $(INSTALLDIR)/mysql/usr/lib/mysql
2355 $(STRIP) $(INSTALLDIR)/mysql/usr/lib/mysql/libmysqlclient.so.16.0.0
2356 -@cd $(INSTALLDIR)/mysql/usr/lib/mysql && \
2357 ln -sf libmysqlclient.so.16.0.0 libmysqlclient.so.16 && \
2358 ln -sf libmysqlclient.so.16.0.0 libmysqlclient.so
2359 install -D -m 755 mysql/staged/usr/lib/mysql/libmysqlclient_r.so.16.0.0 $(INSTALLDIR)/mysql/usr/lib/mysql
2360 $(STRIP) $(INSTALLDIR)/mysql/usr/lib/mysql/libmysqlclient_r.so.16.0.0
2361 -@cd $(INSTALLDIR)/mysql/usr/lib/mysql && \
2362 ln -sf libmysqlclient_r.so.16.0.0 libmysqlclient_r.so.16 && \
2363 ln -sf libmysqlclient_r.so.16.0.0 libmysqlclient_r.so
2364 # -@cd $(INSTALLDIR)/mysql/usr/lib/mysql/plugin && cp -arfpu $(TOP)/mysql/staged/usr/lib/mysql/plugin/* . && \
2365 # rm -f *.la *.a && \
2366 # $(STRIP) *.so.*
2367 -@cd $(INSTALLDIR)/mysql/usr/share/mysql && \
2368 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/english . && \
2369 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/fill_help_tables.sql . && \
2370 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/mysql_system_tables.sql . && \
2371 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/mysql_system_tables_data.sql .
2373 lzo/stamp-h1:
2374 cd lzo && \
2375 CFLAGS="-O3 -Wall -fPIC $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
2376 touch lzo/stamp-h1
2378 lzo: lzo/stamp-h1
2379 @$(MAKE) -C lzo $(PARALLEL_BUILD)
2381 lzo-clean:
2382 -@$(MAKE) -C lzo clean
2383 @rm -f lzo/stamp-h1
2385 lzo-install: lzo
2386 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2.0.0
2387 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2.0.0
2388 cd $(INSTALLDIR)/lzo/usr/lib && \
2389 ln -sf liblzo2.so.2.0.0 liblzo2.so.2 && \
2390 ln -sf liblzo2.so.2.0.0 liblzo2.so
2392 openvpn/.conf: openssl lzo
2393 cd openvpn && autoreconf && \
2394 CFLAGS="-O3 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2395 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
2396 CPPFLAGS="-I$(TOP)/lzo/include -I$(TOP)/openssl/include" \
2397 $(CONFIGURE) --prefix= \
2398 --with-crypto-library=openssl \
2399 --disable-debug --disable-plugin-auth-pam --disable-plugin-down-root --with-plugindir=/lib --enable-management --disable-small \
2400 --disable-selinux --disable-socks \
2401 OPENSSL_SSL_CFLAGS="-I$(TOP)/openssl/include" \
2402 OPENSSL_SSL_LIBS="-L$(TOP)/openssl -lssl" \
2403 ac_cv_lib_resolv_gethostbyname=no
2404 touch openvpn/.conf
2406 openvpn: openvpn/.conf
2407 @$(MAKE) -C openvpn $(PARALLEL_BUILD)
2409 openvpn-clean:
2410 -@$(MAKE) -C openvpn clean
2411 @rm -f openvpn/.conf
2413 openvpn-install: openvpn
2414 install -D openvpn/src/openvpn/.libs/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
2415 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
2416 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
2418 openvpn_plugin_auth_nvram: nvram$(BCMEX)
2420 #shibby
2421 nano/stamp-h1: libncurses
2422 cd nano && CC=$(CC) STRIP=$(STRIP) \
2423 CFLAGS="-O3 -Wall $(EXTRACFLAGS) -I$(TOP)/libncurses/staged/usr/include -ffunction-sections -fdata-sections" \
2424 CPPFLAGS="-Os -Wall $(EXTRACFLAGS) -I$(TOP)/libncurses/staged/usr/include -ffunction-sections -fdata-sections" \
2425 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -L$(TOP)/libncurses/staged/usr/lib -fPIC" \
2426 ac_cv_lib_ncursesw_get_wch=no \
2427 $(CONFIGURE) --prefix=/usr --disable-nls --enable-all --without-libiconv-prefix --disable-utf8
2428 touch nano/stamp-h1
2430 nano: nano/stamp-h1
2431 @$(MAKE) -C nano $(PARALLEL_BUILD)
2433 nano-clean:
2434 -@$(MAKE) -C nano clean
2435 @rm -f nano/stamp-h1 nano/Makefile nano/src/Makefile
2437 nano-install: nano
2438 install -d $(INSTALLDIR)/nano/usr/sbin
2439 install -D nano/src/nano $(INSTALLDIR)/nano/usr/sbin/nano
2440 $(STRIP) -s $(INSTALLDIR)/nano/usr/sbin/nano
2442 libcurl/stamp-h1: zlib openssl
2443 cd libcurl && CC=$(CC) STRIP=$(STRIP) \
2444 CPPFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections -I$(TOP)/zlib" \
2445 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2446 $(CONFIGURE) --prefix=$(TOP)/libcurl/staged --disable-thread --enable-shared --enable-static \
2447 --enable-ares --enable-cookies --enable-crypto-auth --enable-nonblocking \
2448 --enable-file --enable-ftp --enable-http --enable-ipv6 --enable-tftp \
2449 --disable-nls --disable-ares --disable-dict --disable-debug --disable-gopher \
2450 --disable-ldap --disable-manual --disable-telnet --disable-verbose \
2451 --with-random="/dev/urandom" --with-ssl="$(TOP)/openssl/ssl" \
2452 --without-gnutls --without-krb4 --without-libidn \
2453 --with-linux-headers=$(LINUXDIR)/include \
2454 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
2455 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
2456 touch libcurl/stamp-h1
2458 libcurl: libcurl/stamp-h1
2459 @$(MAKE) -C libcurl $(PARALLEL_BUILD)
2460 @$(MAKE) -C libcurl install
2462 libcurl-clean:
2463 -@$(MAKE) -C libcurl clean
2464 @rm -f libcurl/stamp-h1 libcurl/Makefile
2465 @rm -rf libcurl/staged
2467 libcurl-install: libcurl
2468 install -d $(INSTALLDIR)/libcurl/usr/sbin
2469 install -D libcurl/src/.libs/curl $(INSTALLDIR)/libcurl/usr/sbin/curl
2470 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/sbin/curl
2471 install -d $(INSTALLDIR)/libcurl/usr/lib
2472 install -D libcurl/lib/.libs/libcurl.so.4.4.0 $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.4.0
2473 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.4.0
2474 cd $(INSTALLDIR)/libcurl/usr/lib/ && \
2475 ln -sf libcurl.so.4.4.0 libcurl.so.4 && \
2476 ln -sf libcurl.so.4.4.0 libcurl.so
2478 libevent/stamp-h1:
2479 cd libevent && CC=$(CC) \
2480 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2481 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2482 $(CONFIGURE)
2483 touch libevent/stamp-h1
2485 libevent: libevent/stamp-h1
2486 @$(SEP)
2487 $(MAKE) -C libevent $(PARALLEL_BUILD)
2488 $(MAKE) -C libevent DESTDIR=$(TOP)/libevent/staged install
2490 libevent-clean:
2491 -@$(MAKE) -C libevent clean
2492 @rm -f libevent/stamp-h1 libevent/Makefile
2493 @rm -rf libevent/staged
2495 libevent-install: libevent
2496 install -d $(INSTALLDIR)/libevent/usr/lib
2497 install libevent/.libs/libevent-2.0.so.5.1.9 $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
2498 $(STRIP) -s $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
2500 libiconv/stamp-h1:
2501 cd libiconv && CC=$(CC) \
2502 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2503 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2504 $(CONFIGURE) --prefix=/usr --disable-nls --enable-static --enable-shared
2505 touch libiconv/stamp-h1
2507 libiconv: libiconv/stamp-h1
2508 @$(SEP)
2509 $(MAKE) -C libiconv $(PARALLEL_BUILD)
2510 $(MAKE) -C libiconv DESTDIR=$(TOP)/libiconv/staged install
2512 libiconv-clean:
2513 -@$(MAKE) -C libiconv clean
2514 @rm -rf libiconv/stamp-h1 libiconv/Makefile
2515 @rm -rf libiconv/staged
2517 libiconv-install: libiconv
2518 install -d $(INSTALLDIR)/libiconv/usr/lib
2519 install libiconv/lib/.libs/libiconv.so.2.5.1 $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2.5.1
2520 $(STRIP) -s $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2.5.1
2521 cd $(INSTALLDIR)/libiconv/usr/lib/ && \
2522 ln -sf libiconv.so.2.5.1 libiconv.so.2 && \
2523 ln -sf libiconv.so.2.5.1 libiconv.so
2525 transmission/stamp-h1: openssl libcurl libevent zlib
2526 cd transmission && CC=$(CC) STRIP=$(STRIP) \
2527 autoreconf && \
2528 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
2529 --param large-function-growth=800 --param max-inline-insns-single=3000 \
2530 -ffunction-sections -fdata-sections" \
2531 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC \
2532 -L$(TOP)/zlib -L$(TOP)/openssl -L$(TOP)/libcurl/lib/.libs -L$(TOP)/libevent/.libs" \
2533 HAVE_CXX=yes \
2534 $(CONFIGURE) --target=$(HOST) --host=$(HOST) --build=x86_64-linux-gnu --prefix=/usr --disable-nls \
2535 --enable-lightweight --enable-largefile --enable-utp --without-gtk \
2536 LIBCURL_CFLAGS="-I$(TOP)/libcurl/include" \
2537 LIBCURL_LDFLAGS="-L$(TOP)/libcurl/lib/.libs/" \
2538 LIBCURL_LIBS="-lcurl" \
2539 LIBEVENT_CFLAGS="-I$(TOP)/libevent/include" \
2540 LIBEVENT_LDFLAGS="-L$(TOP)/libevent/.libs" \
2541 LIBEVENT_LIBS="-levent" \
2542 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
2543 OPENSSL_LDFLAGS="-L$(TOP)/openssl" \
2544 OPENSSL_LIBS="-lcrypto -lssl" \
2545 ZLIB_CFLAGS="-I$(TOP)/zlib" \
2546 ZLIB_LDFLAGS="-L$(TOP)/zlib" \
2547 ZLIB_LIBS="-lz"
2548 touch transmission/stamp-h1
2550 transmission: transmission/stamp-h1
2551 @$(SEP)
2552 $(MAKE) -C transmission $(PARALLEL_BUILD)
2554 transmission-clean:
2555 -@$(MAKE) -C transmission clean
2556 @rm -f transmission/stamp-h1 transmission/Makefile
2558 transmission-install: transmission
2559 $(MAKE) -C transmission DESTDIR=$(INSTALLDIR)/transmission install-strip
2560 @rm -rf $(INSTALLDIR)/transmission/usr/share/man
2561 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-cli
2562 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-show
2563 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-edit
2564 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-create
2565 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-daemon
2566 ifeq ($(TCONFIG_TR_EXTRAS),y)
2567 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-remote
2568 else
2569 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-remote
2570 endif
2572 btgui:
2573 @$(SEP)
2575 btgui-install: btgui
2576 install -d $(INSTALLDIR)/btgui/usr/bin
2577 install -D transmission/btcheck $(INSTALLDIR)/btgui/usr/bin/btcheck
2579 libnfsidmap/stamp-h1:
2580 cd libnfsidmap && \
2581 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2582 ac_cv_func_malloc_0_nonnull=yes \
2583 ac_cv_func_realloc_0_nonnull=yes \
2584 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
2585 touch libnfsidmap/stamp-h1
2587 libnfsidmap: libnfsidmap/stamp-h1
2588 @$(SEP)
2589 $(MAKE) -C libnfsidmap $(PARALLEL_BUILD)
2591 libnfsidmap-clean:
2592 -@$(MAKE) -C libnfsidmap clean
2593 @rm -f libnfsidmap/stamp-h1
2594 @rm -rf libnfsidmap/staged
2596 libnfsidmap-install: libnfsidmap
2597 install -d $(TOP)/libnfsidmap/staged
2598 $(MAKE) -C libnfsidmap DESTDIR=$(TOP)/libnfsidmap/staged install
2600 portmap/stamp-h1:
2601 cd portmap \
2602 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2603 $(MAKE) -C portmap CC=$(CC) AR=$(AR) LD=$(LD) RANLIB=$(RANLIB) RPCUSER="nobody"
2604 touch portmap/stamp-h1
2606 portmap: portmap/stamp-h1
2607 @$(SEP)
2608 $(MAKE) -C portmap $(PARALLEL_BUILD)
2610 portmap-clean:
2611 -@$(MAKE) -C portmap clean
2612 @rm -f portmap/stamp-h1
2614 portmap-install: portmap
2615 install -d $(INSTALLDIR)/portmap/usr/sbin
2616 install -D portmap/portmap $(INSTALLDIR)/portmap/usr/sbin/portmap
2617 $(STRIP) -s $(INSTALLDIR)/portmap/usr/sbin/portmap
2619 e2fsprogs/stamp-h1:
2620 cd e2fsprogs && \
2621 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2622 $(CONFIGURE) --prefix=$(TOP)/e2fsprogs/staged --enable-libblkid --enable-symlink-build --disable-defrag --disable-nls --without-libiconv-prefix --without-libintl-prefix
2623 touch e2fsprogs/stamp-h1
2625 e2fsprogs: e2fsprogs/stamp-h1
2626 @$(SEP)
2627 $(MAKE) -C e2fsprogs $(PARALLEL_BUILD)
2629 e2fsprogs-clean:
2630 -@$(MAKE) -C e2fsprogs clean
2631 @rm -f e2fsprogs/stamp-h1
2632 @rm -f e2fsprogs/Makefile
2633 @rm -rf e2fsprogs/staged
2635 nfs-utils/stamp-h1: libevent-install e2fsprogs portmap libnfsidmap-install
2636 cd nfs-utils && STRIP=$(STRIP) \
2637 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
2638 -I$(TOP)/libevent/staged/usr/local/include -I$(TOP)/e2fsprogs/lib \
2639 -I$(TOP)/libnfsidmap/staged/usr/include -ffunction-sections -fdata-sections" \
2640 LDFLAGS="-L$(TOP)/libevent/staged/usr/local/lib -L$(TOP)/e2fsprogs/lib \
2641 -L$(TOP)/libnfsidmap/staged/usr/lib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2642 ac_cv_func_malloc_0_nonnull=yes \
2643 ac_cv_func_realloc_0_nonnull=yes \
2644 $(CONFIGURE) --disable-gss --without-tcp-wrappers --enable-static --enable-shared \
2645 --enable-nfsv4 --enable-nfsv3
2646 touch nfs-utils/stamp-h1
2648 nfs-utils: nfs-utils/stamp-h1
2649 @$(SEP)
2650 $(MAKE) -C nfs-utils $(PARALLEL_BUILD)
2652 nfs-utils-clean:
2653 -@$(MAKE) -C nfs-utils clean
2654 @rm -f nfs-utils/stamp-h1
2656 nfs-utils-install: nfs-utils
2657 install -d $(INSTALLDIR)/nfs-utils/usr/sbin
2658 install -D nfs-utils/utils/mount/mount.nfs $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
2659 install -D nfs-utils/utils/nfsd/nfsd $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
2660 install -D nfs-utils/utils/showmount/showmount $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
2661 install -D nfs-utils/utils/exportfs/exportfs $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
2662 install -D nfs-utils/utils/statd/statd $(INSTALLDIR)/nfs-utils/usr/sbin/statd
2663 install -D nfs-utils/utils/mountd/mountd $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
2664 install -D nfs-utils/nfs.rc $(INSTALLDIR)/nfs-utils/usr/sbin/nfs.rc
2665 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
2666 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
2667 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
2668 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
2669 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/statd
2670 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
2672 tinc/stamp-h1: openssl zlib lzo
2673 @cd tinc && autoreconf -fsi && \
2674 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
2675 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
2676 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2677 $(CONFIGURE) \
2678 --prefix=/usr \
2679 --sysconfdir=/etc \
2680 --localstatedir=/var \
2681 --with-zlib-include="$(TOP)/zlib" \
2682 --with-zlib-lib="$(TOP)/zlib" \
2683 --with-lzo-include="$(TOP)/lzo/include" \
2684 --with-lzo-lib="$(TOP)/lzo/src/.libs" \
2685 --with-openssl-include="$(TOP)/openssl/include" \
2686 --with-openssl-lib="$(TOP)/openssl" \
2687 --disable-curses \
2688 --disable-readline
2689 @touch tinc/stamp-h1
2691 tinc: tinc/stamp-h1
2692 @$(SEP)
2693 @$(MAKE) -C tinc LIBS="-lcrypto $(TOP)/zlib/libz.a -llzo2" $(PARALLEL_BUILD)
2695 tinc-clean:
2696 -@$(MAKE) -C tinc clean
2697 @rm -f tinc/stamp-h1
2699 tinc-install:
2700 install -D tinc/src/tinc $(INSTALLDIR)/tinc/usr/sbin/tinc
2701 install -D tinc/src/tincd $(INSTALLDIR)/tinc/usr/sbin/tincd
2702 $(STRIP) $(INSTALLDIR)/tinc/usr/sbin/tinc
2703 $(STRIP) $(INSTALLDIR)/tinc/usr/sbin/tincd
2705 sd-idle/stamp-h1:
2706 cd sd-idle \
2707 CFLAGS="-Os -Wall --host=$(HOST) --target=$(HOST) $(EXTRACFLAGS)" \
2708 $(MAKE) -C sd-idle
2709 chmod 0755 sd-idle/sd-idle
2710 touch sd-idle/stamp-h1
2712 sd-idle-clean:
2713 -@$(MAKE) -C sd-idle clean
2714 @rm -f sd-idle/stamp-h1
2716 sd-idle-install: sd-idle/stamp-h1
2717 install -d $(INSTALLDIR)/sd-idle/usr/bin
2718 install -D sd-idle/sd-idle $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
2719 $(STRIP) -s $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
2721 snmp/stamp-h1:
2722 cd snmp && \
2723 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2724 $(CONFIGURE) --prefix=/usr --with-endianness=little --enable-mini-agent --disable-debugging \
2725 --disable-privacy --without-opaque-special-types --with-persistent-directory=/tmp/snmp-persist \
2726 --with-default-snmp-version=3 --with-sys-contact=root --with-sys-location=Unknown --with-logfile=/dev/null \
2727 --with-out-transports=UDPIPv6,TCPIPv6,AAL5PVC,IPX,TCP,Unix --enable-shared=no --enable-static --with-gnu-ld \
2728 --enable-internal-md5 --with-copy-persistent-files=no --without-openssl -sysconfdir=/tmp \
2729 --with-mib-modules=mibII,host,mibII/ip,mibII/tcp,mibII/udp,mibII/icmp,mibII/var_route,mibII/kernel_linux,qos,ucd_snmp \
2730 --with-out-mib-modules=snmpv3mibs,agent_mips,agentx,notification,utilities,target --disable-ipv6 --with-defaults \
2731 --without-efence --without-rsaref --without-kmem-usage --without-rpm --without-dmalloc
2732 touch snmp/stamp-h1
2734 snmp: snmp/stamp-h1
2735 @$(SEP)
2736 $(MAKE) -C snmp
2738 snmp-clean:
2739 -@$(MAKE) -C snmp clean
2740 @rm -f snmp/stamp-h1
2742 snmp-install: snmp
2743 install -D snmp/agent/snmpd $(INSTALLDIR)/snmp/usr/sbin/snmpd
2744 $(STRIP) $(INSTALLDIR)/snmp/usr/sbin/snmpd
2746 apcupsd/stamp-h1:
2747 cd apcupsd && touch autoconf/variables.mak && CC=$(CC) STRIP=$(STRIP) \
2748 $(MAKE) configure && \
2749 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2750 LDFLAGS="-L$(TOOLCHAIN)/lib -ffunction-sections -fdata-sections" \
2751 $(CONFIGURE) --prefix=/usr --without-x --enable-usb --disable-pcnet --enable-cgi \
2752 --disable-lgd --enable-net --sysconfdir=/usr/local/apcupsd --bindir=/bin \
2753 --disable-dumb --disable-snmp --disable-net-snmp --with-cgi-bin=/www/apcupsd --with-serial-dev=
2754 touch apcupsd/stamp-h1
2756 apcupsd: apcupsd/stamp-h1
2757 $(MAKE) -C apcupsd $(PARALLEL_BUILD)
2759 apcupsd-clean:
2760 -@$(MAKE) -C apcupsd clean
2761 @rm -f apcupsd/stamp-h1
2762 @rm -f apcupsd/config*
2764 apcupsd-install: apcupsd
2765 $(MAKE) -C apcupsd DESTDIR=$(INSTALLDIR)/apcupsd install
2766 @rm -rf $(INSTALLDIR)/apcupsd/sbin/apctest
2767 @rm -rf $(INSTALLDIR)/apcupsd/www/apcupsd/ups*.cgi
2768 $(STRIP) $(INSTALLDIR)/apcupsd/sbin/*
2769 $(STRIP) $(INSTALLDIR)/apcupsd/www/apcupsd/*
2771 libsodium/stamp-h1:
2772 cd $(TOP)/libsodium && CC=$(CC) STRIP=$(STRIP) \
2773 $(CONFIGURE) --prefix=/usr --disable-ssp --enable-minimal
2774 touch libsodium/stamp-h1
2776 libsodium: libsodium/stamp-h1
2777 $(MAKE) -C libsodium $(PARALLEL_BUILD)
2779 libsodium-install: libsodium
2780 install -d $(INSTALLDIR)/libsodium/usr/lib
2781 install -D libsodium/src/libsodium/.libs/libsodium.so.18.1.0 $(INSTALLDIR)/libsodium/usr/lib/libsodium.so.18.1.0
2782 $(STRIP) -s $(INSTALLDIR)/libsodium/usr/lib/libsodium.so.18.1.0
2783 cd $(INSTALLDIR)/libsodium/usr/lib/ && \
2784 ln -sf libsodium.so.18.1.0 libsodium.so.18 && \
2785 ln -sf libsodium.so.18.1.0 libsodium.so
2787 libsodium-clean:
2788 -$(MAKE) -C libsodium clean
2789 @rm -rf libsodium/stamp-h1
2791 dnscrypt/stamp-h1: libsodium
2792 cd $(TOP)/dnscrypt && CC=$(CC) STRIP=$(STRIP) \
2793 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2794 CPPFLAGS="-I$(TOP)/libsodium/src/libsodium/include" \
2795 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -L$(TOP)/libsodium/src/libsodium/.libs" \
2796 $(CONFIGURE) --prefix=/usr --disable-ssp
2797 touch dnscrypt/stamp-h1
2799 dnscrypt: dnscrypt/stamp-h1
2800 $(MAKE) -C dnscrypt $(PARALLEL_BUILD)
2802 dnscrypt-install: dnscrypt
2803 install -D dnscrypt/src/proxy/.libs/dnscrypt-proxy $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
2804 install -D dnscrypt/src/hostip/.libs/hostip $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
2805 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
2806 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
2808 dnscrypt-clean:
2809 -@$(MAKE) -C dnscrypt clean
2810 @rm -rf dnscrypt/stamp-h1 dnscrypt/src/dnscrypt-proxy/.deps dnscrypt/Makefile
2812 tor/stamp-h1: openssl zlib libevent
2813 cd $(TOP)/tor && CC=$(CC) STRIP=$(STRIP) \
2814 autoreconf && \
2815 CFLAGS="-O2 -Wall $(EXTRACFLAGS)" \
2816 $(CONFIGURE) --prefix=/usr --with-libevent-dir=$(TOP)/libevent/staged/usr/local \
2817 --with-openssl-dir=$(TOP)/openssl --with-zlib-dir=$(TOP)/zlib \
2818 --disable-asciidoc --disable-tool-name-check
2819 touch tor/stamp-h1
2821 tor: tor/stamp-h1
2822 $(MAKE) -C tor $(PARALLEL_BUILD)
2824 tor-install: tor
2825 install -D tor/src/or/tor $(INSTALLDIR)/tor/usr/sbin/tor
2826 $(STRIP) -s $(INSTALLDIR)/tor/usr/sbin/tor
2828 tor-clean:
2829 -@$(MAKE) -C tor clean
2830 @rm -rf tor/stamp-h1 tor/Makefile
2832 udpxy/stamp-h1:
2833 cd udpxy \
2834 $(MAKE) -C udpxy CFLAGS="-Os -Wall --host=$(HOST) --target=$(HOST) $(EXTRACFLAGS)" \
2835 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections"
2836 touch udpxy/stamp-h1
2838 udpxy-clean:
2839 -@$(MAKE) -C udpxy clean
2840 @rm -f udpxy/stamp-h1
2842 udpxy-install: udpxy/stamp-h1
2843 install -d $(INSTALLDIR)/udpxy/usr/bin
2844 install -D udpxy/udpxy $(INSTALLDIR)/udpxy/bin/udpxy
2845 $(STRIP) -s $(INSTALLDIR)/udpxy/bin/udpxy
2847 mdadm:
2848 $(MAKE) -C mdadm $(PARALLEL_BUILD)
2850 mdadm-install: mdadm
2851 install -D mdadm/mdadm $(INSTALLDIR)/mdadm/usr/sbin/mdadm
2852 $(STRIP) -s $(INSTALLDIR)/mdadm/usr/sbin/mdadm
2854 mdadm-clean:
2855 -@$(MAKE) -C mdadm clean
2857 libmnl/stamp-h1:
2858 cd $(TOP)/libmnl && CC=$(CC) STRIP=$(STRIP) \
2859 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2860 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
2861 $(CONFIGURE) --prefix=/usr
2862 touch libmnl/stamp-h1
2864 libmnl: libmnl/stamp-h1
2865 $(MAKE) -C libmnl
2866 $(MAKE) -C libmnl DESTDIR=$(TOP)/libmnl/staged install
2868 libmnl-install: libmnl
2869 install -d $(INSTALLDIR)/libmnl/usr/lib/
2870 install libmnl/src/.libs/libmnl.so.0.1.0 $(INSTALLDIR)/libmnl/usr/lib/libmnl.so.0.1.0
2871 $(STRIP) $(INSTALLDIR)/libmnl/usr/lib/libmnl.so.0.1.0
2872 cd $(INSTALLDIR)/libmnl/usr/lib/ && \
2873 ln -sf libmnl.so.0.1.0 libmnl.so.0 && \
2874 ln -sf libmnl.so.0.1.0 libmnl.so
2876 libmnl-clean:
2877 -@$(MAKE) -C libmnl clean
2878 -@rm -rf libmnl/staged
2880 ipset/stamp-h1: libmnl
2881 cd $(TOP)/ipset && CC=$(CC) STRIP=$(STRIP) \
2882 autoreconf && \
2883 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2884 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
2885 libmnl_CFLAGS="-I$(TOP)/libmnl/staged/usr/include" \
2886 libmnl_LIBS="-L$(TOP)/libmnl/staged/usr/lib -lmnl" \
2887 $(CONFIGURE) --prefix=/usr --with-kmod=no
2888 touch ipset/stamp-h1
2890 ipset: ipset/stamp-h1
2891 $(MAKE) -C ipset
2893 ipset-install: ipset
2894 install -D ipset/src/ipset $(INSTALLDIR)/ipset/usr/sbin/ipset
2895 install -d $(INSTALLDIR)/ipset/usr/lib/
2896 install ipset/lib/.libs/libipset.so.3.6.0 $(INSTALLDIR)/ipset/usr/lib/libipset.so.3.6.0
2897 $(STRIP) $(INSTALLDIR)/ipset/usr/lib/libipset.so.3.6.0
2898 $(STRIP) $(INSTALLDIR)/ipset/usr/sbin/ipset
2899 cd $(INSTALLDIR)/ipset/usr/lib/ && \
2900 ln -sf libipset.so.3.6.0 libipset.so.3 && \
2901 ln -sf libipset.so.3.6.0 libipset.so
2903 ipset-clean:
2904 -@$(MAKE) -C ipset clean
2905 -@rm -rf ipset/Makefile ipset/stamp-h1
2907 libjson-c/stamp-h1:
2908 cd $(TOP)/libjson-c && CC=$(CC) STRIP=$(CROSS_COMPILE)strip \
2909 ./autogen.sh && \
2910 $(CONFIGURE) --prefix=/usr
2911 touch libjson-c/stamp-h1
2913 libjson-c: libjson-c/stamp-h1
2914 $(MAKE) -C libjson-c $(PARALLEL_BUILD)
2916 libjson-c-clean:
2917 -@$(MAKE) -C libjson-c clean
2918 @rm -rf libjson-c/stamp-h1
2920 uqmi: libjson-c
2921 $(MAKE) -C uqmi/libubox
2922 $(MAKE) -C uqmi SHARED=0 CC='$(CC) -static'
2924 uqmi-install: uqmi
2925 install -D uqmi/uqmi $(INSTALLDIR)/uqmi/usr/sbin/uqmi
2926 $(STRIP) $(INSTALLDIR)/uqmi/usr/sbin/uqmi
2928 uqmi-clean: libjson-c-clean
2929 -@$(MAKE) -C uqmi/libubox clean
2930 -@$(MAKE) -C uqmi clean
2932 comgt:
2933 @$(MAKE) -C comgt CC=$(CC) CFLAGS="$(EXTRACFLAGS)" LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" comgt
2935 comgt-install: comgt
2936 install -D comgt/comgt $(INSTALLDIR)/comgt/usr/sbin/comgt
2937 cd $(INSTALLDIR)/comgt/usr/sbin/ && \
2938 ln -sf comgt gcom
2939 $(STRIP) -s $(INSTALLDIR)/comgt/usr/sbin/comgt
2940 @mkdir -p $(TARGETDIR)/rom/etc/gcom
2941 @cp -f comgt/gcom/* $(TARGETDIR)/rom/etc/gcom/
2943 comgt-clean:
2944 -@$(MAKE) -C comgt clean
2947 # Generic rules
2951 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
2954 %-clean:
2955 @-[ ! -d $* ] || $(MAKE) -C $* clean
2957 %-distclean:
2958 @-[ ! -d $* ] || $(MAKE) -C $* distclean
2960 %-install: %
2961 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
2963 %-build:
2964 $(MAKE) $*-clean $*
2966 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
2968 .PHONY: all clean distclean mrproper install package image
2969 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
2970 .PHONY: dummy libnet libpcap