NGINX: Upstream update to version 1.4.4
[tomato.git] / release / src / router / Makefile
blob02508b6b5c4253836b2e6d83dfd38aec53e95cea
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 # RAF
72 obj-y += bcmgpio
74 ifeq ($(CONFIG_LINUX26),y)
75 obj-$(TCONFIG_USB) += sd-idle
76 else
77 obj-$(TCONFIG_USB) += scsi-idle
78 endif
80 obj-y += libusb10
81 #obj-y += libusb
82 obj-y += usbmodeswitch
83 obj-$(TCONFIG_FTP) += vsftpd
85 ifeq ($(CONFIG_LINUX26),y)
86 ifeq ($(TCONFIG_SAMBASRV),y)
87 NEED_EX_NLS = y
88 endif
89 ifeq ($(TCONFIG_USB_EXTRAS),y)
90 NEED_EX_USB = y
91 endif
92 endif
94 ifeq ($(TCONFIG_SAMBASRV),y)
95 ifeq ($(TCONFIG_SAMBA3),y)
96 NEED_SAMBA3 = y
97 else
98 NEED_SAMBA2 = y
99 endif
100 endif
102 ifeq ($(TCONFIG_IPV6),y)
103 export TCONFIG_IPV6 := y
104 else
105 TCONFIG_IPV6 :=
106 endif
108 obj-$(NEED_SAMBA2) += samba
109 obj-$(NEED_SAMBA3) += samba3
110 obj-$(TCONFIG_NTFS) += ntfs-3g
111 obj-$(TCONFIG_EBTABLES) += ebtables
112 obj-$(TCONFIG_IPV6) += dhcpv6
114 obj-$(TCONFIG_MEDIA_SERVER) += zlib
115 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
116 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
117 obj-$(TCONFIG_MEDIA_SERVER) += libogg
118 obj-$(TCONFIG_MEDIA_SERVER) += flac
119 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
120 obj-$(TCONFIG_MEDIA_SERVER) += libexif
121 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
122 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
123 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
124 MEDIA_SERVER_STATIC=y
126 obj-y += libnfnetlink
127 obj-y += miniupnpd
128 # obj-y += upnp
130 # configurable packages
132 obj-$(TCONFIG_L2TP) += xl2tpd
133 obj-$(TCONFIG_PPTP) += accel-pptp
134 obj-$(TCONFIG_PPTPD) += pptpd
135 obj-$(TCONFIG_HTTPS) += openssl
136 obj-$(TCONFIG_SSH) += dropbear
137 obj-$(TCONFIG_ZEBRA) += zebra
138 # obj-$(TCONFIG_IPP2P) += ipp2p
139 obj-$(TCONFIG_LZO) += lzo
140 obj-$(TCONFIG_OPENVPN) += openvpn
141 obj-$(TCONFIG_EMF) += emf
142 obj-$(TCONFIG_EMF) += igs
144 #Roadkill - NGinX
145 obj-$(TCONFIG_NGINX) += openssl
146 obj-$(TCONFIG_NGINX) += pcre
147 obj-$(TCONFIG_NGINX) += php
148 obj-$(TCONFIG_NGINX) += nginx
150 obj-$(CONFIG_LINUX26) += hotplug2
151 obj-$(CONFIG_LINUX26) += udevtrigger
153 ifeq ($(TCONFIG_OPENVPN),y)
154 export FULL_OPENSSL := y
155 else
156 ifeq ($(TCONFIG_FTP_SSL),y)
157 export FULL_OPENSSL := y
158 else
159 FULL_OPENSSL :=
160 endif
161 endif
163 obj-y += wanuptime
165 obj-$(TCONFIG_TCPDUMP) += lpcap tcpdump
167 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
168 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
171 # Basic rules
174 all: clean-build libc $(obj-y) kernel
177 kernel: $(LINUXDIR)/.config
178 @$(SEP)
180 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
181 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC) $(PARALLEL_BUILD); \
183 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
184 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD); \
186 ifeq ($(CONFIG_LINUX26),y)
187 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR) $(PARALLEL_BUILD)
188 endif
191 lzma-loader:
192 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD) $(PARALLEL_BUILD)
194 lzma-loader-install: lzma-loader
195 @$(SEP)
198 kmod: dummy
199 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD)
201 testfind:
202 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
203 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
205 install package: $(obj-install) $(LINUXDIR)/.config
206 @$(SEP)
208 install -d $(TARGETDIR)
211 # kernel modules
212 $(MAKE) -C $(LINUXDIR) modules_install \
213 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" \
214 DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
216 ifneq ($(CONFIG_LINUX26),y)
217 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded -x {} \;
218 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded -x {} \;
219 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded -x {} \;
220 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded -x {} \;
221 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded -x {} \;
222 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded -x {} \;
223 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded -x {} \;
225 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug -x -R .mdebug.abi32 {} \;
226 endif
228 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
230 # nice and clean
231 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
232 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
233 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
234 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
235 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
236 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
237 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
238 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
239 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
240 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
242 ##!!TB
243 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
244 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
245 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
246 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
247 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jfs/* . && rm -rf jfs || true
248 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
249 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
250 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
251 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
252 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
253 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
254 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfs/* . && rm -rf hfs || true
255 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
256 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
257 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
258 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
259 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
260 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
261 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
262 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
263 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
264 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
265 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
266 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
267 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
268 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
269 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
270 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
271 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
272 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
273 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
274 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
275 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
276 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv core/* . && rm -rf core || true
277 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv card/* . && rm -rf card || true
278 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv host/* . && rm -rf host || true
279 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
280 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
281 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
282 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
283 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
284 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
285 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv pwc/* . && rm -rf pwc || true
286 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv gl860/* . && rm -rf gl860 || true
287 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv m5602/* . && rm -rf m5602 || true
288 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv stv06xx/* . && rm -rf stv06xx || true
289 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv gspca/* . && rm -rf gspca || true
290 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
292 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
293 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
294 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
295 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
296 cd $(TARGETDIR)/lib/modules && rm -f */source || true
298 # misc
299 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
300 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
301 done
303 ifneq ($(TCONFIG_L7),y)
304 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
305 endif
307 # uClibc
308 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
309 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
310 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
311 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
312 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
313 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
314 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
315 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
316 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
317 ifeq ($(TCONFIG_SSH),y)
318 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
319 endif
320 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
321 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
322 $(STRIP) $(TARGETDIR)/lib/*.so.0
323 endif
325 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
327 @echo ---
329 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
330 @$(SRCBASE)/btools/libfoo.pl
331 else
332 @$(SRCBASE)/btools/libfoo.pl --noopt
333 endif
334 @chmod 0555 $(TARGETDIR)/lib/*.so*
335 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
337 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
338 # separated/copied extra stuff
339 @rm -rf $(PLATFORMDIR)/extras
340 @mkdir $(PLATFORMDIR)/extras
341 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
343 $(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
344 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
346 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
347 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
348 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
349 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
350 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
351 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/jfs.*o $(PLATFORMDIR)/extras/ || true
352 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
353 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
354 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
355 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
356 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
357 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
358 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
359 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
360 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
361 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
363 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
364 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
365 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
366 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*acm.*o $(PLATFORMDIR)/extras/ || true
367 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_ether.*o $(PLATFORMDIR)/extras/ || true
368 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
369 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/usbnet.*o $(PLATFORMDIR)/extras/ || true
370 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
371 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/rndis_host.*o $(PLATFORMDIR)/extras/ || true
372 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
373 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc/*.*o $(PLATFORMDIR)/extras/ || true
374 $(if $(NEED_EX_USB),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc || true
376 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
377 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
378 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
379 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
380 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
381 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
382 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
383 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
384 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
385 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
386 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
387 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
388 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
389 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
390 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
391 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
392 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
393 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
394 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
395 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
396 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
397 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ctf*.*o $(PLATFORMDIR)/extras/ || true
398 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
399 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
400 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
401 @mv $(TARGETDIR)/lib/modules/*/kernel/crypto/* $(PLATFORMDIR)/extras/ || true
402 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/crypto || true
404 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
405 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
406 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
407 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
408 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
409 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
410 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
412 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
413 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
414 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
415 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
416 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
417 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
418 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/exfat.*o $(PLATFORMDIR)/extras/ || true
419 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
420 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
421 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
422 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
423 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
424 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
425 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfs.*o $(PLATFORMDIR)/extras/ || true
426 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
428 ifneq ($(TCONFIG_USB),y)
429 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
430 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
431 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
432 endif
434 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
435 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
436 ifneq ($(TCONFIG_USB_EXTRAS),y)
437 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
438 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
439 endif
440 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
441 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
442 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
443 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
444 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
445 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
446 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
448 @mkdir -p $(PLATFORMDIR)/extras/apps
449 @mkdir -p $(PLATFORMDIR)/extras/lib
451 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
452 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
453 @cp -r $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
455 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
456 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
457 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
458 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
459 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
460 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
461 ifneq ($(NEED_EX_USB),y)
462 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
463 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
464 endif
465 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
467 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
468 ifeq ($(TCONFIG_L7PAT),y)
469 @cd layer7 && ./squish.sh
470 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
471 endif
473 ifeq ($(TCONFIG_USERPPTP),y)
474 @mkdir -p $(TARGETDIR)/rom/etc/vpn
475 cp rc/vpn/* $(TARGETDIR)/rom/etc/vpn
476 chmod +x $(TARGETDIR)/rom/etc/vpn/*
477 endif
479 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
480 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
481 @echo ---
483 @rm -f $(TARGETDIR)/lib/modules/*/build
485 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
486 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -no-duplicates | tee target.info
488 # Package kernel and filesystem
489 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
490 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
491 # $(MAKE) -C $(LINUXDIR) zImage ; \
492 # else \
493 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
494 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
495 # fi
497 # Pad self-booting Linux to a 64 KB boundary
498 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
499 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
500 # Append filesystem to self-booting Linux
501 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
504 libc: $(LIBDIR)/ld-uClibc.so.0
505 # $(MAKE) -C ../../../tools-src/uClibc all
506 # $(MAKE) -C ../../../tools-src/uClibc install
510 # cleaners
513 clean: clean-build $(obj-clean)
514 rm -rf layer7/squished
515 rm -f .ipv6-y .ipv6-n
516 rm -f .fullssl-y .fullssl-n
517 make -C config clean
519 clean-build: dummy
520 rm -rf $(TARGETDIR)
521 rm -rf $(INSTALLDIR)
522 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
523 rm -rf $(PLATFORMDIR)/extras
525 distclean: clean
526 ifneq ($(INSIDE_MAK),1)
527 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
528 endif
529 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
532 # configuration
535 CONFIG_IN := config/config.in
537 config/conf config/mconf:
538 @$(MAKE) -C config
540 rconf: config/conf
541 @config/conf $(CONFIG_IN)
543 rmconf: config/mconf
544 @config/mconf $(CONFIG_IN)
546 roldconf: config/conf
547 @config/conf -o $(CONFIG_IN)
548 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean et-clean
550 kconf:
551 @$(MAKE) -C $(LINUXDIR) config
553 kmconf:
554 @$(MAKE) -C $(LINUXDIR) menuconfig
556 koldconf:
557 @$(MAKE) -C $(LINUXDIR) oldconfig
558 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
560 bboldconf:
561 @$(MAKE) -C busybox oldconfig
563 config conf: rconf kconf
565 menuconfig mconf: rmconf kmconf
567 .ipv6-y .ipv6-n:
568 @rm -f .ipv6-y .ipv6-n
569 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
570 @touch $@
572 .fullssl-y .fullssl-n:
573 @rm -f .fullssl-y .fullssl-n
574 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
575 @touch $@
577 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
579 oldconfig oldconf: koldconf roldconf dependconf bboldconf
583 # overrides and extra dependencies
586 busybox: dummy
587 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" $(PARALLEL_BUILD)
589 busybox-install:
590 rm -rf $(INSTALLDIR)/busybox
591 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
593 busybox-clean:
594 -@$(MAKE) -C busybox distclean
596 busybox-config:
597 $(MAKE) -C busybox menuconfig
600 httpd: shared nvram mssl
601 @$(SEP)
602 @$(MAKE) -C httpd
604 www-install:
605 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
607 matrixssl:
608 @$(SEP)
609 @$(MAKE) -C matrixssl/src
611 matrixssl-install:
612 @true
614 matrixssl-clean:
615 -@$(MAKE) -C matrixssl/src clean
617 cyassl/stamp-h1:
618 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
619 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections \
620 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
621 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
622 PTHREAD_LIBS="-lpthread" \
623 $(CONFIGURE)
624 @touch cyassl/stamp-h1
626 cyassl: cyassl/stamp-h1
627 @$(SEP)
628 @$(MAKE) -C cyassl
630 cyassl-clean:
631 -@$(MAKE) -C cyassl clean
632 @rm -f cyassl/stamp-h1
634 cyassl-install:
635 @true
637 ifeq ($(FULL_OPENSSL),y)
638 OPENSSL_CIPHERS:=enable-rc5
639 else
640 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-engine no-aes192 no-cast
641 endif
643 openssl/stamp-h1:
644 cd openssl && \
645 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
646 -ffunction-sections -fdata-sections -Wl,--gc-sections \
647 shared $(OPENSSL_CIPHERS) \
648 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
649 no-seed no-capieng no-cms no-gms no-gmp no-rfc3779 \
650 no-ec no-ecdh no-ecdsa no-err no-hw no-jpake no-threads \
651 no-zlib no-engines no-sse2 \
652 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
654 @$(MAKE) -C openssl clean
655 @touch openssl/stamp-h1
657 openssl: openssl/stamp-h1
659 openssl-clean:
660 -@$(MAKE) -C openssl clean
661 @rm -f openssl/stamp-h1
663 openssl-install: openssl
664 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
665 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
666 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
668 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
669 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
670 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
672 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
674 ifeq ($(FULL_OPENSSL),y)
675 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
676 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
677 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
678 endif
680 mssl: $(if $(FULL_OPENSSL),openssl,cyassl)
682 mdu: shared mssl
684 rc: nvram shared
686 bridge/Makefile:
687 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
688 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
690 bridge: bridge/Makefile
691 @$(SEP)
692 @$(MAKE) -C bridge
694 bridge-clean:
695 -@$(MAKE) -C bridge clean
696 @rm -f bridge/Makefile
698 bridge-install:
699 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
700 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
702 dnsmasq:
703 @$(SEP)
704 @$(MAKE) -C dnsmasq $(PARALLEL_BUILD) \
705 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" \
706 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC"
708 dnsmasq-install:
709 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
710 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
712 iptables:
713 ifeq ($(CONFIG_LINUX26),y)
714 cp -f iptables/extensions/libipt_ipp2p_K26.c iptables/extensions/libipt_ipp2p.c
715 else
716 cp -f iptables/extensions/libipt_ipp2p_K24.c iptables/extensions/libipt_ipp2p.c
717 endif
718 @$(SEP)
719 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE"
721 iptables-install:
722 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
723 cd $(INSTALLDIR)/iptables/usr/sbin && \
724 ln -sf iptables iptables-restore && \
725 ln -sf iptables iptables-save
727 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
728 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
730 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
732 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
733 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
734 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
736 ifeq ($(TCONFIG_IPV6),y)
737 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
738 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
739 cd $(INSTALLDIR)/iptables/usr/sbin && \
740 ln -sf ip6tables ip6tables-restore && \
741 ln -sf ip6tables ip6tables-save
742 endif
744 iptables-clean:
745 -@$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
747 ppp:
748 @$(SEP)
749 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,) $(PARALLEL_BUILD)
750 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
752 ppp-%:
753 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
755 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
756 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
757 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
758 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
759 @touch rp-pppoe/src/stamp-h1
761 rp-pppoe: pppd rp-pppoe/src/stamp-h1
762 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so $(PARALLEL_BUILD)
764 rp-pppoe-clean:
765 -@$(MAKE) -C rp-pppoe/src clean
766 @rm -f rp-pppoe/src/pppoe-relay
767 @rm -f rp-pppoe/src/stamp-h1
769 rp-pppoe-install: rp-pppoe
770 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
771 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
772 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
773 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
776 upnp: nvram shared iptables
778 libnfnetlink/stamp-h1:
779 cd $(TOP)/libnfnetlink && CC=$(CC) STRIP='mipsel-uclibc-strip' \
780 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
781 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
782 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
783 touch libnfnetlink/stamp-h1
785 libnfnetlink: libnfnetlink/stamp-h1
786 @$(SEP)
787 $(MAKE) -C libnfnetlink
789 libnfnetlink-install:
790 install -D libnfnetlink/src/.libs/libnfnetlink.so.0.2.0 $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
791 $(STRIP) -s $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
792 cd $(INSTALLDIR)/libnfnetlink/usr/lib/ && \
793 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so.0 && \
794 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so
796 miniupnpd-config:
797 #ifeq ($(TCONFIG_IPV6),y)
798 # @cd miniupnpd && ./genconfig.sh --leasefile --ipv6
799 #else
800 @cd miniupnpd && ./genconfig.sh --leasefile
801 #endif
803 miniupnpd: iptables miniupnpd-config libnfnetlink
804 @$(SEP)
805 $(MAKE) -C miniupnpd miniupnpd -f Makefile.linux CC=$(CC) \
806 CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/iptables/include -I$(TOP)/libnfnetlink/include" \
807 LDFLAGS="-L$(TOP)/iptables -liptc -L$(TOP)/libnfnetlink/src/.libs -lnfnetlink" LIBS="" $(PARALLEL_BUILD)
809 miniupnpd-clean:
810 -@$(MAKE) -C miniupnpd -f Makefile.linux clean
811 @rm -f miniupnpd/config.h
813 miniupnpd-install:
814 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
815 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
817 # !!TB
818 shared: busybox
820 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
821 @$(SEP)
822 $(MAKE) -C vsftpd $(PARALLEL_BUILD)
824 vsftpd-install: vsftpd
825 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
826 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
828 ntfs-3g/Makefile:
829 cd ntfs-3g && \
830 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
831 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
832 $(CONFIGURE) --enable-shared=no --enable-static=no \
833 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
834 --disable-ntfsprogs --disable-crypto --without-uuid \
835 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
837 ntfs-3g: ntfs-3g/Makefile
838 @$(MAKE) -C ntfs-3g $(PARALLEL_BUILD)
840 ntfs-3g-clean:
841 -@$(MAKE) -C ntfs-3g clean
842 @rm -f ntfs-3g/Makefile
844 ntfs-3g-install: ntfs-3g
845 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
846 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
847 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
848 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
849 ln -sf ../bin/ntfs-3g mount.ntfs
851 libusb10/Makefile: libusb10/Makefile.in
852 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
853 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
855 libusb10: libusb10/Makefile
856 $(MAKE) -C $@
858 libusb10-install: libusb10
859 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
860 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
862 libusb10-clean:
863 -@$(MAKE) -C $@ clean
864 @rm -rf libusb10/Makefile
866 libusb/Makefile: libusb/Makefile.in
867 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
868 $(CONFIGURE) --prefix=/usr \
869 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
870 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
871 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
873 libusb: libusb10 libusb/Makefile
874 $(MAKE) -C $@
876 libusb-install: libusb
877 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
878 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
880 libusb-clean:
881 -@$(MAKE) -C $@ clean
882 @rm -rf libusb/Makefile
884 usbmodeswitch: libusb10
885 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
886 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
887 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
889 usbmodeswitchdb-install:
890 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
891 # compress whitespace
892 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
893 F=`basename $$D`; \
894 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
895 done
897 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
898 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
899 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
900 @mkdir -p $(TARGETDIR)/rom/etc
901 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
903 dhcpv6/stamp-h1:
904 @cd dhcpv6 && \
905 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
906 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
907 ac_cv_func_setpgrp_void=yes \
908 $(CONFIGURE) --prefix= --with-localdbdir=/var
909 @$(MAKE) -C dhcpv6 clean
910 @touch dhcpv6/stamp-h1
912 dhcpv6: dhcpv6/stamp-h1
913 @$(SEP)
914 @$(MAKE) -C dhcpv6 dhcp6c
916 dhcpv6-install: dhcpv6
917 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
918 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
920 dhcpv6-clean:
921 -@$(MAKE) -C dhcpv6 clean
922 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
925 p910nd:
926 samba:
927 samba3:
929 nvram: shared
931 prebuilt: shared libbcmcrypto
933 vlan:
934 @$(SEP)
935 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
937 vlan-install:
938 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
939 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
942 pptp-client-install:
943 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
944 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
947 accel-pptp: pppd accel-pptp/Makefile
948 @$(MAKE) -C accel-pptp
950 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
951 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
952 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
954 accel-pptp-clean:
955 -@$(MAKE) -C accel-pptp clean
956 @rm -f accel-pptp/Makefile
958 accel-pptp-install: accel-pptp
959 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
960 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
962 pptpd/stamp-h1:
963 cd pptpd && $(CONFIGURE) --prefix=$(INSTALLDIR)/pptpd --enable-bcrelay CC=mipsel-uclibc-gcc \
964 STRIP=mipsel-uclibc-strip AR=mipsel-uclibc-ar LD=mipsel-uclibc-ld NM=mipsel-uclibc-nm RANLIB=mipsel-uclibc-ranlib
965 touch pptpd/stamp-h1
967 pptpd: pptpd/stamp-h1
969 pptpd-install: pptpd
970 @echo pptpd
971 @install -D pptpd/pptpd $(INSTALLDIR)/pptpd/usr/sbin/pptpd
972 @install -D pptpd/bcrelay $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
973 @install -D pptpd/pptpctrl $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
974 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpd
975 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
976 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
978 pptpd-clean:
979 -@$(MAKE) -C pptpd clean
980 rm -rf pptpd/stamp-h1 pptpd/.deps
982 pppd/Makefile: pppd/linux/Makefile.top
983 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
985 pppd: pppd/Makefile
986 @$(SEP)
987 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
989 pppd-clean:
990 -@$(MAKE) -C pppd clean
991 @rm -f pppd/Makefile
993 pppd-install: pppd
994 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
995 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
996 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
997 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
998 ifeq ($(TCONFIG_L2TP),y)
999 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
1000 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
1001 endif
1003 # ipupdate-install:
1004 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1005 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1007 zebra/stamp-h1:
1008 @cd zebra && rm -f config.cache && \
1009 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1010 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1011 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1012 $(CONFIGURE) --sysconfdir=/etc \
1013 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
1014 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
1015 @touch zebra/stamp-h1
1017 zebra: zebra/stamp-h1
1018 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
1020 zebra-clean:
1021 -@$(MAKE) -C zebra clean
1022 @rm -f zebra/stamp-h1
1024 zebra-install: zebra
1025 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
1026 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
1027 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1028 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
1029 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
1030 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1033 rp-l2tp-install:
1034 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1035 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1036 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
1037 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1038 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1039 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1040 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1042 xl2tpd: pppd
1043 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
1045 xl2tpd-install: xl2tpd
1046 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1047 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1050 bpalogin-install:
1051 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1052 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1054 libbcm:
1055 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
1057 libbcm-install:
1058 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1059 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1062 iproute2:
1063 @$(SEP)
1064 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1066 iproute2-install: iproute2
1067 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1068 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1069 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1070 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1073 ntpc: nvram shared
1076 dropbear: dropbear/config.h
1077 @$(SEP)
1078 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1 $(PARALLEL_BUILD)
1080 dropbear-install:
1081 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1082 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1083 cd $(INSTALLDIR)/dropbear/usr/bin && \
1084 ln -sf dropbearmulti dropbear && \
1085 ln -sf dropbearmulti dropbearconvert && \
1086 ln -sf dropbearmulti dropbearkey && \
1087 ln -sf dropbearmulti dbclient && \
1088 ln -sf dropbearmulti ssh && \
1089 ln -sf dropbearmulti scp
1091 dropbear-clean:
1092 -@$(MAKE) -C dropbear clean
1093 @rm -f dropbear/config.h
1095 dropbear/config.h:
1096 cd dropbear && \
1097 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1098 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1099 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1100 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1101 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1102 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty --enable-bundled-libtom
1103 @$(MAKE) -C dropbear clean
1105 # Media libraries
1107 sqlite/stamp-h1:
1108 cd sqlite && \
1109 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1110 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1111 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1112 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1113 touch sqlite/stamp-h1
1115 sqlite: sqlite/stamp-h1
1116 @$(MAKE) -C sqlite all $(PARALLEL_BUILD)
1118 sqlite-clean:
1119 -@$(MAKE) -C sqlite clean
1120 @rm -f sqlite/stamp-h1
1122 sqlite-install: sqlite
1123 @$(SEP)
1124 ifneq ($(MEDIA_SERVER_STATIC),y)
1125 install -D sqlite/.libs/libsqlite3.so.0 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1126 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1127 endif
1129 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1131 FFMPEG_DECODERS:=aac ac3 atrac3 flac h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1132 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1134 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1135 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1137 FFMPEG_PROTOCOLS:=file
1138 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1140 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
1141 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1143 ffmpeg/stamp-h1: zlib
1144 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1145 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1146 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1147 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1148 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1149 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1150 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1151 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1152 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1153 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1154 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1155 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1156 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1157 --extra-libs="-L$(TOP)/zlib -lz" \
1158 --enable-zlib --disable-debug --prefix=''
1159 touch ffmpeg/stamp-h1
1161 ffmpeg: ffmpeg/stamp-h1 zlib
1162 @$(MAKE) -C ffmpeg all $(PARALLEL_BUILD)
1164 ffmpeg-clean:
1165 -@$(MAKE) -C ffmpeg clean
1166 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1168 ffmpeg-install: ffmpeg
1169 @$(SEP)
1170 ifneq ($(MEDIA_SERVER_STATIC),y)
1171 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1172 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1173 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1174 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1175 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1176 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1177 endif
1179 libogg/stamp-h1:
1180 cd libogg && \
1181 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1182 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1183 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1184 touch libogg/stamp-h1
1186 libogg: libogg/stamp-h1
1187 @$(MAKE) -C libogg all $(PARALLEL_BUILD)
1189 libogg-clean:
1190 -@$(MAKE) -C libogg clean
1191 @rm -f libogg/stamp-h1
1193 libogg-install: libogg
1194 @$(SEP)
1195 ifneq ($(MEDIA_SERVER_STATIC),y)
1196 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1197 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1198 endif
1200 flac/stamp-h1: libogg
1201 cd flac && \
1202 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1203 CPPFLAGS="-I$(TOP)/libogg/include -I$(LINUXDIR)/include" \
1204 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1205 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1206 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1207 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1208 touch flac/stamp-h1
1210 flac: flac/stamp-h1 libogg
1211 @$(MAKE) -C flac/src/libFLAC all $(PARALLEL_BUILD)
1213 flac-clean:
1214 -@$(MAKE) -C flac clean
1215 @rm -f flac/stamp-h1
1217 flac-install: flac
1218 @$(SEP)
1219 ifneq ($(MEDIA_SERVER_STATIC),y)
1220 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1221 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1222 endif
1224 jpeg/stamp-h1:
1225 cd jpeg && \
1226 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1227 touch jpeg/stamp-h1
1229 jpeg: jpeg/stamp-h1
1230 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so $(PARALLEL_BUILD)
1232 jpeg-clean:
1233 -@$(MAKE) -C jpeg clean
1234 @rm -f jpeg/stamp-h1 jpeg/Makefile
1236 jpeg-install: jpeg
1237 @$(SEP)
1238 ifneq ($(MEDIA_SERVER_STATIC),y)
1239 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1240 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1241 endif
1243 libexif/stamp-h1:
1244 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1245 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1246 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1247 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1248 touch libexif/stamp-h1
1250 libexif: libexif/stamp-h1
1251 @$(MAKE) -C libexif all
1253 libexif-clean:
1254 -@$(MAKE) -C libexif clean
1255 @rm -f libexif/stamp-h1
1257 libexif-install: libexif
1258 @$(SEP)
1259 ifneq ($(MEDIA_SERVER_STATIC),y)
1260 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1261 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1262 endif
1264 zlib/stamp-h1:
1265 cd zlib && \
1266 CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1267 ./configure --shared --prefix='/usr'
1268 @touch zlib/stamp-h1
1270 zlib: zlib/stamp-h1
1271 @$(SEP)
1272 @$(MAKE) -C zlib CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) all
1274 zlib-clean:
1275 -@$(MAKE) -C zlib clean
1276 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1278 zlib-install: zlib
1279 @$(SEP)
1280 ifneq ($(MEDIA_SERVER_STATIC),y)
1281 install -D zlib/libz.so.1.2.5 $(INSTALLDIR)/zlib/usr/lib/libz.so.1.2.5
1282 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1.2.5
1283 cd $(INSTALLDIR)/zlib/usr/lib && ln -s libz.so.1.2.5 libz.so.1 && ln -s libz.so.1.2.5 libz.so
1284 endif
1286 libid3tag/stamp-h1: zlib
1287 cd libid3tag && \
1288 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1289 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1290 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1291 --disable-debugging --disable-profiling
1292 touch libid3tag/stamp-h1
1294 libid3tag: libid3tag/stamp-h1 zlib
1295 @$(MAKE) -C libid3tag all $(PARALLEL_BUILD)
1297 libid3tag-clean:
1298 -@$(MAKE) -C libid3tag distclean
1299 @rm -f libid3tag/stamp-h1
1301 libid3tag-install: libid3tag
1302 @$(SEP)
1303 ifneq ($(MEDIA_SERVER_STATIC),y)
1304 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1305 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1306 endif
1308 libvorbis/stamp-h1: libogg
1309 cd libvorbis && \
1310 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1311 CPPFLAGS="-I$(TOP)/libogg/include" \
1312 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1313 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1314 --with-ogg-includes="$(TOP)/libogg/include" \
1315 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1316 touch libvorbis/stamp-h1
1318 libvorbis: libvorbis/stamp-h1
1319 @$(MAKE) -C libvorbis/lib all $(PARALLEL_BUILD)
1321 libvorbis-clean:
1322 -@$(MAKE) -C libvorbis clean
1323 @rm -f libvorbis/stamp-h1
1325 libvorbis-install: libvorbis
1326 @$(SEP)
1327 ifneq ($(MEDIA_SERVER_STATIC),y)
1328 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1329 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1330 endif
1332 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1333 @$(SEP)
1334 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna $(PARALLEL_BUILD)
1336 igmpproxy/stamp-h1:
1337 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1338 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1339 $(CONFIGURE) --prefix=/usr --disable-dependency-tracking
1340 # stamp-h1 will be generated by configure.
1341 #touch $@
1343 igmpproxy: igmpproxy/stamp-h1
1344 @$(SEP)
1345 @$(MAKE) -C igmpproxy/src $(PARALLEL_BUILD)
1347 igmpproxy-install: igmpproxy
1348 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1349 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1351 igmpproxy-clean:
1352 -@$(MAKE) -C igmpproxy/src clean
1353 @rm -f igmpproxy/stamp-h1
1355 udev:
1356 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1357 PROGRAMS=udevtrigger
1359 udev-install: udev
1360 install -d $(INSTALLDIR)
1361 install -d $(TARGETDIR)
1362 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1364 hotplug2:
1365 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1367 hotplug2-install: hotplug2
1368 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1369 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1371 emf:
1372 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1374 emf-install: emf
1375 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1377 igs:
1378 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1380 igs-install: igs
1381 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1383 wanuptime: nvram shared
1384 @$(SEP)
1385 @$(MAKE) -C wanuptime
1387 wanuptime-clean:
1388 -@$(MAKE) -C wanuptime clean
1390 wanuptime-install:
1391 install -D wanuptime/wanuptime $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1392 $(STRIP) $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1394 ebtables: dummy
1395 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1396 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1397 LOCKFILE="/var/lock/ebtables" LOCKDIR="/var/lock" \
1398 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1400 ebtables-install: ebtables
1401 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1403 @mkdir -p $(TARGETDIR)/rom/etc
1404 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1405 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1407 install -d $(INSTALLDIR)/ebtables/usr/lib
1408 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1409 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1410 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1412 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1413 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1414 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1416 ebtables-clean:
1417 -@$(MAKE) -C ebtables clean
1419 #Roadkill
1420 glib/stamp-h1:
1421 @$(SEP)
1422 @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 \
1423 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 \
1424 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 \
1425 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 \
1426 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
1427 @$(MAKE) -C glib
1428 touch glib/stamp-h1
1430 glib: glib/stamp-h1
1431 @$(MAKE) -C glib $(PARALLEL_BUILD)
1433 glib-clean:
1434 -@$(MAKE) -C glib clean
1435 rm -f glib/stamp-h1
1437 glib-install: glib
1438 @$(MAKE) -C glib DESTDIR=$(INSTALLDIR)/glib install
1440 #Roadkill
1441 nocat/stamp-h1: glib-install
1442 @$(SEP)
1443 @cd nocat && \
1444 NC_CONF_PATH="/" \
1445 $(CONFIGURE) --with-firewall=iptables --with-glib-prefix="$(INSTALLDIR)/glib/usr" --localstatedir=/var --sysconfdir=/etc
1446 @$(MAKE) -C nocat
1448 echo *** integrate glib to nocat installdir
1449 install -d $(INSTALLDIR)/nocat/usr/lib
1450 install -D glib/.libs/libglib-1.2.so.0.0.10 $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1451 cd $(INSTALLDIR)/nocat/usr/lib && ln -s libglib-1.2.so.0.0.10 libglib-1.2.so.0
1452 $(STRIP) $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1453 touch nocat/stamp-h1
1455 nocat: nocat/stamp-h1
1456 @$(MAKE) -C nocat $(PARALLEL_BUILD)
1458 nocat-clean:
1459 -@$(MAKE) -C nocat clean
1460 rm -f nocat/stamp-h1
1462 nocat-install:
1463 install -D nocat/src/splashd $(INSTALLDIR)/nocat/usr/sbin/splashd
1464 $(STRIP) $(INSTALLDIR)/nocat/usr/sbin/splashd
1465 mkdir -p $(INSTALLDIR)/nocat/usr/libexec/nocat
1466 install -D nocat/libexec/iptables/* $(INSTALLDIR)/nocat/usr/libexec/nocat
1468 lzo/stamp-h1:
1469 cd lzo && \
1470 CFLAGS="-O3 -Wall -fPIC $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
1471 touch lzo/stamp-h1
1473 lzo: lzo/stamp-h1
1474 @$(MAKE) -C lzo $(PARALLEL_BUILD)
1476 lzo-clean:
1477 -@$(MAKE) -C lzo clean
1478 @rm -f lzo/stamp-h1
1480 lzo-install: lzo
1481 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1482 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1483 cd $(INSTALLDIR)/lzo/usr/lib && ln -sf liblzo2.so.2 liblzo2.so
1485 openvpn: openvpn/.conf openssl lzo
1487 openvpn/.conf:
1488 cd openvpn && CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1489 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1490 CPPFLAGS="-I$(TOP)/lzo/include -I$(TOP)/openssl/include" \
1491 $(CONFIGURE) --prefix= \
1492 --with-crypto-library=openssl \
1493 --with-iproute-path="/usr/sbin/ip" \
1494 --disable-debug --disable-plugins --enable-management --enable-small \
1495 --disable-selinux --disable-socks --enable-password-save \
1496 OPENSSL_SSL_CFLAGS="-I$(TOP)/openssl/include" \
1497 OPENSSL_SSL_LIBS="-L$(TOP)/openssl -lssl" \
1498 ac_cv_lib_resolv_gethostbyname=no
1499 touch openvpn/.conf
1501 openvpn: openvpn/.conf
1502 @$(MAKE) -C openvpn $(PARALLEL_BUILD)
1504 openvpn-clean:
1505 -@$(MAKE) -C openvpn clean
1506 @rm -f openvpn/.conf
1508 openvpn-install: openvpn
1509 install -D openvpn/src/openvpn/.libs/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1510 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1511 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1513 sd-idle/stamp-h1:
1514 cd sd-idle \
1515 CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
1516 $(MAKE) -C sd-idle
1517 chmod 0755 sd-idle/sd-idle
1518 touch sd-idle/stamp-h1
1520 sd-idle-clean:
1521 -@$(MAKE) -C sd-idle clean
1522 @rm -f sd-idle/stamp-h1
1524 sd-idle-install: sd-idle/stamp-h1
1525 install -d $(INSTALLDIR)/sd-idle/usr/bin
1526 install -D sd-idle/sd-idle $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
1527 $(STRIP) -s $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
1529 snmp/stamp-h1:
1530 cd snmp && \
1531 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1532 $(CONFIGURE) --prefix=/usr --with-endianness=little --enable-mini-agent --disable-debugging \
1533 --disable-privacy --without-opaque-special-types --with-persistent-directory=/tmp/snmp-persist \
1534 --with-default-snmp-version=3 --with-sys-contact=root --with-sys-location=Unknown --with-logfile=/dev/null \
1535 --with-out-transports=UDPIPv6,TCPIPv6,AAL5PVC,IPX,TCP,Unix --enable-shared=no --enable-static --with-gnu-ld \
1536 --enable-internal-md5 --with-copy-persistent-files=no --without-openssl -sysconfdir=/tmp \
1537 --with-mib-modules=mibII,host,mibII/ip,mibII/tcp,mibII/udp,mibII/icmp,mibII/var_route,mibII/kernel_linux,qos,ucd_snmp \
1538 --with-out-mib-modules=snmpv3mibs,agent_mips,agentx,notification,utilities,target --disable-ipv6 --with-defaults \
1539 --without-efence --without-rsaref --without-kmem-usage --without-rpm --without-dmalloc
1540 touch snmp/stamp-h1
1542 snmp: snmp/stamp-h1
1543 @$(SEP)
1544 $(MAKE) -C snmp
1546 snmp-clean:
1547 -@$(MAKE) -C snmp clean
1548 @rm -f snmp/stamp-h1
1550 snmp-install: snmp
1551 install -D snmp/agent/snmpd $(INSTALLDIR)/snmp/usr/sbin/snmpd
1552 $(STRIP) $(INSTALLDIR)/snmp/usr/sbin/snmpd
1554 libpcap/stamp-h1: openssl
1555 cd libpcap && \
1556 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1557 ac_cv_linux_vers=2 \
1558 $(CONFIGURE) --prefix=/usr --with-pcap=linux \
1559 $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6)
1560 touch libpcap/stamp-h1
1562 libpcap: libpcap/stamp-h1
1563 @$(SEP)
1564 $(MAKE) -C libpcap
1566 libpcap-clean:
1567 -@$(MAKE) -C libpcap clean
1568 @rm -f libpcap/stamp-h1
1570 libpcap-install:
1571 @$(SEP)
1573 libsodium/stamp-h1:
1574 cd $(TOP)/libsodium && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1575 $(CONFIGURE) --prefix=/usr --disable-ssp
1576 touch libsodium/stamp-h1
1578 dnscrypt/stamp-h1: libsodium/stamp-h1
1579 cd $(TOP)/dnscrypt && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1580 $(CONFIGURE) --prefix=/usr --disable-ssp
1581 touch dnscrypt/stamp-h1
1583 dnscrypt: dnscrypt/stamp-h1
1584 $(MAKE) -C dnscrypt $(PARALLEL_BUILD)
1586 dnscrypt-install: dnscrypt
1587 install -D dnscrypt/src/proxy/dnscrypt-proxy $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
1588 install -D dnscrypt/src/hostip/hostip $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
1589 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
1590 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
1592 dnscrypt-clean:
1593 -@$(MAKE) -C dnscrypt clean
1594 -@$(MAKE) -C libsodium clean
1595 @rm -rf dnscrypt/stamp-h1 dnscrypt/src/dnscrypt-proxy/.deps dnscrypt/Makefile libsodium/stamp-h1
1597 tcpdump/stamp-h1: openssl libpcap
1598 cd tcpdump && \
1599 CFLAGS="-Os -Wall $(EXTRACFLAGS) -I$(TOP)/openssl/include" \
1600 LDFLAGS="-L$(TOP)/openssl" \
1601 ac_cv_linux_vers=2 ac_cv_search_getaddrinfo=no \
1602 $(CONFIGURE) --prefix=/usr --disable-smb \
1603 --without-smi --with-crypt \
1604 $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6)
1605 touch tcpdump/stamp-h1
1607 tcpdump: tcpdump/stamp-h1
1608 @$(SEP)
1609 $(MAKE) -C tcpdump
1611 tcpdump-clean:
1612 -@$(MAKE) -C tcpdump clean
1613 @rm -f tcpdump/stamp-h1
1615 tcpdump-install: tcpdump
1616 install -D tcpdump/tcpdump $(INSTALLDIR)/tcpdump/usr/sbin/tcpdump
1617 $(STRIP) $(INSTALLDIR)/tcpdump/usr/sbin/tcpdump
1619 #Libpcre
1620 pcre/stamp-h1:
1621 $(SEP)
1622 cd pcre && \
1623 CC=$(CC) CXX=mipsel-uclibc-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1624 $(CONFIGURE) --prefix=/usr --disable-dependency-tracking --enable-utf8 --enable-unicode-properties --disable-cpp
1625 @touch pcre/stamp-h1
1626 [ -d pcre/m4 ] || mkdir pcre/m4
1628 pcre: pcre/stamp-h1
1630 pcre-install: pcre
1631 @$(SEP)
1632 install -D pcre/.libs/libpcre.so.1 $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1
1633 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1
1634 install -D pcre/.libs/libpcreposix.so.0.0.1 $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.1
1635 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.1
1637 pcre-clean:
1638 ( if [ -f pcre/Makefile ]; then \
1639 $(MAKE) -C pcre clean; \
1640 rm -rf pcre/stamp-h1; \
1641 fi )
1642 #PHP
1643 php/stamp-h1: pcre zlib-install
1644 @$(SEP)
1645 #install pcre-nginx
1646 @$(MAKE) -C pcre DESTDIR=$(TOP)/pcre-nginx install
1647 #install zlib libs
1648 install -D zlib/libz.so.1.2.5 $(INSTALLDIR)/zlib/usr/lib/libz.so.1.2.5
1649 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1.2.5
1650 cd $(INSTALLDIR)/zlib/usr/lib && ln -sf libz.so.1.2.5 libz.so.1 && ln -sf libz.so.1.2.5 libz.so
1651 install -D zlib/zlib.h $(INSTALLDIR)/zlib/usr/include/zlib.h
1653 @cd php && autoreconf -v -f -i
1654 cd php && CC=$(CC) CXX=mipsel-uclibc-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall -I$(TOP)/zlib $(EXTRACFLAGS)" \
1655 $(CONFIGURE) --prefix=/usr \
1656 --enable-shared \
1657 --disable-static \
1658 --disable-rpath \
1659 --disable-debug \
1660 --without-pear \
1661 --with-config-file-path=/etc \
1662 --with-config-file-scan-dir=/etc/php5 \
1663 --disable-short-tags \
1664 --with-zlib="$(INSTALLDIR)/zlib/usr" \
1665 --with-zlib-dir="$(INSTALLDIR)/zlib/usr" \
1666 --with-pcre-regex="$(TOP)/pcre-nginx/usr" \
1667 --disable-phar \
1668 --enable-cli \
1669 --enable-cgi \
1670 --disable-calendar \
1671 --disable-ctype \
1672 --without-curl \
1673 --disable-fileinfo \
1674 --without-gettext \
1675 --disable-dom \
1676 --disable-exif \
1677 --disable-ftp \
1678 --without-gd \
1679 --without-gmp \
1680 --disable-hash \
1681 --without-iconv \
1682 --disable-json \
1683 --without-ldap \
1684 --disable-mbstring \
1685 --without-mcrypt \
1686 --without-mysqli \
1687 --without-openssl \
1688 --disable-pcntl \
1689 --without-pdo-mysql \
1690 --without-pdo-pgsql \
1691 --without-pdo-sqlite \
1692 --disable-pdo \
1693 --without-pgsql \
1694 --disable-session \
1695 --disable-shmop \
1696 --disable-simplexml \
1697 --disable-soap \
1698 --disable-sockets \
1699 --without-sqlite \
1700 --without-sqlite3 \
1701 --disable-sysvmsg \
1702 --disable-sysvsem \
1703 --disable-sysvshm \
1704 --disable-tokenizer \
1705 --disable-xml \
1706 --disable-xmlreader \
1707 --disable-xmlwriter \
1708 --disable-zip \
1709 --disable-filter \
1710 --disable-libxml \
1711 --without-system-tzdata \
1712 php_cv_cc_rpath="no" \
1713 iconv_impl_name="gnu_libiconv"
1714 @touch php/stamp-h1
1715 @$(MAKE) -C php
1717 php: php/stamp-h1
1719 php-clean:
1720 -@$(MAKE) -C php clean
1721 -@rm php/stamp-h1
1722 -@rm -vrf $(TOP)/pcre-nginx
1724 php-install: php
1725 @$(SEP)
1726 install -d $(INSTALLDIR)/php/usr/sbin
1727 install -D php/sapi/cli/php $(INSTALLDIR)/php/usr/sbin/php-cli && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cli
1728 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cli
1729 install -D php/sapi/cgi/php-cgi $(INSTALLDIR)/php/usr/sbin/php-cgi && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cgi
1730 cd $(INSTALLDIR)/php/usr/sbin && ln -sf php-cgi php-fcgi
1731 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cgi
1733 #NGinx
1734 nginx/stamp-h1: zlib pcre
1735 @$(SEP)
1736 ( if [ ! -f openssl-nginx/Makefile ]; then \
1737 cp -rf $(TOP)/openssl $(TOP)/openssl-nginx; \
1738 echo $(TOP)/openssl copied over to $(TOP)/openssl-nginx; \
1739 $(MAKE) -C $(TOP)/openssl-nginx clean; \
1740 fi )
1741 cd nginx && ./configure --crossbuild=Linux::$(ARCH) \
1742 --prefix=/usr \
1743 --conf-path=/etc/nginx/nginx.conf \
1744 --error-log-path=/tmp/var/log/nginx/error.log \
1745 --http-log-path=/tmp/var/log/nginx/access.log \
1746 --pid-path=/tmp/var/run/nginx.pid \
1747 --lock-path=/tmp/var/run/nginx.lock.accept \
1748 --with-http_ssl_module \
1749 --http-client-body-temp-path=/tmp/var/lib/nginx/client \
1750 --http-fastcgi-temp-path=/tmp/var/lib/nginx/fastcgi \
1751 --http-uwsgi-temp-path=/tmp/var/lib/nginx/uwsgi \
1752 --http-scgi-temp-path=/tmp/var/lib/nginx/scgi \
1753 --http-proxy-temp-path=/tmp/var/lib/nginx/proxy \
1754 --with-pcre=$(TOP)/pcre \
1755 --with-zlib=$(TOP)/zlib \
1756 --with-openssl=$(TOP)/openssl-nginx \
1757 --with-cc="$(CC)" \
1758 --with-ld-opt="$(LDFLAGS)" \
1759 --with-cc-opt="$(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) -I $(TOP)/openssl-nginx/include"
1761 nginx: nginx/stamp-h1
1762 @$(SEP)
1763 $(MAKE) -C nginx
1765 nginx-clean:
1766 -@$(MAKE) -C nginx clean
1767 -@rm -rf $(TOP)/openssl-nginx
1768 -@rm -f nginx/stamp-h1
1770 nginx-install: nginx
1771 install -d $(INSTALLDIR)/nginx/usr/sbin
1772 install -D nginx/objs/nginx $(INSTALLDIR)/nginx/usr/sbin/nginx && chmod 755 $(INSTALLDIR)/nginx/usr/sbin/nginx
1773 $(STRIP) $(INSTALLDIR)/nginx/usr/sbin/nginx
1776 # Generic rules
1780 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
1783 %-clean:
1784 @-[ ! -d $* ] || $(MAKE) -C $* clean
1786 %-distclean:
1787 @-[ ! -d $* ] || $(MAKE) -C $* distclean
1789 %-install: %
1790 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
1792 %-build:
1793 $(MAKE) $*-clean $*
1795 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
1797 .PHONY: all clean distclean mrproper install package
1798 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
1799 .PHONY: dummy libnet