dnsmasq: Update to v2.67test14.
[tomato.git] / release / src / router / Makefile
blobf0e194c9ba7e3c7701ac24b17a400e85bd7801ce
2 # Broadcom Linux Router Makefile
4 # Copyright 2005, Broadcom Corporation
5 # All Rights Reserved.
7 # THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8 # KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9 # SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10 # FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
14 include common.mak
16 #TOMATO_EXPERIMENTAL=0
18 #export PARALLEL_BUILD :=
19 export PARALLEL_BUILD := -j`grep -c '^processor' /proc/cpuinfo`
24 SEP=echo -e "\033[41;1m $@ \033[0m"
27 # standard packages
29 obj-y += lzma-loader
30 obj-y += nvram
31 obj-y += shared
32 obj-y += prebuilt
33 obj-y += igmpproxy
34 obj-y += iptables
35 obj-y += rc
36 obj-y += iproute2
37 obj-y += rom
38 obj-y += others
39 obj-y += busybox
40 obj-y += httpd
41 obj-y += www
42 obj-y += bridge
43 obj-y += dnsmasq
44 obj-y += etc
45 # obj-y += vlan # use Busybox vconfig
46 obj-y += pppd
47 obj-y += rp-pppoe
48 obj-y += utils
49 obj-y += ntpc
50 obj-y += rstats
51 obj-$(TCONFIG_SNMP) += snmp
52 obj-y += cstats
53 obj-y += udpxy
54 obj-$(TCONFIG_DNSCRYPT) += dnscrypt
56 # !!TB - updated Broadcom Wireless driver
57 obj-y += et
58 obj-y += libbcmcrypto
59 obj-y += wlconf
61 obj-y += cyassl
62 obj-y += mssl
63 obj-y += mdu
65 #Roadkill
66 obj-$(TCONFIG_NOCAT) += nocat
68 # !!TB
69 obj-$(TCONFIG_USB) += p910nd
71 ifeq ($(CONFIG_LINUX26),y)
72 obj-$(TCONFIG_USB) += sd-idle
73 else
74 obj-$(TCONFIG_USB) += scsi-idle
75 endif
77 obj-y += libusb10
78 #obj-y += libusb
79 obj-y += usbmodeswitch
80 obj-$(TCONFIG_FTP) += vsftpd
82 ifeq ($(CONFIG_LINUX26),y)
83 ifeq ($(TCONFIG_SAMBASRV),y)
84 NEED_EX_NLS = y
85 endif
86 ifeq ($(TCONFIG_USB_EXTRAS),y)
87 NEED_EX_USB = y
88 endif
89 endif
91 ifeq ($(TCONFIG_SAMBASRV),y)
92 ifeq ($(TCONFIG_SAMBA3),y)
93 NEED_SAMBA3 = y
94 else
95 NEED_SAMBA2 = y
96 endif
97 endif
99 ifeq ($(TCONFIG_IPV6),y)
100 export TCONFIG_IPV6 := y
101 else
102 TCONFIG_IPV6 :=
103 endif
105 obj-$(NEED_SAMBA2) += samba
106 obj-$(NEED_SAMBA3) += samba3
107 obj-$(TCONFIG_NTFS) += ntfs-3g
108 obj-$(TCONFIG_EBTABLES) += ebtables
109 obj-$(TCONFIG_IPV6) += dhcpv6
111 obj-$(TCONFIG_MEDIA_SERVER) += zlib
112 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
113 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
114 obj-$(TCONFIG_MEDIA_SERVER) += libogg
115 obj-$(TCONFIG_MEDIA_SERVER) += flac
116 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
117 obj-$(TCONFIG_MEDIA_SERVER) += libexif
118 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
119 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
120 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
121 MEDIA_SERVER_STATIC=y
123 obj-y += libnfnetlink
124 obj-y += miniupnpd
125 # obj-y += upnp
127 # configurable packages
129 obj-$(TCONFIG_L2TP) += xl2tpd
130 obj-$(TCONFIG_PPTP) += accel-pptp
131 obj-$(TCONFIG_PPTPD) += pptpd
132 obj-$(TCONFIG_HTTPS) += openssl
133 obj-$(TCONFIG_SSH) += dropbear
134 obj-$(TCONFIG_ZEBRA) += zebra
135 # obj-$(TCONFIG_IPP2P) += ipp2p
136 obj-$(TCONFIG_LZO) += lzo
137 obj-$(TCONFIG_OPENVPN) += openvpn
138 obj-$(TCONFIG_EMF) += emf
139 obj-$(TCONFIG_EMF) += igs
141 #Roadkill - NGinX
142 obj-$(TCONFIG_NGINX) += openssl
143 obj-$(TCONFIG_NGINX) += pcre
144 obj-$(TCONFIG_NGINX) += php
145 obj-$(TCONFIG_NGINX) += nginx
147 obj-$(CONFIG_LINUX26) += hotplug2
148 obj-$(CONFIG_LINUX26) += udevtrigger
150 ifeq ($(TCONFIG_OPENVPN),y)
151 export FULL_OPENSSL := y
152 else
153 ifeq ($(TCONFIG_FTP_SSL),y)
154 export FULL_OPENSSL := y
155 else
156 FULL_OPENSSL :=
157 endif
158 endif
160 obj-y += wanuptime
162 obj-$(TCONFIG_TCPDUMP) += lpcap tcpdump
164 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
165 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
168 # Basic rules
171 all: clean-build libc $(obj-y) kernel
174 kernel: $(LINUXDIR)/.config
175 @$(SEP)
177 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
178 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC) $(PARALLEL_BUILD); \
180 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
181 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD); \
183 ifeq ($(CONFIG_LINUX26),y)
184 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR) $(PARALLEL_BUILD)
185 endif
188 lzma-loader:
189 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD) $(PARALLEL_BUILD)
191 lzma-loader-install: lzma-loader
192 @$(SEP)
195 kmod: dummy
196 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD)
198 testfind:
199 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
200 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
202 install package: $(obj-install) $(LINUXDIR)/.config
203 @$(SEP)
205 install -d $(TARGETDIR)
208 # kernel modules
209 $(MAKE) -C $(LINUXDIR) modules_install \
210 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" \
211 DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
213 ifneq ($(CONFIG_LINUX26),y)
214 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded -x {} \;
215 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded -x {} \;
216 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded -x {} \;
217 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded -x {} \;
218 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded -x {} \;
219 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded -x {} \;
220 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded -x {} \;
222 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug -x -R .mdebug.abi32 {} \;
223 endif
225 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
227 # nice and clean
228 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
229 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
230 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
231 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
232 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
233 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
234 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
235 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
236 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
237 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
239 ##!!TB
240 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
241 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
242 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
243 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
244 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jfs/* . && rm -rf jfs || true
245 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
246 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
247 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
248 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
249 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
250 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
251 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfs/* . && rm -rf hfs || true
252 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
253 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
254 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
255 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
256 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
257 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
258 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
259 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
260 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
261 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
262 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
263 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
264 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
265 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
266 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
267 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
268 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
269 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
270 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
271 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
272 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
273 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv core/* . && rm -rf core || true
274 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv card/* . && rm -rf card || true
275 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv host/* . && rm -rf host || true
276 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
277 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
278 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
279 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
280 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
281 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
282 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv pwc/* . && rm -rf pwc || true
283 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv gl860/* . && rm -rf gl860 || true
284 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv m5602/* . && rm -rf m5602 || true
285 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv stv06xx/* . && rm -rf stv06xx || true
286 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv gspca/* . && rm -rf gspca || true
287 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
289 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
290 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
291 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
292 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
293 cd $(TARGETDIR)/lib/modules && rm -f */source || true
295 # misc
296 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
297 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
298 done
300 ifneq ($(TCONFIG_L7),y)
301 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
302 endif
304 # uClibc
305 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
306 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
307 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
308 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
309 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
310 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
311 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
312 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
313 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
314 ifeq ($(TCONFIG_SSH),y)
315 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
316 endif
317 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
318 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
319 $(STRIP) $(TARGETDIR)/lib/*.so.0
320 endif
322 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
324 @echo ---
326 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
327 @$(SRCBASE)/btools/libfoo.pl
328 else
329 @$(SRCBASE)/btools/libfoo.pl --noopt
330 endif
331 @chmod 0555 $(TARGETDIR)/lib/*.so*
332 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
334 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
335 # separated/copied extra stuff
336 @rm -rf $(PLATFORMDIR)/extras
337 @mkdir $(PLATFORMDIR)/extras
338 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
340 $(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
341 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
343 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
344 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
345 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
346 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
347 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
348 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/jfs.*o $(PLATFORMDIR)/extras/ || true
349 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
350 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
351 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
352 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
353 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
354 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
355 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
356 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
357 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
358 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
360 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
361 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
362 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
363 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*acm.*o $(PLATFORMDIR)/extras/ || true
364 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_ether.*o $(PLATFORMDIR)/extras/ || true
365 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
366 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/usbnet.*o $(PLATFORMDIR)/extras/ || true
367 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
368 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/rndis_host.*o $(PLATFORMDIR)/extras/ || true
369 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
370 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc/*.*o $(PLATFORMDIR)/extras/ || true
371 $(if $(NEED_EX_USB),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc || true
373 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
374 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
375 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
376 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
377 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
378 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
379 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
380 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
381 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
382 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
383 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
384 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
385 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
386 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
387 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
388 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
389 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
390 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
391 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
392 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
393 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
394 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ctf*.*o $(PLATFORMDIR)/extras/ || true
395 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
396 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
397 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
398 @mv $(TARGETDIR)/lib/modules/*/kernel/crypto/* $(PLATFORMDIR)/extras/ || true
399 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/crypto || true
401 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
402 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
403 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
404 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
405 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
406 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
407 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
409 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
410 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
411 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
412 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
413 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
414 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
415 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
416 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
417 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
418 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
419 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
420 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
421 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfs.*o $(PLATFORMDIR)/extras/ || true
422 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
424 ifneq ($(TCONFIG_USB),y)
425 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
426 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
427 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
428 endif
430 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
431 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
432 ifneq ($(TCONFIG_USB_EXTRAS),y)
433 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
434 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
435 endif
436 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
437 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
438 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
439 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
440 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
441 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
442 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
444 @mkdir -p $(PLATFORMDIR)/extras/apps
445 @mkdir -p $(PLATFORMDIR)/extras/lib
447 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
448 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
449 @cp -r $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
451 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
452 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
453 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
454 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
455 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
456 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
457 ifneq ($(NEED_EX_USB),y)
458 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
459 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
460 endif
461 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
463 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
464 ifeq ($(TCONFIG_L7PAT),y)
465 @cd layer7 && ./squish.sh
466 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
467 endif
469 ifeq ($(TCONFIG_USERPPTP),y)
470 @mkdir -p $(TARGETDIR)/rom/etc/vpn
471 cp rc/vpn/* $(TARGETDIR)/rom/etc/vpn
472 chmod +x $(TARGETDIR)/rom/etc/vpn/*
473 endif
475 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
476 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
477 @echo ---
479 @rm -f $(TARGETDIR)/lib/modules/*/build
481 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
482 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -no-duplicates | tee target.info
484 # Package kernel and filesystem
485 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
486 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
487 # $(MAKE) -C $(LINUXDIR) zImage ; \
488 # else \
489 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
490 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
491 # fi
493 # Pad self-booting Linux to a 64 KB boundary
494 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
495 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
496 # Append filesystem to self-booting Linux
497 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
500 libc: $(LIBDIR)/ld-uClibc.so.0
501 # $(MAKE) -C ../../../tools-src/uClibc all
502 # $(MAKE) -C ../../../tools-src/uClibc install
506 # cleaners
509 clean: clean-build $(obj-clean)
510 rm -rf layer7/squished
511 rm -f .ipv6-y .ipv6-n
512 rm -f .fullssl-y .fullssl-n
513 make -C config clean
515 clean-build: dummy
516 rm -rf $(TARGETDIR)
517 rm -rf $(INSTALLDIR)
518 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
519 rm -rf $(PLATFORMDIR)/extras
521 distclean: clean
522 ifneq ($(INSIDE_MAK),1)
523 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
524 endif
525 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
528 # configuration
531 CONFIG_IN := config/config.in
533 config/conf config/mconf:
534 @$(MAKE) -C config
536 rconf: config/conf
537 @config/conf $(CONFIG_IN)
539 rmconf: config/mconf
540 @config/mconf $(CONFIG_IN)
542 roldconf: config/conf
543 @config/conf -o $(CONFIG_IN)
544 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean et-clean
546 kconf:
547 @$(MAKE) -C $(LINUXDIR) config
549 kmconf:
550 @$(MAKE) -C $(LINUXDIR) menuconfig
552 koldconf:
553 @$(MAKE) -C $(LINUXDIR) oldconfig
554 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
556 bboldconf:
557 @$(MAKE) -C busybox oldconfig
559 config conf: rconf kconf
561 menuconfig mconf: rmconf kmconf
563 .ipv6-y .ipv6-n:
564 @rm -f .ipv6-y .ipv6-n
565 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
566 @touch $@
568 .fullssl-y .fullssl-n:
569 @rm -f .fullssl-y .fullssl-n
570 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
571 @touch $@
573 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
575 oldconfig oldconf: koldconf roldconf dependconf bboldconf
579 # overrides and extra dependencies
582 busybox: dummy
583 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" $(PARALLEL_BUILD)
585 busybox-install:
586 rm -rf $(INSTALLDIR)/busybox
587 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
589 busybox-clean:
590 -@$(MAKE) -C busybox distclean
592 busybox-config:
593 $(MAKE) -C busybox menuconfig
596 httpd: shared nvram mssl
597 @$(SEP)
598 @$(MAKE) -C httpd
600 www-install:
601 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
603 matrixssl:
604 @$(SEP)
605 @$(MAKE) -C matrixssl/src
607 matrixssl-install:
608 @true
610 matrixssl-clean:
611 -@$(MAKE) -C matrixssl/src clean
613 cyassl/stamp-h1:
614 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
615 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections \
616 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
617 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
618 PTHREAD_LIBS="-lpthread" \
619 $(CONFIGURE)
620 @touch cyassl/stamp-h1
622 cyassl: cyassl/stamp-h1
623 @$(SEP)
624 @$(MAKE) -C cyassl
626 cyassl-clean:
627 -@$(MAKE) -C cyassl clean
628 @rm -f cyassl/stamp-h1
630 cyassl-install:
631 @true
633 ifeq ($(FULL_OPENSSL),y)
634 OPENSSL_CIPHERS:=enable-rc5
635 else
636 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-engine no-aes192 no-cast
637 endif
639 openssl/stamp-h1:
640 cd openssl && \
641 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
642 -ffunction-sections -fdata-sections -Wl,--gc-sections \
643 shared $(OPENSSL_CIPHERS) \
644 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
645 no-seed no-capieng no-cms no-gms no-gmp no-rfc3779 \
646 no-ec no-ecdh no-ecdsa no-err no-hw no-jpake no-threads \
647 no-zlib no-engines no-sse2 \
648 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
650 @$(MAKE) -C openssl clean
651 @touch openssl/stamp-h1
653 openssl: openssl/stamp-h1
655 openssl-clean:
656 -@$(MAKE) -C openssl clean
657 @rm -f openssl/stamp-h1
659 openssl-install: openssl
660 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
661 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
662 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
664 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
665 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
666 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
668 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
670 ifeq ($(FULL_OPENSSL),y)
671 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
672 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
673 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
674 endif
676 mssl: $(if $(FULL_OPENSSL),openssl,cyassl)
678 mdu: shared mssl
680 rc: nvram shared
682 bridge/Makefile:
683 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
684 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
686 bridge: bridge/Makefile
687 @$(SEP)
688 @$(MAKE) -C bridge
690 bridge-clean:
691 -@$(MAKE) -C bridge clean
692 @rm -f bridge/Makefile
694 bridge-install:
695 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
696 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
698 dnsmasq:
699 @$(SEP)
700 @$(MAKE) -C dnsmasq $(PARALLEL_BUILD) \
701 COPTS="$(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6) $(if $(CONFIG_LINUX26),-DUSE_IPSET,-DNO_IPSET) -DHAVE_BROKEN_RTC -DHAVE_TOMATO $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
702 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC"
704 dnsmasq-install:
705 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
706 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
708 iptables:
709 ifeq ($(CONFIG_LINUX26),y)
710 cp -f iptables/extensions/libipt_ipp2p_K26.c iptables/extensions/libipt_ipp2p.c
711 else
712 cp -f iptables/extensions/libipt_ipp2p_K24.c iptables/extensions/libipt_ipp2p.c
713 endif
714 @$(SEP)
715 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE"
717 iptables-install:
718 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
719 cd $(INSTALLDIR)/iptables/usr/sbin && \
720 ln -sf iptables iptables-restore && \
721 ln -sf iptables iptables-save
723 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
724 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
726 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
728 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
729 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
730 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
732 ifeq ($(TCONFIG_IPV6),y)
733 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
734 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
735 cd $(INSTALLDIR)/iptables/usr/sbin && \
736 ln -sf ip6tables ip6tables-restore && \
737 ln -sf ip6tables ip6tables-save
738 endif
740 iptables-clean:
741 -@$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
743 ppp:
744 @$(SEP)
745 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,) $(PARALLEL_BUILD)
746 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
748 ppp-%:
749 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
751 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
752 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
753 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
754 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
755 @touch rp-pppoe/src/stamp-h1
757 rp-pppoe: pppd rp-pppoe/src/stamp-h1
758 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so $(PARALLEL_BUILD)
760 rp-pppoe-clean:
761 -@$(MAKE) -C rp-pppoe/src clean
762 @rm -f rp-pppoe/src/pppoe-relay
763 @rm -f rp-pppoe/src/stamp-h1
765 rp-pppoe-install: rp-pppoe
766 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
767 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
768 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
769 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
772 upnp: nvram shared iptables
774 libnfnetlink/stamp-h1:
775 cd $(TOP)/libnfnetlink && CC=$(CC) STRIP='mipsel-uclibc-strip' \
776 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
777 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
778 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
779 touch libnfnetlink/stamp-h1
781 libnfnetlink: libnfnetlink/stamp-h1
782 @$(SEP)
783 $(MAKE) -C libnfnetlink
785 libnfnetlink-install:
786 install -D libnfnetlink/src/.libs/libnfnetlink.so.0.2.0 $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
787 $(STRIP) -s $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
788 cd $(INSTALLDIR)/libnfnetlink/usr/lib/ && \
789 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so.0 && \
790 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so
792 miniupnpd-config:
793 #ifeq ($(TCONFIG_IPV6),y)
794 # @cd miniupnpd && ./genconfig.sh --leasefile --ipv6
795 #else
796 @cd miniupnpd && ./genconfig.sh --leasefile
797 #endif
799 miniupnpd: iptables miniupnpd-config libnfnetlink
800 @$(SEP)
801 $(MAKE) -C miniupnpd miniupnpd -f Makefile.linux CC=$(CC) \
802 CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/iptables/include -I$(TOP)/libnfnetlink/include" \
803 LDFLAGS="-L$(TOP)/iptables -liptc -L$(TOP)/libnfnetlink/src/.libs -lnfnetlink" LIBS="" $(PARALLEL_BUILD)
805 miniupnpd-clean:
806 -@$(MAKE) -C miniupnpd -f Makefile.linux clean
807 @rm -f miniupnpd/config.h
809 miniupnpd-install:
810 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
811 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
813 # !!TB
814 shared: busybox
816 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
817 @$(SEP)
818 $(MAKE) -C vsftpd $(PARALLEL_BUILD)
820 vsftpd-install: vsftpd
821 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
822 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
824 ntfs-3g/Makefile:
825 cd ntfs-3g && \
826 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
827 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
828 $(CONFIGURE) --enable-shared=no --enable-static=no \
829 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
830 --disable-ntfsprogs --disable-crypto --without-uuid \
831 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
833 ntfs-3g: ntfs-3g/Makefile
834 @$(MAKE) -C ntfs-3g $(PARALLEL_BUILD)
836 ntfs-3g-clean:
837 -@$(MAKE) -C ntfs-3g clean
838 @rm -f ntfs-3g/Makefile
840 ntfs-3g-install: ntfs-3g
841 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
842 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
843 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
844 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
845 ln -sf ../bin/ntfs-3g mount.ntfs
847 libusb10/Makefile: libusb10/Makefile.in
848 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
849 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
851 libusb10: libusb10/Makefile
852 $(MAKE) -C $@
854 libusb10-install: libusb10
855 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
856 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
858 libusb10-clean:
859 -@$(MAKE) -C $@ clean
860 @rm -rf libusb10/Makefile
862 libusb/Makefile: libusb/Makefile.in
863 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
864 $(CONFIGURE) --prefix=/usr \
865 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
866 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
867 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
869 libusb: libusb10 libusb/Makefile
870 $(MAKE) -C $@
872 libusb-install: libusb
873 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
874 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
876 libusb-clean:
877 -@$(MAKE) -C $@ clean
878 @rm -rf libusb/Makefile
880 usbmodeswitch: libusb10
881 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
882 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
883 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
885 usbmodeswitchdb-install:
886 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
887 # compress whitespace
888 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
889 F=`basename $$D`; \
890 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
891 done
893 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
894 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
895 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
896 @mkdir -p $(TARGETDIR)/rom/etc
897 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
899 dhcpv6/stamp-h1:
900 @cd dhcpv6 && \
901 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
902 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
903 ac_cv_func_setpgrp_void=yes \
904 $(CONFIGURE) --prefix= --with-localdbdir=/var
905 @$(MAKE) -C dhcpv6 clean
906 @touch dhcpv6/stamp-h1
908 dhcpv6: dhcpv6/stamp-h1
909 @$(SEP)
910 @$(MAKE) -C dhcpv6 dhcp6c
912 dhcpv6-install: dhcpv6
913 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
914 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
916 dhcpv6-clean:
917 -@$(MAKE) -C dhcpv6 clean
918 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
921 p910nd:
922 samba:
923 samba3:
925 nvram: shared
927 prebuilt: shared libbcmcrypto
929 vlan:
930 @$(SEP)
931 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
933 vlan-install:
934 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
935 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
938 pptp-client-install:
939 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
940 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
943 accel-pptp: pppd accel-pptp/Makefile
944 @$(MAKE) -C accel-pptp
946 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
947 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
948 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
950 accel-pptp-clean:
951 -@$(MAKE) -C accel-pptp clean
952 @rm -f accel-pptp/Makefile
954 accel-pptp-install: accel-pptp
955 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
956 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
958 pptpd/stamp-h1:
959 cd pptpd && $(CONFIGURE) --prefix=$(INSTALLDIR)/pptpd --enable-bcrelay CC=mipsel-uclibc-gcc \
960 STRIP=mipsel-uclibc-strip AR=mipsel-uclibc-ar LD=mipsel-uclibc-ld NM=mipsel-uclibc-nm RANLIB=mipsel-uclibc-ranlib
961 touch pptpd/stamp-h1
963 pptpd: pptpd/stamp-h1
965 pptpd-install: pptpd
966 @echo pptpd
967 @install -D pptpd/pptpd $(INSTALLDIR)/pptpd/usr/sbin/pptpd
968 @install -D pptpd/bcrelay $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
969 @install -D pptpd/pptpctrl $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
970 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpd
971 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
972 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
974 pptpd-clean:
975 -@$(MAKE) -C pptpd clean
976 rm -rf pptpd/stamp-h1 pptpd/.deps
978 pppd/Makefile: pppd/linux/Makefile.top
979 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
981 pppd: pppd/Makefile
982 @$(SEP)
983 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
985 pppd-clean:
986 -@$(MAKE) -C pppd clean
987 @rm -f pppd/Makefile
989 pppd-install: pppd
990 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
991 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
992 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
993 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
994 ifeq ($(TCONFIG_L2TP),y)
995 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
996 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
997 endif
999 # ipupdate-install:
1000 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1001 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1003 zebra/stamp-h1:
1004 @cd zebra && rm -f config.cache && \
1005 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1006 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1007 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1008 $(CONFIGURE) --sysconfdir=/etc \
1009 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
1010 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
1011 @touch zebra/stamp-h1
1013 zebra: zebra/stamp-h1
1014 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
1016 zebra-clean:
1017 -@$(MAKE) -C zebra clean
1018 @rm -f zebra/stamp-h1
1020 zebra-install: zebra
1021 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
1022 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
1023 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1024 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
1025 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
1026 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1029 rp-l2tp-install:
1030 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1031 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1032 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
1033 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1034 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1035 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1036 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1038 xl2tpd: pppd
1039 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
1041 xl2tpd-install: xl2tpd
1042 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1043 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1046 bpalogin-install:
1047 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1048 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1050 libbcm:
1051 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
1053 libbcm-install:
1054 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1055 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1058 iproute2:
1059 @$(SEP)
1060 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1062 iproute2-install: iproute2
1063 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1064 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1065 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1066 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1069 ntpc: nvram shared
1072 dropbear: dropbear/config.h
1073 @$(SEP)
1074 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1 $(PARALLEL_BUILD)
1076 dropbear-install:
1077 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1078 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1079 cd $(INSTALLDIR)/dropbear/usr/bin && \
1080 ln -sf dropbearmulti dropbear && \
1081 ln -sf dropbearmulti dropbearconvert && \
1082 ln -sf dropbearmulti dropbearkey && \
1083 ln -sf dropbearmulti dbclient && \
1084 ln -sf dropbearmulti ssh && \
1085 ln -sf dropbearmulti scp
1087 dropbear-clean:
1088 -@$(MAKE) -C dropbear clean
1089 @rm -f dropbear/config.h
1091 dropbear/config.h:
1092 cd dropbear && \
1093 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1094 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1095 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1096 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1097 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1098 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty --enable-bundled-libtom
1099 @$(MAKE) -C dropbear clean
1101 # Media libraries
1103 sqlite/stamp-h1:
1104 cd sqlite && \
1105 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1106 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1107 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1108 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1109 touch sqlite/stamp-h1
1111 sqlite: sqlite/stamp-h1
1112 @$(MAKE) -C sqlite all $(PARALLEL_BUILD)
1114 sqlite-clean:
1115 -@$(MAKE) -C sqlite clean
1116 @rm -f sqlite/stamp-h1
1118 sqlite-install: sqlite
1119 @$(SEP)
1120 ifneq ($(MEDIA_SERVER_STATIC),y)
1121 install -D sqlite/.libs/libsqlite3.so.0 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1122 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1123 endif
1125 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1127 FFMPEG_DECODERS:=aac ac3 atrac3 flac h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1128 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1130 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1131 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1133 FFMPEG_PROTOCOLS:=file
1134 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1136 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
1137 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1139 ffmpeg/stamp-h1: zlib
1140 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1141 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1142 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1143 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1144 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1145 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1146 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1147 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1148 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1149 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1150 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1151 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1152 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1153 --extra-libs="-L$(TOP)/zlib -lz" \
1154 --enable-zlib --disable-debug --prefix=''
1155 touch ffmpeg/stamp-h1
1157 ffmpeg: ffmpeg/stamp-h1 zlib
1158 @$(MAKE) -C ffmpeg all $(PARALLEL_BUILD)
1160 ffmpeg-clean:
1161 -@$(MAKE) -C ffmpeg clean
1162 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1164 ffmpeg-install: ffmpeg
1165 @$(SEP)
1166 ifneq ($(MEDIA_SERVER_STATIC),y)
1167 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1168 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1169 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1170 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1171 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1172 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1173 endif
1175 libogg/stamp-h1:
1176 cd libogg && \
1177 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1178 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1179 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1180 touch libogg/stamp-h1
1182 libogg: libogg/stamp-h1
1183 @$(MAKE) -C libogg all $(PARALLEL_BUILD)
1185 libogg-clean:
1186 -@$(MAKE) -C libogg clean
1187 @rm -f libogg/stamp-h1
1189 libogg-install: libogg
1190 @$(SEP)
1191 ifneq ($(MEDIA_SERVER_STATIC),y)
1192 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1193 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1194 endif
1196 flac/stamp-h1: libogg
1197 cd flac && \
1198 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1199 CPPFLAGS="-I$(TOP)/libogg/include -I$(LINUXDIR)/include" \
1200 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1201 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1202 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1203 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1204 touch flac/stamp-h1
1206 flac: flac/stamp-h1 libogg
1207 @$(MAKE) -C flac/src/libFLAC all $(PARALLEL_BUILD)
1209 flac-clean:
1210 -@$(MAKE) -C flac clean
1211 @rm -f flac/stamp-h1
1213 flac-install: flac
1214 @$(SEP)
1215 ifneq ($(MEDIA_SERVER_STATIC),y)
1216 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1217 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1218 endif
1220 jpeg/stamp-h1:
1221 cd jpeg && \
1222 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1223 touch jpeg/stamp-h1
1225 jpeg: jpeg/stamp-h1
1226 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so $(PARALLEL_BUILD)
1228 jpeg-clean:
1229 -@$(MAKE) -C jpeg clean
1230 @rm -f jpeg/stamp-h1 jpeg/Makefile
1232 jpeg-install: jpeg
1233 @$(SEP)
1234 ifneq ($(MEDIA_SERVER_STATIC),y)
1235 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1236 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1237 endif
1239 libexif/stamp-h1:
1240 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1241 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1242 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1243 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1244 touch libexif/stamp-h1
1246 libexif: libexif/stamp-h1
1247 @$(MAKE) -C libexif all
1249 libexif-clean:
1250 -@$(MAKE) -C libexif clean
1251 @rm -f libexif/stamp-h1
1253 libexif-install: libexif
1254 @$(SEP)
1255 ifneq ($(MEDIA_SERVER_STATIC),y)
1256 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1257 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1258 endif
1260 zlib/stamp-h1:
1261 cd zlib && \
1262 CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1263 ./configure --shared --prefix='/usr'
1264 @touch zlib/stamp-h1
1266 zlib: zlib/stamp-h1
1267 @$(SEP)
1268 @$(MAKE) -C zlib CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) all
1270 zlib-clean:
1271 -@$(MAKE) -C zlib clean
1272 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1274 zlib-install: zlib
1275 @$(SEP)
1276 ifneq ($(MEDIA_SERVER_STATIC),y)
1277 install -D zlib/libz.so.1.2.5 $(INSTALLDIR)/zlib/usr/lib/libz.so.1.2.5
1278 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1.2.5
1279 cd $(INSTALLDIR)/zlib/usr/lib && ln -s libz.so.1.2.5 libz.so.1 && ln -s libz.so.1.2.5 libz.so
1280 endif
1282 libid3tag/stamp-h1: zlib
1283 cd libid3tag && \
1284 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1285 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1286 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1287 --disable-debugging --disable-profiling
1288 touch libid3tag/stamp-h1
1290 libid3tag: libid3tag/stamp-h1 zlib
1291 @$(MAKE) -C libid3tag all $(PARALLEL_BUILD)
1293 libid3tag-clean:
1294 -@$(MAKE) -C libid3tag distclean
1295 @rm -f libid3tag/stamp-h1
1297 libid3tag-install: libid3tag
1298 @$(SEP)
1299 ifneq ($(MEDIA_SERVER_STATIC),y)
1300 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1301 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1302 endif
1304 libvorbis/stamp-h1: libogg
1305 cd libvorbis && \
1306 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1307 CPPFLAGS="-I$(TOP)/libogg/include" \
1308 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1309 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1310 --with-ogg-includes="$(TOP)/libogg/include" \
1311 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1312 touch libvorbis/stamp-h1
1314 libvorbis: libvorbis/stamp-h1
1315 @$(MAKE) -C libvorbis/lib all $(PARALLEL_BUILD)
1317 libvorbis-clean:
1318 -@$(MAKE) -C libvorbis clean
1319 @rm -f libvorbis/stamp-h1
1321 libvorbis-install: libvorbis
1322 @$(SEP)
1323 ifneq ($(MEDIA_SERVER_STATIC),y)
1324 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1325 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1326 endif
1328 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1329 @$(SEP)
1330 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna $(PARALLEL_BUILD)
1333 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1334 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1335 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1336 $(CONFIGURE) --prefix=/usr
1338 igmpproxy: igmpproxy/src/Makefile
1339 @$(SEP)
1340 @$(MAKE) -C igmpproxy/src $(PARALLEL_BUILD)
1342 igmpproxy-install: igmpproxy
1343 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1344 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1346 igmpproxy-clean:
1347 -@$(MAKE) -C igmpproxy/src clean
1348 @rm -f igmpproxy/src/Makefile
1350 udev:
1351 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1352 PROGRAMS=udevtrigger
1354 udev-install: udev
1355 install -d $(INSTALLDIR)
1356 install -d $(TARGETDIR)
1357 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1359 hotplug2:
1360 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1362 hotplug2-install: hotplug2
1363 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1364 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1366 emf:
1367 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1369 emf-install: emf
1370 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1372 igs:
1373 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1375 igs-install: igs
1376 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1378 wanuptime: nvram shared
1379 @$(SEP)
1380 @$(MAKE) -C wanuptime
1382 wanuptime-clean:
1383 -@$(MAKE) -C wanuptime clean
1385 wanuptime-install:
1386 install -D wanuptime/wanuptime $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1387 $(STRIP) $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1389 ebtables: dummy
1390 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1391 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1392 LOCKFILE="/var/lock/ebtables" LOCKDIR="/var/lock" \
1393 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1395 ebtables-install: ebtables
1396 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1398 @mkdir -p $(TARGETDIR)/rom/etc
1399 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1400 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1402 install -d $(INSTALLDIR)/ebtables/usr/lib
1403 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1404 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1405 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1407 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1408 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1409 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1411 ebtables-clean:
1412 -@$(MAKE) -C ebtables clean
1414 #Roadkill
1415 glib/stamp-h1:
1416 @$(SEP)
1417 @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 \
1418 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 \
1419 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 \
1420 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 \
1421 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
1422 @$(MAKE) -C glib
1423 touch glib/stamp-h1
1425 glib: glib/stamp-h1
1426 @$(MAKE) -C glib $(PARALLEL_BUILD)
1428 glib-clean:
1429 -@$(MAKE) -C glib clean
1430 rm -f glib/stamp-h1
1432 glib-install: glib
1433 @$(MAKE) -C glib DESTDIR=$(INSTALLDIR)/glib install
1435 #Roadkill
1436 nocat/stamp-h1: glib-install
1437 @$(SEP)
1438 @cd nocat && \
1439 NC_CONF_PATH="/" \
1440 $(CONFIGURE) --with-firewall=iptables --with-glib-prefix="$(INSTALLDIR)/glib/usr" --localstatedir=/var --sysconfdir=/etc
1441 @$(MAKE) -C nocat
1443 echo *** integrate glib to nocat installdir
1444 install -d $(INSTALLDIR)/nocat/usr/lib
1445 install -D glib/.libs/libglib-1.2.so.0.0.10 $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1446 cd $(INSTALLDIR)/nocat/usr/lib && ln -s libglib-1.2.so.0.0.10 libglib-1.2.so.0
1447 $(STRIP) $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1448 touch nocat/stamp-h1
1450 nocat: nocat/stamp-h1
1451 @$(MAKE) -C nocat $(PARALLEL_BUILD)
1453 nocat-clean:
1454 -@$(MAKE) -C nocat clean
1455 rm -f nocat/stamp-h1
1457 nocat-install:
1458 install -D nocat/src/splashd $(INSTALLDIR)/nocat/usr/sbin/splashd
1459 $(STRIP) $(INSTALLDIR)/nocat/usr/sbin/splashd
1460 mkdir -p $(INSTALLDIR)/nocat/usr/libexec/nocat
1461 install -D nocat/libexec/iptables/* $(INSTALLDIR)/nocat/usr/libexec/nocat
1463 lzo/stamp-h1:
1464 cd lzo && \
1465 CFLAGS="-O3 -Wall -fPIC $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
1466 touch lzo/stamp-h1
1468 lzo: lzo/stamp-h1
1469 @$(MAKE) -C lzo $(PARALLEL_BUILD)
1471 lzo-clean:
1472 -@$(MAKE) -C lzo clean
1473 @rm -f lzo/stamp-h1
1475 lzo-install: lzo
1476 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1477 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1478 cd $(INSTALLDIR)/lzo/usr/lib && ln -sf liblzo2.so.2 liblzo2.so
1480 openvpn: openvpn/.conf openssl lzo
1482 openvpn/.conf:
1483 cd openvpn && CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1484 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1485 CPPFLAGS="-I$(TOP)/lzo/include -I$(TOP)/openssl/include" \
1486 $(CONFIGURE) --prefix= \
1487 --with-crypto-library=openssl \
1488 --with-iproute-path="/usr/sbin/ip" \
1489 --disable-debug --disable-plugins --enable-management --enable-small \
1490 --disable-selinux --disable-socks --enable-password-save \
1491 OPENSSL_SSL_CFLAGS="-I$(TOP)/openssl/include" \
1492 OPENSSL_SSL_LIBS="-L$(TOP)/openssl -lssl" \
1493 ac_cv_lib_resolv_gethostbyname=no
1494 touch openvpn/.conf
1496 openvpn: openvpn/.conf
1497 @$(MAKE) -C openvpn $(PARALLEL_BUILD)
1499 openvpn-clean:
1500 -@$(MAKE) -C openvpn clean
1501 @rm -f openvpn/.conf
1503 openvpn-install: openvpn
1504 install -D openvpn/src/openvpn/.libs/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1505 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1506 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1508 sd-idle/stamp-h1:
1509 cd sd-idle \
1510 CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
1511 $(MAKE) -C sd-idle
1512 chmod 0755 sd-idle/sd-idle
1513 touch sd-idle/stamp-h1
1515 sd-idle-clean:
1516 -@$(MAKE) -C sd-idle clean
1517 @rm -f sd-idle/stamp-h1
1519 sd-idle-install: sd-idle/stamp-h1
1520 install -d $(INSTALLDIR)/sd-idle/usr/bin
1521 install -D sd-idle/sd-idle $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
1522 $(STRIP) -s $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
1524 snmp/stamp-h1:
1525 cd snmp && \
1526 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1527 $(CONFIGURE) --prefix=/usr --with-endianness=little --enable-mini-agent --disable-debugging \
1528 --disable-privacy --without-opaque-special-types --with-persistent-directory=/tmp/snmp-persist \
1529 --with-default-snmp-version=3 --with-sys-contact=root --with-sys-location=Unknown --with-logfile=/dev/null \
1530 --with-out-transports=UDPIPv6,TCPIPv6,AAL5PVC,IPX,TCP,Unix --enable-shared=no --enable-static --with-gnu-ld \
1531 --enable-internal-md5 --with-copy-persistent-files=no --without-openssl -sysconfdir=/tmp \
1532 --with-mib-modules=mibII,host,mibII/ip,mibII/tcp,mibII/udp,mibII/icmp,mibII/var_route,mibII/kernel_linux,qos,ucd_snmp \
1533 --with-out-mib-modules=snmpv3mibs,agent_mips,agentx,notification,utilities,target --disable-ipv6 --with-defaults \
1534 --without-efence --without-rsaref --without-kmem-usage --without-rpm --without-dmalloc
1535 touch snmp/stamp-h1
1537 snmp: snmp/stamp-h1
1538 @$(SEP)
1539 $(MAKE) -C snmp
1541 snmp-clean:
1542 -@$(MAKE) -C snmp clean
1543 @rm -f snmp/stamp-h1
1545 snmp-install: snmp
1546 install -D snmp/agent/snmpd $(INSTALLDIR)/snmp/usr/sbin/snmpd
1547 $(STRIP) $(INSTALLDIR)/snmp/usr/sbin/snmpd
1549 libpcap/stamp-h1: openssl
1550 cd libpcap && \
1551 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1552 ac_cv_linux_vers=2 \
1553 $(CONFIGURE) --prefix=/usr --with-pcap=linux \
1554 $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6)
1555 touch libpcap/stamp-h1
1557 libpcap: libpcap/stamp-h1
1558 @$(SEP)
1559 $(MAKE) -C libpcap
1561 libpcap-clean:
1562 -@$(MAKE) -C libpcap clean
1563 @rm -f libpcap/stamp-h1
1565 libpcap-install:
1566 @$(SEP)
1568 libsodium/stamp-h1:
1569 cd $(TOP)/libsodium && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1570 $(CONFIGURE) --prefix=/usr --disable-ssp
1571 touch libsodium/stamp-h1
1573 dnscrypt/stamp-h1: libsodium/stamp-h1
1574 cd $(TOP)/dnscrypt && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1575 $(CONFIGURE) --prefix=/usr --disable-ssp
1576 touch dnscrypt/stamp-h1
1578 dnscrypt: dnscrypt/stamp-h1
1579 $(MAKE) -C dnscrypt $(PARALLEL_BUILD)
1581 dnscrypt-install: dnscrypt
1582 install -D dnscrypt/src/proxy/dnscrypt-proxy $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
1583 install -D dnscrypt/src/hostip/hostip $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
1584 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
1585 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
1587 dnscrypt-clean:
1588 -@$(MAKE) -C dnscrypt clean
1589 -@$(MAKE) -C libsodium clean
1590 @rm -rf dnscrypt/stamp-h1 dnscrypt/src/dnscrypt-proxy/.deps dnscrypt/Makefile libsodium/stamp-h1
1592 tcpdump/stamp-h1: openssl libpcap
1593 cd tcpdump && \
1594 CFLAGS="-Os -Wall $(EXTRACFLAGS) -I$(TOP)/openssl/include" \
1595 LDFLAGS="-L$(TOP)/openssl" \
1596 ac_cv_linux_vers=2 ac_cv_search_getaddrinfo=no \
1597 $(CONFIGURE) --prefix=/usr --disable-smb \
1598 --without-smi --with-crypt \
1599 $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6)
1600 touch tcpdump/stamp-h1
1602 tcpdump: tcpdump/stamp-h1
1603 @$(SEP)
1604 $(MAKE) -C tcpdump
1606 tcpdump-clean:
1607 -@$(MAKE) -C tcpdump clean
1608 @rm -f tcpdump/stamp-h1
1610 tcpdump-install: tcpdump
1611 install -D tcpdump/tcpdump $(INSTALLDIR)/tcpdump/usr/sbin/tcpdump
1612 $(STRIP) $(INSTALLDIR)/tcpdump/usr/sbin/tcpdump
1614 #Libpcre
1615 pcre/stamp-h1:
1616 $(SEP)
1617 cd pcre && \
1618 CC=$(CC) CXX=mipsel-uclibc-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1619 $(CONFIGURE) --prefix=/usr --disable-dependency-tracking --enable-utf8 --enable-unicode-properties --disable-cpp
1620 @touch pcre/stamp-h1
1621 [ -d pcre/m4 ] || mkdir pcre/m4
1623 pcre: pcre/stamp-h1
1625 pcre-install: pcre
1626 @$(SEP)
1627 install -D pcre/.libs/libpcre.so.1 $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1
1628 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1
1629 install -D pcre/.libs/libpcreposix.so.0.0.1 $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.1
1630 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.1
1632 pcre-clean:
1633 ( if [ -f pcre/Makefile ]; then \
1634 $(MAKE) -C pcre clean; \
1635 rm -rf pcre/stamp-h1; \
1636 fi )
1637 #PHP
1638 php/stamp-h1: pcre zlib-install
1639 @$(SEP)
1640 #install pcre-nginx
1641 @$(MAKE) -C pcre DESTDIR=$(TOP)/pcre-nginx install
1642 #install zlib libs
1643 install -D zlib/libz.so.1.2.5 $(INSTALLDIR)/zlib/usr/lib/libz.so.1.2.5
1644 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1.2.5
1645 cd $(INSTALLDIR)/zlib/usr/lib && ln -sf libz.so.1.2.5 libz.so.1 && ln -sf libz.so.1.2.5 libz.so
1646 install -D zlib/zlib.h $(INSTALLDIR)/zlib/usr/include/zlib.h
1648 @cd php && autoreconf -v -f -i
1649 cd php && CC=$(CC) CXX=mipsel-uclibc-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall -I$(TOP)/zlib $(EXTRACFLAGS)" \
1650 $(CONFIGURE) --prefix=/usr \
1651 --enable-shared \
1652 --disable-static \
1653 --disable-rpath \
1654 --disable-debug \
1655 --without-pear \
1656 --with-config-file-path=/etc \
1657 --with-config-file-scan-dir=/etc/php5 \
1658 --disable-short-tags \
1659 --with-zlib="$(INSTALLDIR)/zlib/usr" \
1660 --with-zlib-dir="$(INSTALLDIR)/zlib/usr" \
1661 --with-pcre-regex="$(TOP)/pcre-nginx/usr" \
1662 --disable-phar \
1663 --enable-cli \
1664 --enable-cgi \
1665 --disable-calendar \
1666 --disable-ctype \
1667 --without-curl \
1668 --disable-fileinfo \
1669 --without-gettext \
1670 --disable-dom \
1671 --disable-exif \
1672 --disable-ftp \
1673 --without-gd \
1674 --without-gmp \
1675 --disable-hash \
1676 --without-iconv \
1677 --disable-json \
1678 --without-ldap \
1679 --disable-mbstring \
1680 --without-mcrypt \
1681 --without-mysqli \
1682 --without-openssl \
1683 --disable-pcntl \
1684 --without-pdo-mysql \
1685 --without-pdo-pgsql \
1686 --without-pdo-sqlite \
1687 --disable-pdo \
1688 --without-pgsql \
1689 --disable-session \
1690 --disable-shmop \
1691 --disable-simplexml \
1692 --disable-soap \
1693 --disable-sockets \
1694 --without-sqlite \
1695 --without-sqlite3 \
1696 --disable-sysvmsg \
1697 --disable-sysvsem \
1698 --disable-sysvshm \
1699 --disable-tokenizer \
1700 --disable-xml \
1701 --disable-xmlreader \
1702 --disable-xmlwriter \
1703 --disable-zip \
1704 --disable-filter \
1705 --disable-libxml \
1706 --without-system-tzdata \
1707 php_cv_cc_rpath="no" \
1708 iconv_impl_name="gnu_libiconv"
1709 @touch php/stamp-h1
1710 @$(MAKE) -C php
1712 php: php/stamp-h1
1714 php-clean:
1715 -@$(MAKE) -C php clean
1716 -@rm php/stamp-h1
1717 -@rm -vrf $(TOP)/pcre-nginx
1719 php-install: php
1720 @$(SEP)
1721 install -d $(INSTALLDIR)/php/usr/sbin
1722 install -D php/sapi/cli/php $(INSTALLDIR)/php/usr/sbin/php-cli && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cli
1723 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cli
1724 install -D php/sapi/cgi/php-cgi $(INSTALLDIR)/php/usr/sbin/php-cgi && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cgi
1725 cd $(INSTALLDIR)/php/usr/sbin && ln -sf php-cgi php-fcgi
1726 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cgi
1728 #NGinx
1729 nginx/stamp-h1: zlib pcre
1730 @$(SEP)
1731 ( if [ ! -f openssl-nginx/Makefile ]; then \
1732 cp -rf $(TOP)/openssl $(TOP)/openssl-nginx; \
1733 echo $(TOP)/openssl copied over to $(TOP)/openssl-nginx; \
1734 $(MAKE) -C $(TOP)/openssl-nginx clean; \
1735 fi )
1736 cd nginx && ./configure --crossbuild=Linux::$(ARCH) \
1737 --prefix=/usr \
1738 --conf-path=/etc/nginx/nginx.conf \
1739 --error-log-path=/tmp/var/log/nginx/error.log \
1740 --http-log-path=/tmp/var/log/nginx/access.log \
1741 --pid-path=/tmp/var/run/nginx.pid \
1742 --lock-path=/tmp/var/run/nginx.lock.accept \
1743 --with-http_ssl_module \
1744 --http-client-body-temp-path=/tmp/var/lib/nginx/client \
1745 --http-fastcgi-temp-path=/tmp/var/lib/nginx/fastcgi \
1746 --http-uwsgi-temp-path=/tmp/var/lib/nginx/uwsgi \
1747 --http-scgi-temp-path=/tmp/var/lib/nginx/scgi \
1748 --http-proxy-temp-path=/tmp/var/lib/nginx/proxy \
1749 --with-pcre=$(TOP)/pcre \
1750 --with-zlib=$(TOP)/zlib \
1751 --with-openssl=$(TOP)/openssl-nginx \
1752 --with-cc="$(CC)" \
1753 --with-ld-opt="$(LDFLAGS)" \
1754 --with-cc-opt="$(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) -I $(TOP)/openssl-nginx/include"
1756 nginx: nginx/stamp-h1
1757 @$(SEP)
1758 $(MAKE) -C nginx
1760 nginx-clean:
1761 -@$(MAKE) -C nginx clean
1762 -@rm -rf $(TOP)/openssl-nginx
1763 -@rm -f nginx/stamp-h1
1765 nginx-install: nginx
1766 install -d $(INSTALLDIR)/nginx/usr/sbin
1767 install -D nginx/objs/nginx $(INSTALLDIR)/nginx/usr/sbin/nginx && chmod 755 $(INSTALLDIR)/nginx/usr/sbin/nginx
1768 $(STRIP) $(INSTALLDIR)/nginx/usr/sbin/nginx
1771 # Generic rules
1775 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
1778 %-clean:
1779 @-[ ! -d $* ] || $(MAKE) -C $* clean
1781 %-distclean:
1782 @-[ ! -d $* ] || $(MAKE) -C $* distclean
1784 %-install: %
1785 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
1787 %-build:
1788 $(MAKE) $*-clean $*
1790 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
1792 .PHONY: all clean distclean mrproper install package
1793 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
1794 .PHONY: dummy libnet