K2.6 patches and update.
[tomato.git] / release / src / router / Makefile
blob48622465ab443fca8c5574d73449c6ab551d6938
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
21 SEP=echo -e "\033[41;1m $@ \033[0m"
24 # standard packages
26 obj-y += lzma-loader
27 obj-y += nvram
28 obj-y += shared
29 obj-y += prebuilt
30 obj-y += igmpproxy
31 obj-y += iptables
32 obj-y += rc
33 obj-y += iproute2
34 obj-y += rom
35 obj-y += others
36 obj-y += busybox
37 obj-y += httpd
38 obj-y += www
39 obj-y += bridge
40 obj-y += dnsmasq
41 obj-y += etc
42 # obj-y += vlan # use Busybox vconfig
43 obj-y += pppd
44 obj-y += rp-pppoe
45 obj-y += utils
46 obj-y += ntpc
47 obj-y += rstats
48 obj-$(TCONFIG_SNMP) += snmp
49 obj-y += cstats
50 obj-y += udpxy
51 obj-$(TCONFIG_DNSCRYPT) += dnscrypt
53 # !!TB - updated Broadcom Wireless driver
54 obj-y += et
55 obj-y += libbcmcrypto
56 obj-y += wlconf
58 obj-y += cyassl
59 obj-y += mssl
60 obj-y += mdu
62 #Roadkill
63 obj-$(TCONFIG_NOCAT) += nocat
65 # !!TB
66 obj-$(TCONFIG_USB) += p910nd
68 ifeq ($(CONFIG_LINUX26),y)
69 obj-$(TCONFIG_USB) += sd-idle
70 else
71 obj-$(TCONFIG_USB) += scsi-idle
72 endif
74 obj-y += libusb10
75 #obj-y += libusb
76 obj-y += usbmodeswitch
77 obj-$(TCONFIG_FTP) += vsftpd
79 ifeq ($(CONFIG_LINUX26),y)
80 ifeq ($(TCONFIG_SAMBASRV),y)
81 NEED_EX_NLS = y
82 endif
83 ifeq ($(TCONFIG_USB_EXTRAS),y)
84 NEED_EX_USB = y
85 endif
86 endif
88 ifeq ($(TCONFIG_SAMBASRV),y)
89 ifeq ($(TCONFIG_SAMBA3),y)
90 NEED_SAMBA3 = y
91 else
92 NEED_SAMBA2 = y
93 endif
94 endif
96 ifeq ($(TCONFIG_IPV6),y)
97 export TCONFIG_IPV6 := y
98 else
99 TCONFIG_IPV6 :=
100 endif
102 obj-$(NEED_SAMBA2) += samba
103 obj-$(NEED_SAMBA3) += samba3
104 obj-$(TCONFIG_NTFS) += ntfs-3g
105 obj-$(TCONFIG_EBTABLES) += ebtables
106 obj-$(TCONFIG_IPV6) += dhcpv6
108 obj-$(TCONFIG_MEDIA_SERVER) += zlib
109 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
110 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
111 obj-$(TCONFIG_MEDIA_SERVER) += libogg
112 obj-$(TCONFIG_MEDIA_SERVER) += flac
113 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
114 obj-$(TCONFIG_MEDIA_SERVER) += libexif
115 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
116 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
117 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
118 MEDIA_SERVER_STATIC=y
120 obj-y += libnfnetlink
121 obj-y += miniupnpd
122 # obj-y += upnp
124 # configurable packages
126 obj-$(TCONFIG_L2TP) += xl2tpd
127 obj-$(TCONFIG_PPTP) += accel-pptp
128 obj-$(TCONFIG_PPTPD) += pptpd
129 obj-$(TCONFIG_HTTPS) += openssl
130 obj-$(TCONFIG_SSH) += dropbear
131 obj-$(TCONFIG_ZEBRA) += zebra
132 # obj-$(TCONFIG_IPP2P) += ipp2p
133 obj-$(TCONFIG_LZO) += lzo
134 obj-$(TCONFIG_OPENVPN) += openvpn
135 obj-$(TCONFIG_EMF) += emf
136 obj-$(TCONFIG_EMF) += igs
138 #Roadkill - NGinX
139 obj-$(TCONFIG_NGINX) += openssl
140 obj-$(TCONFIG_NGINX) += pcre
141 obj-$(TCONFIG_NGINX) += php
142 obj-$(TCONFIG_NGINX) += nginx
144 obj-$(CONFIG_LINUX26) += hotplug2
145 obj-$(CONFIG_LINUX26) += udevtrigger
147 ifeq ($(TCONFIG_OPENVPN),y)
148 export FULL_OPENSSL := y
149 else
150 ifeq ($(TCONFIG_FTP_SSL),y)
151 export FULL_OPENSSL := y
152 else
153 FULL_OPENSSL :=
154 endif
155 endif
157 obj-y += wanuptime
159 obj-$(TCONFIG_TCPDUMP) += lpcap tcpdump
161 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
162 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
165 # Basic rules
168 all: clean-build libc $(obj-y) kernel
171 kernel: $(LINUXDIR)/.config
172 @$(SEP)
174 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
175 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC) $(PARALLEL_BUILD); \
177 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
178 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD); \
180 ifeq ($(CONFIG_LINUX26),y)
181 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR) $(PARALLEL_BUILD)
182 endif
185 lzma-loader:
186 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD) $(PARALLEL_BUILD)
188 lzma-loader-install: lzma-loader
189 @$(SEP)
192 kmod: dummy
193 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD)
195 testfind:
196 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
197 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
199 install package: $(obj-install) $(LINUXDIR)/.config
200 @$(SEP)
202 install -d $(TARGETDIR)
205 # kernel modules
206 $(MAKE) -C $(LINUXDIR) modules_install \
207 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" \
208 DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
210 ifneq ($(CONFIG_LINUX26),y)
211 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded -x {} \;
212 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded -x {} \;
213 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded -x {} \;
214 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded -x {} \;
215 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded -x {} \;
216 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded -x {} \;
217 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded -x {} \;
219 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug -x -R .mdebug.abi32 {} \;
220 endif
222 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
224 # nice and clean
225 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
226 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
227 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
228 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
229 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
230 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
231 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
232 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
233 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
234 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
236 ##!!TB
237 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
238 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
239 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
240 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
241 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jfs/* . && rm -rf jfs || true
242 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
243 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
244 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
245 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
246 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
247 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
248 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfs/* . && rm -rf hfs || true
249 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
250 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
251 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
252 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
253 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
254 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
255 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
256 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
257 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
258 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
259 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
260 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
261 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
262 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
263 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
264 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
265 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
266 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
267 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
268 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
269 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
270 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv core/* . && rm -rf core || true
271 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv card/* . && rm -rf card || true
272 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv host/* . && rm -rf host || true
273 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
274 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
275 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
276 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
277 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
278 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
279 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv pwc/* . && rm -rf pwc || true
280 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv gl860/* . && rm -rf gl860 || true
281 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv m5602/* . && rm -rf m5602 || true
282 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv stv06xx/* . && rm -rf stv06xx || true
283 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv gspca/* . && rm -rf gspca || true
284 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
286 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
287 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
288 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
289 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
290 cd $(TARGETDIR)/lib/modules && rm -f */source || true
292 # misc
293 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
294 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
295 done
297 ifneq ($(TCONFIG_L7),y)
298 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
299 endif
301 # uClibc
302 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
303 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
304 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
305 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
306 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
307 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
308 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
309 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
310 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
311 ifeq ($(TCONFIG_SSH),y)
312 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
313 endif
314 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
315 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
316 $(STRIP) $(TARGETDIR)/lib/*.so.0
317 endif
319 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
321 @echo ---
323 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
324 @$(SRCBASE)/btools/libfoo.pl
325 else
326 @$(SRCBASE)/btools/libfoo.pl --noopt
327 endif
328 @chmod 0555 $(TARGETDIR)/lib/*.so*
329 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
331 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
332 # separated/copied extra stuff
333 @rm -rf $(PLATFORMDIR)/extras
334 @mkdir $(PLATFORMDIR)/extras
335 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
337 $(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
338 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
340 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
341 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
342 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
343 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
344 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
345 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/jfs.*o $(PLATFORMDIR)/extras/ || true
346 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
347 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
348 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
349 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
350 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
351 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
352 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
353 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
354 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
355 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
357 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
358 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
359 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
360 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*acm.*o $(PLATFORMDIR)/extras/ || true
361 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_ether.*o $(PLATFORMDIR)/extras/ || true
362 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
363 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/usbnet.*o $(PLATFORMDIR)/extras/ || true
364 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
365 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/rndis_host.*o $(PLATFORMDIR)/extras/ || true
366 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
367 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc/*.*o $(PLATFORMDIR)/extras/ || true
368 $(if $(NEED_EX_USB),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc || true
370 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
371 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
372 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
373 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
374 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
375 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
376 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
377 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
378 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
379 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
380 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
381 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
382 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
383 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
384 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
385 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
386 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
387 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
388 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
389 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
390 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
391 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ctf*.*o $(PLATFORMDIR)/extras/ || true
392 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
393 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
394 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
395 @mv $(TARGETDIR)/lib/modules/*/kernel/crypto/* $(PLATFORMDIR)/extras/ || true
396 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/crypto || true
398 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
399 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
400 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
401 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
402 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
403 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
404 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
406 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
407 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
408 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
409 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
410 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
411 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
412 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
413 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
414 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
415 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
416 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
417 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
418 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfs.*o $(PLATFORMDIR)/extras/ || true
419 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
421 ifneq ($(TCONFIG_USB),y)
422 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
423 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
424 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
425 endif
427 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
428 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
429 ifneq ($(TCONFIG_USB_EXTRAS),y)
430 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
431 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
432 endif
433 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
434 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
435 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
436 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
437 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
438 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
439 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
441 @mkdir -p $(PLATFORMDIR)/extras/apps
442 @mkdir -p $(PLATFORMDIR)/extras/lib
444 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
445 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
446 @cp -r $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
448 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
449 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
450 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
451 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
452 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
453 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
454 ifneq ($(NEED_EX_USB),y)
455 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
456 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
457 endif
458 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
460 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
461 ifeq ($(TCONFIG_L7PAT),y)
462 @cd layer7 && ./squish.sh
463 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
464 endif
466 ifeq ($(TCONFIG_USERPPTP),y)
467 @mkdir -p $(TARGETDIR)/rom/etc/vpn
468 cp rc/vpn/* $(TARGETDIR)/rom/etc/vpn
469 chmod +x $(TARGETDIR)/rom/etc/vpn/*
470 endif
472 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
473 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
474 @echo ---
476 @rm -f $(TARGETDIR)/lib/modules/*/build
478 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
479 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -nopad | tee target.info
481 # Package kernel and filesystem
482 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
483 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
484 # $(MAKE) -C $(LINUXDIR) zImage ; \
485 # else \
486 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
487 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
488 # fi
490 # Pad self-booting Linux to a 64 KB boundary
491 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
492 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
493 # Append filesystem to self-booting Linux
494 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
497 libc: $(LIBDIR)/ld-uClibc.so.0
498 # $(MAKE) -C ../../../tools-src/uClibc all
499 # $(MAKE) -C ../../../tools-src/uClibc install
503 # cleaners
506 clean: clean-build $(obj-clean)
507 rm -rf layer7/squished
508 rm -f .ipv6-y .ipv6-n
509 rm -f .fullssl-y .fullssl-n
510 make -C config clean
512 clean-build: dummy
513 rm -rf $(TARGETDIR)
514 rm -rf $(INSTALLDIR)
515 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
516 rm -rf $(PLATFORMDIR)/extras
518 distclean: clean
519 ifneq ($(INSIDE_MAK),1)
520 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
521 endif
522 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
525 # configuration
528 CONFIG_IN := config/config.in
530 config/conf config/mconf:
531 @$(MAKE) -C config
533 rconf: config/conf
534 @config/conf $(CONFIG_IN)
536 rmconf: config/mconf
537 @config/mconf $(CONFIG_IN)
539 roldconf: config/conf
540 @config/conf -o $(CONFIG_IN)
541 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean
543 kconf:
544 @$(MAKE) -C $(LINUXDIR) config
546 kmconf:
547 @$(MAKE) -C $(LINUXDIR) menuconfig
549 koldconf:
550 @$(MAKE) -C $(LINUXDIR) oldconfig
551 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
553 bboldconf:
554 @$(MAKE) -C busybox oldconfig
556 config conf: rconf kconf
558 menuconfig mconf: rmconf kmconf
560 .ipv6-y .ipv6-n:
561 @rm -f .ipv6-y .ipv6-n
562 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
563 @touch $@
565 .fullssl-y .fullssl-n:
566 @rm -f .fullssl-y .fullssl-n
567 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
568 @touch $@
570 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
572 oldconfig oldconf: koldconf roldconf dependconf bboldconf
576 # overrides and extra dependencies
579 busybox: dummy
580 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" $(PARALLEL_BUILD)
582 busybox-install:
583 rm -rf $(INSTALLDIR)/busybox
584 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
586 busybox-clean:
587 -@$(MAKE) -C busybox distclean
589 busybox-config:
590 $(MAKE) -C busybox menuconfig
593 httpd: shared nvram mssl
594 @$(SEP)
595 @$(MAKE) -C httpd
597 www-install:
598 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
600 matrixssl:
601 @$(SEP)
602 @$(MAKE) -C matrixssl/src
604 matrixssl-install:
605 @true
607 matrixssl-clean:
608 -@$(MAKE) -C matrixssl/src clean
610 cyassl/stamp-h1:
611 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
612 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections \
613 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
614 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
615 PTHREAD_LIBS="-lpthread" \
616 $(CONFIGURE)
617 @touch cyassl/stamp-h1
619 cyassl: cyassl/stamp-h1
620 @$(SEP)
621 @$(MAKE) -C cyassl
623 cyassl-clean:
624 -@$(MAKE) -C cyassl clean
625 @rm -f cyassl/stamp-h1
627 cyassl-install:
628 @true
630 ifeq ($(FULL_OPENSSL),y)
631 OPENSSL_CIPHERS:=enable-rc5
632 else
633 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-engine no-aes192 no-cast
634 endif
636 openssl/stamp-h1:
637 cd openssl && \
638 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
639 -ffunction-sections -fdata-sections -Wl,--gc-sections \
640 shared $(OPENSSL_CIPHERS) \
641 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
642 no-seed no-capieng no-cms no-gms no-gmp no-rfc3779 \
643 no-ec no-ecdh no-ecdsa no-err no-hw no-jpake no-threads \
644 no-zlib no-engines no-sse2 \
645 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
647 @$(MAKE) -C openssl clean
648 @touch openssl/stamp-h1
650 openssl: openssl/stamp-h1
652 openssl-clean:
653 -@$(MAKE) -C openssl clean
654 @rm -f openssl/stamp-h1
656 openssl-install: openssl
657 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
658 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
659 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
661 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
662 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
663 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
665 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
667 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
668 # chmod 0500 $(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
780 libnfnetlink: libnfnetlink/stamp-h1
782 libnfnetlink-install:
783 install -D libnfnetlink/src/.libs/libnfnetlink.so.0.2.0 $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
784 $(STRIP) -s $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
785 cd $(INSTALLDIR)/libnfnetlink/usr/lib/ && \
786 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so.0 && \
787 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so
789 miniupnpd-config:
790 #ifeq ($(TCONFIG_IPV6),y)
791 # @cd miniupnpd && ./genconfig.sh --leasefile --ipv6
792 #else
793 @cd miniupnpd && ./genconfig.sh --leasefile
794 #endif
796 miniupnpd: iptables miniupnpd-config libnfnetlink
797 @$(SEP)
798 $(MAKE) -C miniupnpd miniupnpd -f Makefile.linux CC=$(CC) \
799 CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/iptables/include -I$(TOP)/libnfnetlink/include" \
800 LDFLAGS="-L$(TOP)/iptables -liptc -L$(TOP)/libnfnetlink/src/.libs -lnfnetlink" LIBS=""
802 miniupnpd-clean:
803 -@$(MAKE) -C miniupnpd -f Makefile.linux clean
804 @rm -f miniupnpd/config.h
806 miniupnpd-install:
807 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
808 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
810 # !!TB
811 shared: busybox
813 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
814 @$(SEP)
815 $(MAKE) -C vsftpd $(PARALLEL_BUILD)
817 vsftpd-install: vsftpd
818 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
819 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
821 ntfs-3g/Makefile:
822 cd ntfs-3g && \
823 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
824 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
825 $(CONFIGURE) --enable-shared=no --enable-static=no \
826 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
827 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
829 ntfs-3g: ntfs-3g/Makefile
830 @$(MAKE) -C ntfs-3g $(PARALLEL_BUILD)
832 ntfs-3g-clean:
833 -@$(MAKE) -C ntfs-3g clean
834 @rm -f ntfs-3g/Makefile
836 ntfs-3g-install: ntfs-3g
837 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
838 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
839 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
840 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
841 ln -sf ../bin/ntfs-3g mount.ntfs
843 libusb10/Makefile: libusb10/Makefile.in
844 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
845 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
847 libusb10: libusb10/Makefile
848 $(MAKE) -C $@
850 libusb10-install: libusb10
851 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
852 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
854 libusb10-clean:
855 -@$(MAKE) -C $@ clean
856 @rm -rf libusb10/Makefile
858 libusb/Makefile: libusb/Makefile.in
859 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
860 $(CONFIGURE) --prefix=/usr \
861 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
862 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
863 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
865 libusb: libusb10 libusb/Makefile
866 $(MAKE) -C $@
868 libusb-install: libusb
869 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
870 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
872 libusb-clean:
873 -@$(MAKE) -C $@ clean
874 @rm -rf libusb/Makefile
876 usbmodeswitch: libusb10
877 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
878 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
879 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
881 usbmodeswitchdb-install:
882 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
883 # compress whitespace
884 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
885 F=`basename $$D`; \
886 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
887 done
889 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
890 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
891 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
892 @mkdir -p $(TARGETDIR)/rom/etc
893 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
895 dhcpv6/stamp-h1:
896 @cd dhcpv6 && \
897 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
898 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
899 ac_cv_func_setpgrp_void=yes \
900 $(CONFIGURE) --prefix= --with-localdbdir=/var
901 @$(MAKE) -C dhcpv6 clean
902 @touch dhcpv6/stamp-h1
904 dhcpv6: dhcpv6/stamp-h1
905 @$(SEP)
906 @$(MAKE) -C dhcpv6 dhcp6c
908 dhcpv6-install: dhcpv6
909 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
910 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
912 dhcpv6-clean:
913 -@$(MAKE) -C dhcpv6 clean
914 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
917 p910nd:
918 samba:
919 samba3:
921 nvram: shared
923 prebuilt: shared libbcmcrypto
925 vlan:
926 @$(SEP)
927 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
929 vlan-install:
930 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
931 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
934 pptp-client-install:
935 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
936 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
939 accel-pptp: pppd accel-pptp/Makefile
940 @$(MAKE) -C accel-pptp
942 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
943 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
944 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
946 accel-pptp-clean:
947 -@$(MAKE) -C accel-pptp clean
948 @rm -f accel-pptp/Makefile
950 accel-pptp-install: accel-pptp
951 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
952 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
954 pptpd/stamp-h1:
955 cd $(TOP)/pptpd && $(CONFIGURE) --prefix=$(INSTALLDIR)/pptpd --enable-bcrelay CC=mipsel-uclibc-gcc STRIP=mipsel-uclibc-strip AR=mipsel-uclibc-ar LD=mipsel-uclibc-ld NM=mipsel-uclibc-nm RANLIB=mipsel-uclibc-ranlib
956 touch pptpd/stamp-h1
958 pptpd: pptpd/stamp-h1
960 pptpd-install: pptpd
961 @echo pptpd
962 @install -D pptpd/pptpd $(INSTALLDIR)/pptpd/usr/sbin/pptpd
963 @install -D pptpd/bcrelay $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
964 @install -D pptpd/pptpctrl $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
965 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpd
966 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
967 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
969 pptpd-clean:
970 -@$(MAKE) -C pptpd clean
971 rm -rf pptpd/.deps pptpd/stamp-h1
974 pppd/Makefile: pppd/linux/Makefile.top
975 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
977 pppd: pppd/Makefile
978 @$(SEP)
979 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
981 pppd-clean:
982 -@$(MAKE) -C pppd clean
983 @rm -f pppd/Makefile
985 pppd-install: pppd
986 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
987 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
988 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
989 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
990 ifeq ($(TCONFIG_L2TP),y)
991 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
992 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
993 endif
995 # ipupdate-install:
996 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
997 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
999 zebra/stamp-h1:
1000 @cd zebra && rm -f config.cache && \
1001 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1002 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1003 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1004 $(CONFIGURE) --sysconfdir=/etc \
1005 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
1006 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
1007 @touch zebra/stamp-h1
1009 zebra: zebra/stamp-h1
1010 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
1012 zebra-clean:
1013 -@$(MAKE) -C zebra clean
1014 @rm -f zebra/stamp-h1
1016 zebra-install: zebra
1017 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
1018 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
1019 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1020 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
1021 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
1022 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1025 rp-l2tp-install:
1026 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1027 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1028 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
1029 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1030 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1031 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1032 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1034 xl2tpd: pppd
1035 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
1037 xl2tpd-install: xl2tpd
1038 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1039 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1042 bpalogin-install:
1043 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1044 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1046 libbcm:
1047 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
1049 libbcm-install:
1050 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1051 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1054 iproute2:
1055 @$(SEP)
1056 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1058 iproute2-install: iproute2
1059 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1060 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1061 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1062 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1065 ntpc: nvram shared
1068 dropbear: dropbear/config.h
1069 @$(SEP)
1070 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1 $(PARALLEL_BUILD)
1072 dropbear-install:
1073 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1074 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1075 cd $(INSTALLDIR)/dropbear/usr/bin && \
1076 ln -sf dropbearmulti dropbear && \
1077 ln -sf dropbearmulti dropbearconvert && \
1078 ln -sf dropbearmulti dropbearkey && \
1079 ln -sf dropbearmulti dbclient && \
1080 ln -sf dropbearmulti ssh && \
1081 ln -sf dropbearmulti scp
1083 dropbear-clean:
1084 -@$(MAKE) -C dropbear clean
1085 @rm -f dropbear/config.h
1087 dropbear/config.h:
1088 cd dropbear && \
1089 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1090 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1091 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1092 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1093 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1094 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty --enable-bundled-libtom
1095 @$(MAKE) -C dropbear clean
1097 # Media libraries
1099 sqlite/stamp-h1:
1100 cd sqlite && \
1101 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1102 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1103 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1104 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1105 touch sqlite/stamp-h1
1107 sqlite: sqlite/stamp-h1
1108 @$(MAKE) -C sqlite all $(PARALLEL_BUILD)
1110 sqlite-clean:
1111 -@$(MAKE) -C sqlite clean
1112 @rm -f sqlite/stamp-h1
1114 sqlite-install: sqlite
1115 @$(SEP)
1116 ifneq ($(MEDIA_SERVER_STATIC),y)
1117 install -D sqlite/.libs/libsqlite3.so.0 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1118 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1119 endif
1121 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1123 FFMPEG_DECODERS:=aac ac3 atrac3 flac h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1124 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1126 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1127 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1129 FFMPEG_PROTOCOLS:=file
1130 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1132 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
1133 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1135 ffmpeg/stamp-h1: zlib
1136 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1137 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1138 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1139 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1140 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1141 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1142 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1143 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1144 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1145 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1146 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1147 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1148 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1149 --extra-libs="-L$(TOP)/zlib -lz" \
1150 --enable-zlib --disable-debug --prefix=''
1151 touch ffmpeg/stamp-h1
1153 ffmpeg: ffmpeg/stamp-h1 zlib
1154 @$(MAKE) -C ffmpeg all $(PARALLEL_BUILD)
1156 ffmpeg-clean:
1157 -@$(MAKE) -C ffmpeg clean
1158 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1160 ffmpeg-install: ffmpeg
1161 @$(SEP)
1162 ifneq ($(MEDIA_SERVER_STATIC),y)
1163 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1164 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1165 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1166 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1167 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1168 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1169 endif
1171 libogg/stamp-h1:
1172 cd libogg && \
1173 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1174 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1175 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1176 touch libogg/stamp-h1
1178 libogg: libogg/stamp-h1
1179 @$(MAKE) -C libogg all $(PARALLEL_BUILD)
1181 libogg-clean:
1182 -@$(MAKE) -C libogg clean
1183 @rm -f libogg/stamp-h1
1185 libogg-install: libogg
1186 @$(SEP)
1187 ifneq ($(MEDIA_SERVER_STATIC),y)
1188 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1189 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1190 endif
1192 flac/stamp-h1: libogg
1193 cd flac && \
1194 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1195 CPPFLAGS="-I$(TOP)/libogg/include -I$(LINUXDIR)/include" \
1196 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1197 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1198 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1199 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1200 touch flac/stamp-h1
1202 flac: flac/stamp-h1 libogg
1203 @$(MAKE) -C flac/src/libFLAC all $(PARALLEL_BUILD)
1205 flac-clean:
1206 -@$(MAKE) -C flac clean
1207 @rm -f flac/stamp-h1
1209 flac-install: flac
1210 @$(SEP)
1211 ifneq ($(MEDIA_SERVER_STATIC),y)
1212 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1213 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1214 endif
1216 jpeg/stamp-h1:
1217 cd jpeg && \
1218 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1219 touch jpeg/stamp-h1
1221 jpeg: jpeg/stamp-h1
1222 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so $(PARALLEL_BUILD)
1224 jpeg-clean:
1225 -@$(MAKE) -C jpeg clean
1226 @rm -f jpeg/stamp-h1 jpeg/Makefile
1228 jpeg-install: jpeg
1229 @$(SEP)
1230 ifneq ($(MEDIA_SERVER_STATIC),y)
1231 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1232 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1233 endif
1235 libexif/stamp-h1:
1236 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1237 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1238 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1239 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1240 touch libexif/stamp-h1
1242 libexif: libexif/stamp-h1
1243 @$(MAKE) -C libexif all
1245 libexif-clean:
1246 -@$(MAKE) -C libexif clean
1247 @rm -f libexif/stamp-h1
1249 libexif-install: libexif
1250 @$(SEP)
1251 ifneq ($(MEDIA_SERVER_STATIC),y)
1252 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1253 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1254 endif
1256 zlib/stamp-h1:
1257 cd zlib && \
1258 CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1259 ./configure --shared --prefix='/usr'
1260 @touch zlib/stamp-h1
1262 zlib: zlib/stamp-h1
1263 @$(SEP)
1264 @$(MAKE) -C zlib CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) all
1266 zlib-clean:
1267 -@$(MAKE) -C zlib clean
1268 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1270 zlib-install: zlib
1271 @$(SEP)
1272 ifneq ($(MEDIA_SERVER_STATIC),y)
1273 install -D zlib/libz.so.1.2.5 $(INSTALLDIR)/zlib/usr/lib/libz.so.1.2.5
1274 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1.2.5
1275 cd $(INSTALLDIR)/zlib/usr/lib && ln -s libz.so.1.2.5 libz.so.1 && ln -s libz.so.1.2.5 libz.so
1276 endif
1278 libid3tag/stamp-h1: zlib
1279 cd libid3tag && \
1280 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1281 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1282 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1283 --disable-debugging --disable-profiling
1284 touch libid3tag/stamp-h1
1286 libid3tag: libid3tag/stamp-h1 zlib
1287 @$(MAKE) -C libid3tag all $(PARALLEL_BUILD)
1289 libid3tag-clean:
1290 -@$(MAKE) -C libid3tag distclean
1291 @rm -f libid3tag/stamp-h1
1293 libid3tag-install: libid3tag
1294 @$(SEP)
1295 ifneq ($(MEDIA_SERVER_STATIC),y)
1296 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1297 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1298 endif
1300 libvorbis/stamp-h1: libogg
1301 cd libvorbis && \
1302 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1303 CPPFLAGS="-I$(TOP)/libogg/include" \
1304 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1305 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1306 --with-ogg-includes="$(TOP)/libogg/include" \
1307 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1308 touch libvorbis/stamp-h1
1310 libvorbis: libvorbis/stamp-h1
1311 @$(MAKE) -C libvorbis/lib all $(PARALLEL_BUILD)
1313 libvorbis-clean:
1314 -@$(MAKE) -C libvorbis clean
1315 @rm -f libvorbis/stamp-h1
1317 libvorbis-install: libvorbis
1318 @$(SEP)
1319 ifneq ($(MEDIA_SERVER_STATIC),y)
1320 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1321 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1322 endif
1324 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1325 @$(SEP)
1326 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna $(PARALLEL_BUILD)
1329 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1330 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1331 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1332 $(CONFIGURE) --prefix=/usr
1334 igmpproxy: igmpproxy/src/Makefile
1335 @$(SEP)
1336 @$(MAKE) -C igmpproxy/src $(PARALLEL_BUILD)
1338 igmpproxy-install: igmpproxy
1339 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1340 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1342 igmpproxy-clean:
1343 -@$(MAKE) -C igmpproxy/src clean
1344 @rm -f igmpproxy/src/Makefile
1346 udev:
1347 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1348 PROGRAMS=udevtrigger
1350 udev-install: udev
1351 install -d $(INSTALLDIR)
1352 install -d $(TARGETDIR)
1353 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1355 hotplug2:
1356 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1358 hotplug2-install: hotplug2
1359 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1360 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1362 emf:
1363 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1365 emf-install: emf
1366 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1368 igs:
1369 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1371 igs-install: igs
1372 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1374 wanuptime: nvram shared
1375 @$(SEP)
1376 @$(MAKE) -C wanuptime
1378 wanuptime-clean:
1379 -@$(MAKE) -C wanuptime clean
1381 wanuptime-install:
1382 install -D wanuptime/wanuptime $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1383 $(STRIP) $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1385 ebtables: dummy
1386 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1387 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1388 LOCKFILE="/var/lock/ebtables" LOCKDIR="/var/lock" \
1389 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1391 ebtables-install: ebtables
1392 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1394 @mkdir -p $(TARGETDIR)/rom/etc
1395 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1396 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1398 install -d $(INSTALLDIR)/ebtables/usr/lib
1399 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1400 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1401 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1403 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1404 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1405 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1407 ebtables-clean:
1408 -@$(MAKE) -C ebtables clean
1410 #Roadkill
1411 glib/stamp-h1:
1412 @$(SEP)
1413 @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 \
1414 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 \
1415 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 \
1416 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 \
1417 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
1418 @$(MAKE) -C glib
1419 touch glib/stamp-h1
1421 glib: glib/stamp-h1
1422 @$(MAKE) -C glib $(PARALLEL_BUILD)
1424 glib-clean:
1425 -@$(MAKE) -C glib clean
1426 rm -f glib/stamp-h1
1428 glib-install: glib
1429 @$(MAKE) -C glib DESTDIR=$(INSTALLDIR)/glib install
1431 #Roadkill
1432 nocat/stamp-h1: glib-install
1433 @$(SEP)
1434 @cd nocat && \
1435 NC_CONF_PATH="/" \
1436 $(CONFIGURE) --with-firewall=iptables --with-glib-prefix="$(INSTALLDIR)/glib/usr" --localstatedir=/var --sysconfdir=/etc
1437 @$(MAKE) -C nocat
1439 echo *** integrate glib to nocat installdir
1440 install -d $(INSTALLDIR)/nocat/usr/lib
1441 install -D glib/.libs/libglib-1.2.so.0.0.10 $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1442 cd $(INSTALLDIR)/nocat/usr/lib && ln -s libglib-1.2.so.0.0.10 libglib-1.2.so.0
1443 $(STRIP) $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1444 touch nocat/stamp-h1
1446 nocat: nocat/stamp-h1
1447 @$(MAKE) -C nocat $(PARALLEL_BUILD)
1449 nocat-clean:
1450 -@$(MAKE) -C nocat clean
1451 rm -f nocat/stamp-h1
1453 nocat-install:
1454 install -D nocat/src/splashd $(INSTALLDIR)/nocat/usr/sbin/splashd
1455 $(STRIP) $(INSTALLDIR)/nocat/usr/sbin/splashd
1456 mkdir -p $(INSTALLDIR)/nocat/usr/libexec/nocat
1457 install -D nocat/libexec/iptables/* $(INSTALLDIR)/nocat/usr/libexec/nocat
1459 lzo/stamp-h1:
1460 cd lzo && \
1461 CFLAGS="-O3 -Wall -fPIC $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
1462 touch lzo/stamp-h1
1464 lzo: lzo/stamp-h1
1465 @$(MAKE) -C lzo $(PARALLEL_BUILD)
1467 lzo-clean:
1468 -@$(MAKE) -C lzo clean
1469 @rm -f lzo/stamp-h1
1471 lzo-install: lzo
1472 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1473 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1474 cd $(INSTALLDIR)/lzo/usr/lib && ln -sf liblzo2.so.2 liblzo2.so
1476 openvpn: openvpn/.conf openssl lzo
1478 openvpn/.conf:
1479 cd openvpn && CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1480 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1481 CPPFLAGS="-I$(TOP)/lzo/include -I$(TOP)/openssl/include" \
1482 $(CONFIGURE) --prefix= \
1483 --with-crypto-library=openssl \
1484 --with-iproute-path="/usr/sbin/ip" \
1485 --disable-debug --disable-plugins --enable-management --enable-small \
1486 --disable-selinux --disable-socks --enable-password-save \
1487 OPENSSL_SSL_CFLAGS="-I$(TOP)/openssl/include" \
1488 OPENSSL_SSL_LIBS="-L$(TOP)/openssl -lssl" \
1489 ac_cv_lib_resolv_gethostbyname=no
1490 touch openvpn/.conf
1492 openvpn: openvpn/.conf
1493 @$(MAKE) -C openvpn $(PARALLEL_BUILD)
1495 openvpn-clean:
1496 -@$(MAKE) -C openvpn clean
1497 @rm -f openvpn/.conf
1499 openvpn-install: openvpn
1500 install -D openvpn/src/openvpn/.libs/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1501 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1502 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1504 sd-idle/stamp-h1:
1505 cd sd-idle \
1506 CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
1507 $(MAKE) -C sd-idle
1508 chmod 0755 sd-idle/sd-idle
1509 touch sd-idle/stamp-h1
1511 sd-idle-clean:
1512 -@$(MAKE) -C sd-idle clean
1513 @rm -f sd-idle/stamp-h1
1515 sd-idle-install: sd-idle/stamp-h1
1516 install -d $(INSTALLDIR)/sd-idle/usr/bin
1517 install -D sd-idle/sd-idle $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
1518 $(STRIP) -s $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
1520 snmp/stamp-h1:
1521 cd snmp && \
1522 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1523 $(CONFIGURE) --prefix=/usr --with-endianness=little --enable-mini-agent --disable-debugging \
1524 --disable-privacy --without-opaque-special-types --with-persistent-directory=/tmp/snmp-persist \
1525 --with-default-snmp-version=3 --with-sys-contact=root --with-sys-location=Unknown --with-logfile=/dev/null \
1526 --with-out-transports=UDPIPv6,TCPIPv6,AAL5PVC,IPX,TCP,Unix --enable-shared=no --enable-static --with-gnu-ld \
1527 --enable-internal-md5 --with-copy-persistent-files=no --without-openssl -sysconfdir=/tmp \
1528 --with-mib-modules=mibII,host,mibII/ip,mibII/tcp,mibII/udp,mibII/icmp,mibII/var_route,mibII/kernel_linux,qos,ucd_snmp \
1529 --with-out-mib-modules=snmpv3mibs,agent_mips,agentx,notification,utilities,target --disable-ipv6 --with-defaults \
1530 --without-efence --without-rsaref --without-kmem-usage --without-rpm --without-dmalloc
1531 touch snmp/stamp-h1
1533 snmp: snmp/stamp-h1
1534 @$(SEP)
1535 $(MAKE) -C snmp
1537 snmp-clean:
1538 -@$(MAKE) -C snmp clean
1539 @rm -f snmp/stamp-h1
1541 snmp-install: snmp
1542 install -D snmp/agent/snmpd $(INSTALLDIR)/snmp/usr/sbin/snmpd
1543 $(STRIP) $(INSTALLDIR)/snmp/usr/sbin/snmpd
1545 libpcap/stamp-h1: openssl
1546 cd libpcap && \
1547 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1548 ac_cv_linux_vers=2 \
1549 $(CONFIGURE) --prefix=/usr --with-pcap=linux \
1550 $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6)
1551 touch libpcap/stamp-h1
1553 libpcap: libpcap/stamp-h1
1554 @$(SEP)
1555 $(MAKE) -C libpcap
1557 libpcap-clean:
1558 -@$(MAKE) -C libpcap clean
1559 @rm -f libpcap/stamp-h1
1561 libpcap-install:
1562 @$(SEP)
1564 dnscrypt/stamp-h1:
1565 cd $(TOP)/dnscrypt && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1566 $(CONFIGURE) --prefix=/usr --disable-ssp
1567 touch dnscrypt/stamp-h1
1569 dnscrypt: dnscrypt/stamp-h1
1571 dnscrypt-install: dnscrypt
1572 install -D dnscrypt/src/proxy/dnscrypt-proxy $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
1573 install -D dnscrypt/src/hostip/hostip $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
1574 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
1575 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
1577 dnscrypt-clean:
1578 -@$(MAKE) -C dnscrypt clean
1579 @rm -rf dnscrypt/stamp-h1 dnscrypt/src/dnscrypt-proxy/.deps dnscrypt/Makefile
1581 tcpdump/stamp-h1: openssl libpcap
1582 cd tcpdump && \
1583 CFLAGS="-Os -Wall $(EXTRACFLAGS) -I$(TOP)/openssl/include" \
1584 LDFLAGS="-L$(TOP)/openssl" \
1585 ac_cv_linux_vers=2 ac_cv_search_getaddrinfo=no \
1586 $(CONFIGURE) --prefix=/usr --disable-smb \
1587 --without-smi --with-crypt \
1588 $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6)
1589 touch tcpdump/stamp-h1
1591 tcpdump: tcpdump/stamp-h1
1592 @$(SEP)
1593 $(MAKE) -C tcpdump
1595 tcpdump-clean:
1596 -@$(MAKE) -C tcpdump clean
1597 @rm -f tcpdump/stamp-h1
1599 tcpdump-install: tcpdump
1600 install -D tcpdump/tcpdump $(INSTALLDIR)/tcpdump/usr/sbin/tcpdump
1601 $(STRIP) $(INSTALLDIR)/tcpdump/usr/sbin/tcpdump
1603 #Libpcre
1604 pcre/stamp-h1:
1605 $(SEP)
1606 cd pcre && \
1607 CC=$(CC) CXX=mipsel-uclibc-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1608 $(CONFIGURE) --prefix=/usr --disable-dependency-tracking --enable-utf8 --enable-unicode-properties --disable-cpp
1609 @touch pcre/stamp-h1
1610 [ -d pcre/m4 ] || mkdir pcre/m4
1612 pcre: pcre/stamp-h1
1614 pcre-install: pcre
1615 @$(SEP)
1616 install -D pcre/.libs/libpcre.so.1 $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1
1617 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1
1618 install -D pcre/.libs/libpcreposix.so.0.0.1 $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.1
1619 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.1
1621 pcre-clean:
1622 ( if [ -f pcre/Makefile ]; then \
1623 $(MAKE) -C pcre clean; \
1624 rm -rf pcre/stamp-h1; \
1625 fi )
1626 #PHP
1627 php/stamp-h1: pcre zlib-install
1628 @$(SEP)
1629 #install pcre-nginx
1630 @$(MAKE) -C pcre DESTDIR=$(TOP)/pcre-nginx install
1631 #install zlib libs
1632 install -D zlib/libz.so.1.2.5 $(INSTALLDIR)/zlib/usr/lib/libz.so.1.2.5
1633 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1.2.5
1634 cd $(INSTALLDIR)/zlib/usr/lib && ln -sf libz.so.1.2.5 libz.so.1 && ln -sf libz.so.1.2.5 libz.so
1635 install -D zlib/zlib.h $(INSTALLDIR)/zlib/usr/include/zlib.h
1637 @cd php && autoreconf -v -f -i
1638 cd php && CC=$(CC) CXX=mipsel-uclibc-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall -I$(TOP)/zlib $(EXTRACFLAGS)" \
1639 $(CONFIGURE) --prefix=/usr \
1640 --enable-shared \
1641 --disable-static \
1642 --disable-rpath \
1643 --disable-debug \
1644 --without-pear \
1645 --with-config-file-path=/etc \
1646 --with-config-file-scan-dir=/etc/php5 \
1647 --disable-short-tags \
1648 --with-zlib="$(INSTALLDIR)/zlib/usr" \
1649 --with-zlib-dir="$(INSTALLDIR)/zlib/usr" \
1650 --with-pcre-regex="$(TOP)/pcre-nginx/usr" \
1651 --disable-phar \
1652 --enable-cli \
1653 --enable-cgi \
1654 --disable-calendar \
1655 --disable-ctype \
1656 --without-curl \
1657 --disable-fileinfo \
1658 --without-gettext \
1659 --disable-dom \
1660 --disable-exif \
1661 --disable-ftp \
1662 --without-gd \
1663 --without-gmp \
1664 --disable-hash \
1665 --without-iconv \
1666 --disable-json \
1667 --without-ldap \
1668 --disable-mbstring \
1669 --without-mcrypt \
1670 --without-mysqli \
1671 --without-openssl \
1672 --disable-pcntl \
1673 --without-pdo-mysql \
1674 --without-pdo-pgsql \
1675 --without-pdo-sqlite \
1676 --disable-pdo \
1677 --without-pgsql \
1678 --disable-session \
1679 --disable-shmop \
1680 --disable-simplexml \
1681 --disable-soap \
1682 --disable-sockets \
1683 --without-sqlite \
1684 --without-sqlite3 \
1685 --disable-sysvmsg \
1686 --disable-sysvsem \
1687 --disable-sysvshm \
1688 --disable-tokenizer \
1689 --disable-xml \
1690 --disable-xmlreader \
1691 --disable-xmlwriter \
1692 --disable-zip \
1693 --disable-filter \
1694 --disable-libxml \
1695 --without-system-tzdata \
1696 php_cv_cc_rpath="no" \
1697 iconv_impl_name="gnu_libiconv"
1698 @touch php/stamp-h1
1699 @$(MAKE) -C php
1701 php: php/stamp-h1
1703 php-clean:
1704 -@$(MAKE) -C php clean
1705 -@rm php/stamp-h1
1706 -@rm -vrf $(TOP)/pcre-nginx
1708 php-install: php
1709 @$(SEP)
1710 install -d $(INSTALLDIR)/php/usr/sbin
1711 install -D php/sapi/cli/php $(INSTALLDIR)/php/usr/sbin/php-cli && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cli
1712 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cli
1713 install -D php/sapi/cgi/php-cgi $(INSTALLDIR)/php/usr/sbin/php-cgi && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cgi
1714 cd $(INSTALLDIR)/php/usr/sbin && ln -sf php-cgi php-fcgi
1715 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cgi
1717 #NGinx
1718 nginx/stamp-h1: zlib pcre
1719 @$(SEP)
1720 ( if [ ! -f openssl-nginx/Makefile ]; then \
1721 cp -rf $(TOP)/openssl $(TOP)/openssl-nginx; \
1722 echo $(TOP)/openssl copied over to $(TOP)/openssl-nginx; \
1723 $(MAKE) -C $(TOP)/openssl-nginx clean; \
1724 fi )
1725 cd nginx && ./configure --crossbuild=Linux::$(ARCH) \
1726 --prefix=/usr \
1727 --conf-path=/etc/nginx/nginx.conf \
1728 --error-log-path=/tmp/var/log/nginx/error.log \
1729 --http-log-path=/tmp/var/log/nginx/access.log \
1730 --pid-path=/tmp/var/run/nginx.pid \
1731 --lock-path=/tmp/var/run/nginx.lock.accept \
1732 --with-http_ssl_module \
1733 --http-client-body-temp-path=/tmp/var/lib/nginx/client \
1734 --http-fastcgi-temp-path=/tmp/var/lib/nginx/fastcgi \
1735 --http-uwsgi-temp-path=/tmp/var/lib/nginx/uwsgi \
1736 --http-scgi-temp-path=/tmp/var/lib/nginx/scgi \
1737 --without-http_proxy_module \
1738 --with-pcre=$(TOP)/pcre \
1739 --with-zlib=$(TOP)/zlib \
1740 --with-openssl=$(TOP)/openssl-nginx \
1741 --with-cc="$(CC)" \
1742 --with-ld-opt="$(LDFLAGS)" \
1743 --with-cc-opt="$(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) -I $(TOP)/openssl-nginx/include"
1745 nginx: nginx/stamp-h1
1746 @$(SEP)
1747 $(MAKE) -C nginx
1749 nginx-clean:
1750 -@$(MAKE) -C nginx clean
1751 -@rm -rf $(TOP)/openssl-nginx
1752 -@rm -f nginx/stamp-h1
1754 nginx-install: nginx
1755 install -d $(INSTALLDIR)/nginx/usr/sbin
1756 install -D nginx/objs/nginx $(INSTALLDIR)/nginx/usr/sbin/nginx && chmod 755 $(INSTALLDIR)/nginx/usr/sbin/nginx
1757 $(STRIP) $(INSTALLDIR)/nginx/usr/sbin/nginx
1760 # Generic rules
1764 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
1767 %-clean:
1768 @-[ ! -d $* ] || $(MAKE) -C $* clean
1770 %-distclean:
1771 @-[ ! -d $* ] || $(MAKE) -C $* distclean
1773 %-install: %
1774 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
1776 %-build:
1777 $(MAKE) $*-clean $*
1779 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
1781 .PHONY: all clean distclean mrproper install package
1782 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
1783 .PHONY: dummy libnet