transmission: add autoreconf before configure should resolve compilation issue
[tomato/tomato-dir865l.git] / release / src / router / Makefile
blob4f06d716cdd5d1a617fd8e73f62c34db983fa78a
1 # Broadcom Linux Router Makefile
3 # Copyright 2005, Broadcom Corporation
4 # All Rights Reserved.
6 # THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
7 # KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
8 # SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
9 # FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
13 include common.mak
15 #TOMATO_EXPERIMENTAL=0
17 #export PARALLEL_BUILD :=
18 export PARALLEL_BUILD := -j`grep -c '^processor' /proc/cpuinfo`
23 SEP=echo "\033[41;1m $@ \033[0m"
26 # standard packages
28 obj-y += lzma-loader
29 obj-y += nvram
30 obj-y += shared
31 obj-y += prebuilt
32 obj-y += igmpproxy
33 obj-y += iptables
34 obj-y += rc
35 obj-y += iproute2
36 obj-y += rom
37 obj-y += others
38 obj-y += busybox
39 obj-y += httpd
40 obj-y += www
41 obj-y += bridge
42 obj-y += dnsmasq
43 obj-y += etc
44 # obj-y += vlan # use Busybox vconfig
45 obj-y += pppd
46 obj-y += rp-pppoe
47 obj-y += utils
48 obj-y += ntpc
49 obj-y += rstats
50 obj-y += cstats
51 obj-y += udpxy
52 obj-$(TCONFIG_TOR) += tor
53 obj-$(TCONFIG_TOR) += libevent
54 obj-$(TCONFIG_TOR) += zlib
55 obj-$(TCONFIG_DNSCRYPT) += libsodium
56 obj-$(TCONFIG_DNSCRYPT) += dnscrypt
57 obj-$(TCONFIG_SNMP) += snmp
58 obj-$(TCONFIG_SDHC) += mmc
60 # !!TB - updated Broadcom Wireless driver
61 obj-y += et
62 obj-y += libbcmcrypto
63 obj-y += wlconf
65 obj-y += cyassl
66 obj-y += mssl
67 obj-y += mdu
68 obj-$(TCONFIG_RAID) += mdadm
70 obj-$(TCONFIG_NFS) += portmap
71 obj-$(TCONFIG_NFS) += e2fsprogs
72 obj-$(TCONFIG_NFS) += libevent
73 obj-$(TCONFIG_NFS) += libnfsidmap
74 obj-$(TCONFIG_NFS) += nfs-utils
76 #Roadkill
77 obj-$(TCONFIG_NOCAT) += nocat
79 # !!TB
80 obj-$(TCONFIG_USB) += p910nd
81 obj-$(TCONFIG_USB) += comgt
83 obj-$(TCONFIG_UPS) += apcupsd
85 ifeq ($(CONFIG_LINUX26),y)
86 obj-$(TCONFIG_USB) += sd-idle
87 else
88 obj-$(TCONFIG_USB) += scsi-idle
89 endif
91 obj-y += libusb10
92 #obj-y += libusb
93 obj-y += usbmodeswitch
94 obj-$(TCONFIG_FTP) += vsftpd
96 ifeq ($(CONFIG_LINUX26),y)
97 ifeq ($(TCONFIG_SAMBASRV),y)
98 NEED_EX_NLS = y
99 endif
100 ifeq ($(TCONFIG_USB_EXTRAS),y)
101 NEED_EX_USB = y
102 endif
103 endif
105 ifeq ($(TCONFIG_SAMBASRV),y)
106 ifeq ($(TCONFIG_SAMBA3),y)
107 NEED_SAMBA3 = y
108 else
109 NEED_SAMBA2 = y
110 endif
111 endif
113 ifeq ($(TCONFIG_IPV6),y)
114 export TCONFIG_IPV6 := y
115 else
116 TCONFIG_IPV6 :=
117 endif
119 ifeq ($(TCONFIG_IPSEC),y)
120 export TCONFIG_IPSEC := y
121 else
122 TCONFIG_IPSEC :=
123 endif
125 ifeq ($(TCONFIG_RAID),y)
126 export TCONFIG_RAID := y
127 else
128 TCONFIG_RAID :=
129 endif
131 obj-$(NEED_SAMBA2) += samba
132 obj-$(NEED_SAMBA3) += samba3
133 obj-$(TCONFIG_NTFS) += ntfs-3g
134 obj-$(TCONFIG_EBTABLES) += ebtables
135 #obj-$(TCONFIG_IPV6) += libdaemon
136 #obj-$(TCONFIG_IPV6) += radvd
137 obj-$(TCONFIG_IPV6) += dhcpv6
139 obj-$(TCONFIG_MEDIA_SERVER) += zlib
140 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
141 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
142 #obj-$(TCONFIG_MEDIA_SERVER) += libiconv
143 obj-$(TCONFIG_MEDIA_SERVER) += libogg
144 obj-$(TCONFIG_MEDIA_SERVER) += flac
145 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
146 obj-$(TCONFIG_MEDIA_SERVER) += libexif
147 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
148 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
149 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
150 MEDIA_SERVER_STATIC=y
151 #MEDIA_SERVER_STATIC :=
153 #obj-y += libnfnetlink
154 obj-y += miniupnpd
155 # obj-y += upnp
156 obj-$(CONFIG_LINUX26) += ipset
160 # configurable packages
162 obj-$(TCONFIG_L2TP) += xl2tpd
163 obj-$(TCONFIG_PPTP) += accel-pptp
164 obj-$(TCONFIG_PPTPD) += pptpd
165 obj-$(TCONFIG_HTTPS) += openssl
166 obj-$(TCONFIG_SSH) += dropbear
167 obj-$(TCONFIG_ZEBRA) += zebra
168 # obj-$(TCONFIG_IPP2P) += ipp2p
169 obj-$(TCONFIG_LZO) += lzo
170 obj-$(TCONFIG_OPENVPN) += openvpn
171 obj-$(TCONFIG_OPENVPN) += openvpn_plugin_auth_nvram
172 obj-$(TCONFIG_EMF) += emf
173 obj-$(TCONFIG_EMF) += igs
175 # Tomato RAF
176 # additional modules for nginx
177 ifeq (obj-$(TCONFIG_NGINX),y)
178 ifndef ($(ADDITIONAL_MODULES))
179 ADDITIONAL_MODULES:=
180 else
181 ifeq ($(TCONFIG_IPV6),y)
182 ADDITIONAL_MODULES += --with-ipv6
183 endif
184 endif
185 endif
186 obj-$(TCONFIG_NGINX) += openssl
187 obj-$(TCONFIG_NGINX) += spawn-fcgi
188 obj-$(TCONFIG_NGINX) += pcre
189 obj-$(TCONFIG_NGINX) += php
190 obj-$(TCONFIG_NGINX) += nginx
192 obj-$(TCONFIG_BBT) += openssl
193 obj-$(TCONFIG_BBT) += libevent
194 obj-$(TCONFIG_BBT) += libcurl
195 obj-$(TCONFIG_BBT) += transmission
196 obj-$(TCONFIG_BT) += btgui
197 obj-$(TCONFIG_BBT) += zlib
198 #obj-$(TCONFIG_BBT) += libiconv
200 obj-$(CONFIG_LINUX26) += hotplug2
201 obj-$(CONFIG_LINUX26) += udevtrigger
203 ifeq ($(TCONFIG_OPENVPN),y)
204 export FULL_OPENSSL := y
205 else
206 ifeq ($(TCONFIG_FTP_SSL),y)
207 export FULL_OPENSSL := y
208 else
209 ifeq ($(TCONFIG_BBT),y)
210 export FULL_OPENSSL := y
211 else
212 ifeq ($(TCONFIG_TOR),y)
213 export FULL_OPENSSL := y
214 else
215 FULL_OPENSSL :=
216 endif
217 endif
218 endif
219 endif
221 obj-y += wanuptime
223 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
224 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
229 # Basic rules
232 all: clean-build libc $(obj-y) kernel
235 kernel: $(LINUXDIR)/.config
236 @$(SEP)
238 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
239 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC) $(PARALLEL_BUILD); \
241 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
242 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD); \
244 ifeq ($(CONFIG_LINUX26),y)
245 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR) $(PARALLEL_BUILD)
246 endif
249 lzma-loader:
250 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD) $(PARALLEL_BUILD)
252 lzma-loader-install: lzma-loader
253 @$(SEP)
256 kmod: dummy
257 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD)
259 testfind:
260 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
261 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
263 install package: $(obj-install) $(LINUXDIR)/.config
264 @$(SEP)
266 install -d $(TARGETDIR)
269 # kernel modules
270 $(MAKE) -C $(LINUXDIR) modules_install \
271 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" \
272 DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
274 ifneq ($(CONFIG_LINUX26),y)
275 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded -x {} \;
276 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded -x {} \;
277 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded -x {} \;
278 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded -x {} \;
279 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded -x {} \;
280 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded -x {} \;
281 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded -x {} \;
283 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug -x -R .mdebug.abi32 {} \;
284 endif
286 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
288 # nice and clean
289 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
290 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
291 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
292 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
293 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
294 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
295 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
296 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
297 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
298 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
300 ##!!TB
301 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
302 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
303 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
304 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
305 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jfs/* . && rm -rf jfs || true
306 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
307 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
308 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
309 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
310 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
311 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
312 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfs/* . && rm -rf hfs || true
313 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
314 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
315 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
316 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
317 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
318 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
319 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
320 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
321 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
322 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
323 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
324 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
325 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
326 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
327 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
328 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
329 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
330 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
331 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
332 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
333 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
334 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
335 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
336 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
337 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
338 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
339 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
340 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv pwc/* . && rm -rf pwc || true
341 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv gl860/* . && rm -rf gl860 || true
342 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv m5602/* . && rm -rf m5602 || true
343 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv stv06xx/* . && rm -rf stv06xx || true
344 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv gspca/* . && rm -rf gspca || true
345 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
347 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
348 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
349 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
350 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
351 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv usb/* . && rm -rf usb || true
352 cd $(TARGETDIR)/lib/modules && rm -f */source || true
354 # misc
355 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
356 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
357 done
359 ifneq ($(TCONFIG_L7),y)
360 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
361 endif
363 # uClibc
364 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
365 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
366 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
367 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
368 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
369 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
370 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
371 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
372 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
373 ifeq ($(TCONFIG_SSH),y)
374 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
375 endif
376 ifeq ($(TCONFIG_BBT),y)
377 install $(LIBDIR)/librt-0.9.30.1.so $(TARGETDIR)/lib/librt.so.0
378 endif
379 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
380 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
381 $(STRIP) $(TARGETDIR)/lib/*.so.0
382 endif
384 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
386 @echo ---
388 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
389 @$(SRCBASE)/btools/libfoo.pl
390 else
391 @$(SRCBASE)/btools/libfoo.pl --noopt
392 endif
393 @chmod 0555 $(TARGETDIR)/lib/*.so*
394 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
396 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
397 # separated/copied extra stuff
398 @rm -rf $(PLATFORMDIR)/extras
399 @mkdir $(PLATFORMDIR)/extras
400 @mkdir $(PLATFORMDIR)/extras/ipsec
401 @mkdir $(PLATFORMDIR)/extras/raid
402 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
403 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/usr/lib/iptables/libipt_policy.*o $(PLATFORMDIR)/extras/ipsec/ || true
405 $(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
406 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
408 $(if $(TCONFIG_RAID),@cp -f,@mv) $(TARGETDIR)/usr/sbin/mdadm $(PLATFORMDIR)/extras/raid/ || true
409 $(if $(TCONFIG_RAID),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/md/*.ko $(PLATFORMDIR)/extras/raid/ || true
410 $(if $(TCONFIG_RAID),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/drivers/md || true
412 @cp $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ip_set*o $(PLATFORMDIR)/extras/ || true
413 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
414 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
415 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
416 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
417 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
418 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/jfs.*o $(PLATFORMDIR)/extras/ || true
419 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
420 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
421 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
422 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
423 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
424 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
425 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
426 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
427 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
428 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
430 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
431 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
432 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
433 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
434 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/cdc-acm.*o $(PLATFORMDIR)/extras/ || true
435 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
436 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/cdc_*.*o $(PLATFORMDIR)/extras/ || true
437 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usbnet.*o $(PLATFORMDIR)/extras/ || true
438 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
439 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
441 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ch341.*o $(PLATFORMDIR)/extras/ || true
442 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
443 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
444 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
445 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
446 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
447 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
448 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
449 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
450 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
451 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/cdc-wdm.*o $(PLATFORMDIR)/extras/ || true
452 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
453 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/rndis_host.*o $(PLATFORMDIR)/extras/ || true
454 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/qmi_wwan.*o $(PLATFORMDIR)/extras/ || true
455 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ipheth.*o $(PLATFORMDIR)/extras/ || true
456 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb || true
457 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
458 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
459 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
460 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
461 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
462 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
463 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
464 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
465 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
466 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
467 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
468 $(if $(TCONFIG_CTF),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ctf*.*o $(PLATFORMDIR)/extras/ || true
469 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
470 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
471 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
472 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/crypto/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
473 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/crypto || true
474 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
475 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm || true
476 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/key/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
477 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/net/key || true
478 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/xfrm*.ko $(PLATFORMDIR)/extras/ipsec/ || true
479 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/tunnel*.ko $(PLATFORMDIR)/extras/ipsec/ || true
480 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ah*.ko $(PLATFORMDIR)/extras/ipsec/ || true
481 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/esp*.ko $(PLATFORMDIR)/extras/ipsec/ || true
482 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ipcomp*.ko $(PLATFORMDIR)/extras/ipsec/ || true
483 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_policy.ko $(PLATFORMDIR)/extras/ipsec/ || true
485 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
486 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
487 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
488 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
489 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
490 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
491 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
493 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
494 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
495 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
496 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
497 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
498 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
499 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
500 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
501 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
502 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
503 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
504 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
505 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfs.*o $(PLATFORMDIR)/extras/ || true
506 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
508 ifneq ($(TCONFIG_USB),y)
509 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
510 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
511 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
512 endif
514 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
515 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
516 ifneq ($(TCONFIG_USB_EXTRAS),y)
517 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
518 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
519 endif
520 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
521 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
522 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
523 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
524 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
525 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
526 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
528 @mkdir -p $(PLATFORMDIR)/extras/apps
529 @mkdir -p $(PLATFORMDIR)/extras/lib
531 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
532 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
533 @cp -r $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
535 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
536 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
537 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
538 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
539 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
540 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
541 ifneq ($(NEED_EX_USB),y)
542 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
543 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
544 endif
545 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
547 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
548 ifeq ($(TCONFIG_L7PAT),y)
549 @cd layer7 && ./squish.sh
550 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
551 endif
553 ifeq ($(TCONFIG_PPTPD),y)
554 @mkdir -p $(TARGETDIR)/rom/etc/vpn
555 cp rc/vpn/* $(TARGETDIR)/rom/etc/vpn
556 chmod +x $(TARGETDIR)/rom/etc/vpn/*
557 endif
559 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
560 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
561 @echo ---
563 @rm -f $(TARGETDIR)/lib/modules/*/build
565 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
566 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -no-duplicates | tee target.info
568 # Package kernel and filesystem
569 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
570 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
571 # $(MAKE) -C $(LINUXDIR) zImage ; \
572 # else \
573 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
574 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
575 # fi
577 # Pad self-booting Linux to a 64 KB boundary
578 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
579 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
580 # Append filesystem to self-booting Linux
581 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
584 libc: $(LIBDIR)/ld-uClibc.so.0
585 # $(MAKE) -C ../../../tools-src/uClibc all
586 # $(MAKE) -C ../../../tools-src/uClibc install
590 # cleaners
593 clean: clean-build $(obj-clean)
594 rm -rf layer7/squished
595 rm -f .ipv6-y .ipv6-n
596 rm -f .fullssl-y .fullssl-n
597 make -C config clean
599 clean-build: dummy
600 rm -rf $(TARGETDIR)
601 rm -rf $(INSTALLDIR)
602 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
603 rm -rf $(PLATFORMDIR)/extras
605 distclean: clean
606 ifneq ($(INSIDE_MAK),1)
607 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
608 endif
609 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
612 # configuration
615 CONFIG_IN := config/config.in
617 config/conf config/mconf:
618 @$(MAKE) -C config
620 rconf: config/conf
621 @config/conf $(CONFIG_IN)
623 rmconf: config/mconf
624 @config/mconf $(CONFIG_IN)
626 roldconf: config/conf
627 @config/conf -o $(CONFIG_IN)
628 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean
630 kconf:
631 @$(MAKE) -C $(LINUXDIR) config
633 kmconf:
634 @$(MAKE) -C $(LINUXDIR) menuconfig
636 koldconf:
637 @$(MAKE) -C $(LINUXDIR) oldconfig
638 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
640 bboldconf:
641 @$(MAKE) -C busybox oldconfig
643 config conf: rconf kconf
645 menuconfig mconf: rmconf kmconf
647 .ipv6-y .ipv6-n:
648 @rm -f .ipv6-y .ipv6-n
649 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
650 @touch $@
652 .fullssl-y .fullssl-n:
653 @rm -f .fullssl-y .fullssl-n
654 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
655 @touch $@
657 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
659 oldconfig oldconf: koldconf roldconf dependconf bboldconf
663 # overrides and extra dependencies
666 busybox: dummy
667 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" $(PARALLEL_BUILD)
669 busybox-install:
670 rm -rf $(INSTALLDIR)/busybox
671 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
673 busybox-clean:
674 -@$(MAKE) -C busybox distclean
676 busybox-config:
677 $(MAKE) -C busybox menuconfig
680 httpd: shared nvram mssl
681 @$(SEP)
682 @$(MAKE) -C httpd
684 www-install:
685 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
687 matrixssl:
688 @$(SEP)
689 @$(MAKE) -C matrixssl/src
691 matrixssl-install:
692 @true
694 matrixssl-clean:
695 -@$(MAKE) -C matrixssl/src clean
697 cyassl/stamp-h1:
698 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
699 CFLAGS="-Os -Wall -fPIC $(EXTRACFLAGS) -ffunction-sections -fdata-sections \
700 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
701 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
702 PTHREAD_LIBS="-lpthread" \
703 $(CONFIGURE)
704 @touch cyassl/stamp-h1
706 cyassl: cyassl/stamp-h1
707 @$(SEP)
708 @$(MAKE) -C cyassl
710 cyassl-clean:
711 -@$(MAKE) -C cyassl clean
712 @rm -f cyassl/stamp-h1
714 cyassl-install:
715 @true
717 ifeq ($(FULL_OPENSSL),y)
718 OPENSSL_CIPHERS:=enable-rc5
719 else
720 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-engine no-aes192 no-cast
721 endif
723 openssl/stamp-h1:
724 cd openssl && \
725 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
726 -ffunction-sections -fdata-sections -Wl,--gc-sections \
727 shared $(OPENSSL_CIPHERS) \
728 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
729 no-seed no-capieng no-cms no-gms no-gmp no-rfc3779 \
730 no-ec no-ecdh no-ecdsa no-err no-hw no-jpake no-threads \
731 no-zlib no-engines no-sse2 \
732 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
734 @$(MAKE) -C openssl clean
735 @touch openssl/stamp-h1
737 openssl: openssl/stamp-h1
739 openssl-clean:
740 -@$(MAKE) -C openssl clean
741 @rm -f openssl/stamp-h1
743 openssl-install: openssl
744 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
745 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
746 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
748 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
749 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
750 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
752 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
754 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
755 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
757 ifeq ($(FULL_OPENSSL),y)
758 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
759 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
760 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
761 endif
763 mssl: $(if $(FULL_OPENSSL),openssl,cyassl)
765 mdu: shared mssl
767 rc: nvram shared
769 bridge/Makefile:
770 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
771 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
773 bridge: bridge/Makefile
774 @$(SEP)
775 @$(MAKE) -C bridge
777 bridge-clean:
778 -@$(MAKE) -C bridge clean
779 @rm -f bridge/Makefile
781 bridge-install:
782 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
783 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
785 dnsmasq: $(if $(TCONFIG_DNSSEC),nettle,)
786 @$(SEP)
787 @$(MAKE) -C dnsmasq $(PARALLEL_BUILD) \
788 COPTS="$(if $(TCONFIG_DNSSEC),-I$(TOP)/nettle/include -I$(TOP)/gmp -DHAVE_DNSSEC -DHAVE_DNSSEC_STATIC,) \
789 $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6) \
790 $(if $(CONFIG_LINUX26),-DUSE_IPSET,-DNO_IPSET) \
791 -DHAVE_BROKEN_RTC -DHAVE_TOMATO $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
792 LDFLAGS="$(if $(TCONFIG_DNSSEC),-L$(TOP)/nettle/lib -L$(TOP)/gmp/.libs,) -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
793 $(if $(TCONFIG_DNSSEC),PKG_CONFIG_PATH="$(TOP)/nettle/lib/pkgconfig",)
795 dnsmasq-install:
796 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
797 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
799 nettle/stamp-h1: gmp
800 @cd nettle && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
801 CPPFLAGS="-I$(TOP)/gmp" \
802 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
803 LDFLAGS="-L$(TOP)/gmp/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
804 $(CONFIGURE) prefix=$(TOP)/nettle
805 @touch nettle/stamp-h1
807 nettle: nettle/stamp-h1
808 @$(SEP)
809 @$(MAKE) -C nettle
810 @$(MAKE) -C nettle install
812 nettle-clean:
813 -@$(MAKE) -C nettle clean
814 @rm -f nettle/stamp-h1
815 @rm -rf nettle/include nettle/lib nettle/bin nettle/share
817 gmp/stamp-h1:
818 @cd gmp && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
819 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
820 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
821 $(CONFIGURE)
822 @touch gmp/stamp-h1
824 gmp: gmp/stamp-h1
825 @$(SEP)
826 @$(MAKE) -C gmp
828 gmp-clean:
829 @$(MAKE) -C gmp clean
830 @rm -f gmp/stamp-h1
832 iptables:
833 ifeq ($(CONFIG_LINUX26),y)
834 cp -f iptables/extensions/libipt_ipp2p_K26.c iptables/extensions/libipt_ipp2p.c
835 else
836 cp -f iptables/extensions/libipt_ipp2p_K24.c iptables/extensions/libipt_ipp2p.c
837 endif
838 @$(SEP)
839 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE"
841 iptables-install:
842 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
843 cd $(INSTALLDIR)/iptables/usr/sbin && \
844 ln -sf iptables iptables-restore && \
845 ln -sf iptables iptables-save
847 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
848 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
850 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
852 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
853 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
854 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
856 ifeq ($(TCONFIG_IPV6),y)
857 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
858 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
859 cd $(INSTALLDIR)/iptables/usr/sbin && \
860 ln -sf ip6tables ip6tables-restore && \
861 ln -sf ip6tables ip6tables-save
862 endif
864 iptables-clean:
865 -@$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
867 ppp:
868 @$(SEP)
869 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,) $(PARALLEL_BUILD)
870 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
872 ppp-%:
873 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
875 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
876 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
877 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
878 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
879 @touch rp-pppoe/src/stamp-h1
881 rp-pppoe: pppd rp-pppoe/src/stamp-h1
882 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so $(PARALLEL_BUILD)
884 rp-pppoe-clean:
885 -@$(MAKE) -C rp-pppoe/src clean
886 @rm -f rp-pppoe/src/pppoe-relay
887 @rm -f rp-pppoe/src/stamp-h1
889 rp-pppoe-install: rp-pppoe
890 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
891 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
892 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
893 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
896 upnp: nvram shared iptables
898 libnfnetlink/stamp-h1:
899 cd $(TOP)/libnfnetlink && CC=$(CC) STRIP='mipsel-uclibc-strip' \
900 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
901 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
902 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
903 touch libnfnetlink/stamp-h1
905 libnfnetlink: libnfnetlink/stamp-h1
906 @$(SEP)
907 $(MAKE) -C libnfnetlink
909 libnfnetlink-install:
910 install -D libnfnetlink/src/.libs/libnfnetlink.so.0.2.0 $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
911 $(STRIP) -s $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
912 cd $(INSTALLDIR)/libnfnetlink/usr/lib/ && \
913 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so.0 && \
914 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so
916 miniupnpd-config:
917 #ifeq ($(TCONFIG_IPV6),y)
918 # @cd miniupnpd && ./genconfig.sh --leasefile --ipv6
919 #else
920 @cd miniupnpd && ./genconfig.sh --leasefile
921 #endif
923 miniupnpd: iptables miniupnpd-config
924 @$(SEP)
925 $(MAKE) -C miniupnpd miniupnpd -f Makefile.linux CC=$(CC) \
926 CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/iptables/include" \
927 LDFLAGS="-L$(TOP)/iptables -liptc" LIBS="" $(PARALLEL_BUILD)
929 miniupnpd-clean:
930 -@$(MAKE) -C miniupnpd -f Makefile.linux clean
931 @rm -f miniupnpd/config.h
933 miniupnpd-install:
934 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
935 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
937 # !!TB
938 shared: busybox
940 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
941 @$(SEP)
942 $(MAKE) -C vsftpd $(PARALLEL_BUILD)
944 vsftpd-install: vsftpd
945 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
946 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
948 ntfs-3g/Makefile:
949 cd ntfs-3g && \
950 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
951 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
952 $(CONFIGURE) --enable-shared=no --enable-static=no \
953 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
954 --disable-ntfsprogs --disable-crypto --without-uuid \
955 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
957 ntfs-3g: ntfs-3g/Makefile
958 @$(MAKE) -C ntfs-3g $(PARALLEL_BUILD)
960 ntfs-3g-clean:
961 -@$(MAKE) -C ntfs-3g clean
962 @rm -f ntfs-3g/Makefile
964 ntfs-3g-install: ntfs-3g
965 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
966 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
967 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
968 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
969 ln -sf ../bin/ntfs-3g mount.ntfs
971 libusb10/Makefile: libusb10/Makefile.in
972 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
973 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
975 libusb10: libusb10/Makefile
976 $(MAKE) -C $@
978 libusb10-install: libusb10
979 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
980 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
982 libusb10-clean:
983 -@$(MAKE) -C $@ clean
984 @rm -rf libusb10/Makefile
986 libusb/Makefile: libusb/Makefile.in
987 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
988 $(CONFIGURE) --prefix=/usr \
989 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
990 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
991 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
993 libusb: libusb10 libusb/Makefile
994 $(MAKE) -C $@
996 libusb-install: libusb
997 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
998 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
1000 libusb-clean:
1001 -@$(MAKE) -C $@ clean
1002 @rm -rf libusb/Makefile
1004 usbmodeswitch: libusb10
1005 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
1006 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
1007 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
1009 usbmodeswitchdb-install:
1010 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
1011 # compress whitespace
1012 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
1013 F=`basename $$D`; \
1014 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
1015 done
1017 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
1018 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
1019 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
1020 @mkdir -p $(TARGETDIR)/rom/etc
1021 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
1023 #libdaemon: libdaemon/Makefile
1024 #$(MAKE) -C $@
1026 #libdaemon/Makefile: libdaemon/Makefile.in
1027 # cd libdaemon && $(CONFIGURE) ac_cv_func_setpgrp_void=yes \
1028 # --disable-dependency-tracking
1030 #libdaemon-install: libdaemon
1031 # install -D libdaemon/libdaemon/.libs/libdaemon.so.0.5.0 $(INSTALLDIR)/libdaemon/usr/lib/libdaemon.so.0.5.0
1032 # $(STRIP) $(INSTALLDIR)/libdaemon/usr/lib/*.so.*
1033 # cd $(INSTALLDIR)/libdaemon/usr/lib && \
1034 # ln -sf libdaemon.so.0.5.0 libdaemon.so && \
1035 # ln -sf libdaemon.so.0.5.0 libdaemon.so.0
1037 #libdaemon-clean:
1038 # -@$(MAKE) -C libdaemon distclean
1040 #radvd/stamp-h1:
1041 # cd radvd && CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1042 # LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1043 # $(CONFIGURE) --prefix="" --disable-dependency-tracking \
1044 # DAEMON_CFLAGS="-I$(TOP)/libdaemon" \
1045 # DAEMON_LIBS="-ldaemon -L$(TOP)/libdaemon/libdaemon/.libs"
1046 # @$(MAKE) -C radvd clean
1047 # @touch radvd/stamp-h1
1049 #radvd: libdaemon radvd/stamp-h1
1051 #radvd-clean:
1052 # -@$(MAKE) -C radvd distclean
1053 # @rm -f radvd/stamp-h1
1055 #radvd-install: radvd
1056 # install -D radvd/radvd $(INSTALLDIR)/radvd/usr/sbin/radvd
1057 # $(STRIP) $(INSTALLDIR)/radvd/usr/sbin/radvd
1059 dhcpv6/stamp-h1:
1060 @cd dhcpv6 && \
1061 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
1062 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1063 ac_cv_func_setpgrp_void=yes \
1064 $(CONFIGURE) --prefix= --with-localdbdir=/var
1065 @$(MAKE) -C dhcpv6 clean
1066 @touch dhcpv6/stamp-h1
1068 dhcpv6: dhcpv6/stamp-h1
1069 @$(SEP)
1070 @$(MAKE) -C dhcpv6 dhcp6c
1072 dhcpv6-install: dhcpv6
1073 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
1074 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
1076 dhcpv6-clean:
1077 -@$(MAKE) -C dhcpv6 clean
1078 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
1081 p910nd:
1082 samba:
1083 samba3:
1085 nvram: shared
1087 prebuilt: shared
1089 vlan:
1090 @$(SEP)
1091 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
1093 vlan-install:
1094 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
1095 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
1098 pptp-client-install:
1099 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1100 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1103 accel-pptp: pppd accel-pptp/Makefile
1104 @$(MAKE) -C accel-pptp
1106 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
1107 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
1108 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
1110 accel-pptp-clean:
1111 -@$(MAKE) -C accel-pptp clean
1112 @rm -f accel-pptp/Makefile
1114 accel-pptp-install: accel-pptp
1115 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
1116 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
1118 pptpd/stamp-h1:
1119 cd pptpd && $(CONFIGURE) --prefix=$(INSTALLDIR)/pptpd --enable-bcrelay CC=mipsel-uclibc-gcc \
1120 STRIP=mipsel-uclibc-strip AR=mipsel-uclibc-ar LD=mipsel-uclibc-ld NM=mipsel-uclibc-nm RANLIB=mipsel-uclibc-ranlib
1121 touch pptpd/stamp-h1
1123 pptpd: pptpd/stamp-h1
1125 pptpd-install: pptpd
1126 @echo pptpd
1127 @install -D pptpd/pptpd $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1128 @install -D pptpd/bcrelay $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1129 @install -D pptpd/pptpctrl $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1130 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1131 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1132 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1134 pptpd-clean:
1135 -@$(MAKE) -C pptpd clean
1136 rm -rf pptpd/stamp-h1 pptpd/.deps
1138 pppd/Makefile: pppd/linux/Makefile.top
1139 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
1141 pppd: pppd/Makefile
1142 @$(SEP)
1143 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
1145 pppd-clean:
1146 -@$(MAKE) -C pppd clean
1147 @rm -f pppd/Makefile
1149 pppd-install: pppd
1150 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
1151 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
1152 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
1153 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
1154 ifeq ($(TCONFIG_L2TP),y)
1155 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
1156 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
1157 endif
1159 # ipupdate-install:
1160 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1161 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1163 zebra/stamp-h1:
1164 @cd zebra && rm -f config.cache && \
1165 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1166 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1167 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1168 $(CONFIGURE) --sysconfdir=/etc \
1169 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
1170 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
1171 @touch zebra/stamp-h1
1173 zebra: zebra/stamp-h1
1174 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
1176 zebra-clean:
1177 -@$(MAKE) -C zebra clean
1178 @rm -f zebra/stamp-h1
1180 zebra-install: zebra
1181 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
1182 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
1183 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1184 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
1185 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
1186 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1189 rp-l2tp-install:
1190 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1191 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1192 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
1193 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1194 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1195 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1196 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1198 xl2tpd: pppd
1199 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
1201 xl2tpd-install: xl2tpd
1202 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1203 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1206 bpalogin-install:
1207 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1208 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1211 # libnet:
1212 # @$(SEP)
1213 # @-mkdir -p libnet/lib
1214 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1216 # libpcap:
1217 # @$(SEP)
1218 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1220 libbcm:
1221 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
1223 libbcm-install:
1224 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1225 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1228 iproute2:
1229 @$(SEP)
1230 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1232 iproute2-install: iproute2
1233 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1234 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1235 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1236 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1239 ntpc: nvram shared
1242 dropbear: dropbear/config.h
1243 @$(SEP)
1244 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1 $(PARALLEL_BUILD)
1246 dropbear-install:
1247 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1248 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1249 cd $(INSTALLDIR)/dropbear/usr/bin && \
1250 ln -sf dropbearmulti dropbear && \
1251 ln -sf dropbearmulti dropbearconvert && \
1252 ln -sf dropbearmulti dropbearkey && \
1253 ln -sf dropbearmulti dbclient && \
1254 ln -sf dropbearmulti ssh && \
1255 ln -sf dropbearmulti scp
1257 dropbear-clean:
1258 -@$(MAKE) -C dropbear clean
1259 @rm -f dropbear/config.h
1261 dropbear/config.h:
1262 cd dropbear && \
1263 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1264 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1265 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1266 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1267 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1268 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty --enable-bundled-libtom
1269 @$(MAKE) -C dropbear clean
1271 # Media libraries
1273 sqlite/stamp-h1:
1274 cd sqlite && \
1275 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1276 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1277 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1278 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1279 touch sqlite/stamp-h1
1281 sqlite: sqlite/stamp-h1
1282 @$(MAKE) -C sqlite all $(PARALLEL_BUILD)
1284 sqlite-clean:
1285 -@$(MAKE) -C sqlite clean
1286 @rm -f sqlite/stamp-h1
1288 sqlite-install: sqlite
1289 @$(SEP)
1290 ifneq ($(MEDIA_SERVER_STATIC),y)
1291 install -D sqlite/.libs/libsqlite3.so.0 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1292 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1293 cd $(INSTALLDIR)/sqlite/usr/lib/ && \
1294 ln -sf libsqlite3.so.0 libsqlite3.so
1295 endif
1297 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1299 FFMPEG_DECODERS:=aac ac3 atrac3 flac h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1300 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1302 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1303 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1305 FFMPEG_PROTOCOLS:=file
1306 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1308 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
1309 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1311 ffmpeg/stamp-h1: zlib
1312 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1313 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1314 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1315 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1316 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1317 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1318 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1319 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1320 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1321 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1322 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1323 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1324 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1325 --extra-libs="-L$(TOP)/zlib -lz" \
1326 --enable-zlib --disable-debug --prefix=''
1327 touch ffmpeg/stamp-h1
1329 ffmpeg: ffmpeg/stamp-h1 zlib
1330 @$(MAKE) -C ffmpeg all $(PARALLEL_BUILD)
1332 ffmpeg-clean:
1333 -@$(MAKE) -C ffmpeg clean
1334 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1336 ffmpeg-install: ffmpeg
1337 @$(SEP)
1338 ifneq ($(MEDIA_SERVER_STATIC),y)
1339 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1340 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1341 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1342 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1343 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1344 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1345 endif
1347 libogg/stamp-h1:
1348 cd libogg && \
1349 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1350 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1351 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1352 touch libogg/stamp-h1
1354 libogg: libogg/stamp-h1
1355 @$(MAKE) -C libogg all $(PARALLEL_BUILD)
1357 libogg-clean:
1358 -@$(MAKE) -C libogg clean
1359 @rm -f libogg/stamp-h1
1361 libogg-install: libogg
1362 @$(SEP)
1363 ifneq ($(MEDIA_SERVER_STATIC),y)
1364 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1365 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1366 endif
1368 flac/stamp-h1: libogg
1369 cd flac && \
1370 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1371 CPPFLAGS="-I$(TOP)/libogg/include" \
1372 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1373 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1374 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1375 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1376 touch flac/stamp-h1
1378 flac: flac/stamp-h1 libogg
1379 @$(MAKE) -C flac/src/libFLAC all $(PARALLEL_BUILD)
1381 flac-clean:
1382 -@$(MAKE) -C flac clean
1383 @rm -f flac/stamp-h1
1385 flac-install: flac
1386 @$(SEP)
1387 ifneq ($(MEDIA_SERVER_STATIC),y)
1388 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1389 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1390 endif
1392 jpeg/stamp-h1:
1393 cd jpeg && \
1394 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1395 touch jpeg/stamp-h1
1397 jpeg: jpeg/stamp-h1
1398 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so $(PARALLEL_BUILD)
1400 jpeg-clean:
1401 -@$(MAKE) -C jpeg clean
1402 @rm -f jpeg/stamp-h1 jpeg/Makefile
1404 jpeg-install: jpeg
1405 @$(SEP)
1406 ifneq ($(MEDIA_SERVER_STATIC),y)
1407 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1408 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1409 endif
1411 libexif/stamp-h1:
1412 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1413 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1414 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1415 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1416 touch libexif/stamp-h1
1418 libexif: libexif/stamp-h1
1419 @$(MAKE) -C libexif all
1421 libexif-clean:
1422 -@$(MAKE) -C libexif clean
1423 @rm -f libexif/stamp-h1
1425 libexif-install: libexif
1426 @$(SEP)
1427 ifneq ($(MEDIA_SERVER_STATIC),y)
1428 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1429 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1430 endif
1432 zlib/stamp-h1:
1433 cd zlib && \
1434 ./configure --shared --prefix=''
1435 touch zlib/stamp-h1
1437 zlib: zlib/stamp-h1
1438 @$(MAKE) -C zlib all
1439 @$(MAKE) -C zlib DESTDIR=$(TOP)/zlib/staged install
1441 zlib-clean:
1442 -@$(MAKE) -C zlib clean
1443 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1444 @rm -rf zlib/staged
1446 zlib-install: zlib
1447 @$(SEP)
1448 ifneq ($(MEDIA_SERVER_STATIC),y)
1449 install -d $(INSTALLDIR)/zlib/usr/lib
1450 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1451 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1452 endif
1453 ifeq ($(TCONFIG_BT),y)
1454 install -d $(INSTALLDIR)/zlib/usr/lib
1455 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1456 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1457 endif
1458 ifeq ($(TCONFIG_TOR),y)
1459 install -d $(INSTALLDIR)/zlib/usr/lib
1460 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1461 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1462 endif
1464 libid3tag/stamp-h1: zlib
1465 cd libid3tag && \
1466 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1467 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1468 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1469 --disable-debugging --disable-profiling
1470 touch libid3tag/stamp-h1
1472 libid3tag: libid3tag/stamp-h1 zlib
1473 @$(MAKE) -C libid3tag all $(PARALLEL_BUILD)
1475 libid3tag-clean:
1476 -@$(MAKE) -C libid3tag clean
1477 @rm -f libid3tag/stamp-h1
1479 libid3tag-install: libid3tag
1480 @$(SEP)
1481 ifneq ($(MEDIA_SERVER_STATIC),y)
1482 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1483 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1484 endif
1486 libvorbis/stamp-h1: libogg
1487 cd libvorbis && \
1488 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1489 CPPFLAGS="-I$(TOP)/libogg/include" \
1490 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1491 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1492 --with-ogg-includes="$(TOP)/libogg/include" \
1493 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1494 touch libvorbis/stamp-h1
1496 libvorbis: libvorbis/stamp-h1
1497 @$(MAKE) -C libvorbis/lib all $(PARALLEL_BUILD)
1499 libvorbis-clean:
1500 -@$(MAKE) -C libvorbis clean
1501 @rm -f libvorbis/stamp-h1
1503 libvorbis-install: libvorbis
1504 @$(SEP)
1505 ifneq ($(MEDIA_SERVER_STATIC),y)
1506 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1507 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1508 endif
1510 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1511 @$(SEP)
1512 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna $(PARALLEL_BUILD)
1514 minidlna-clean:
1515 -@$(MAKE) -C minidlna clean
1516 @rm -f minidlna/stamp-h1
1518 minidlna-install: minidlan
1519 @$(SEP)
1520 install -D minidlna/minidlna $(INSTALLDIR)/minidlna/usr/sbin/minidlna
1521 $(STRIP) $(INSTALLDIR)/minidlna/usr/sbin/minidlna
1523 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1524 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1525 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1526 $(CONFIGURE) --prefix=/usr
1528 igmpproxy: igmpproxy/src/Makefile
1529 @$(SEP)
1530 @$(MAKE) -C igmpproxy/src $(PARALLEL_BUILD)
1532 igmpproxy-install: igmpproxy
1533 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1534 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1536 igmpproxy-clean:
1537 -@$(MAKE) -C igmpproxy/src clean
1538 @rm -f igmpproxy/src/Makefile
1540 udev:
1541 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1542 PROGRAMS=udevtrigger
1544 udev-install: udev
1545 install -d $(INSTALLDIR)
1546 install -d $(TARGETDIR)
1547 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1549 hotplug2:
1550 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1552 hotplug2-install: hotplug2
1553 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1554 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1556 emf:
1557 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1559 emf-install: emf
1560 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1562 igs:
1563 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1565 igs-install: igs
1566 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1568 wanuptime: nvram shared
1569 @$(SEP)
1570 @$(MAKE) -C wanuptime
1572 wanuptime-clean:
1573 -@$(MAKE) -C wanuptime clean
1575 wanuptime-install:
1576 install -D wanuptime/wanuptime $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1577 $(STRIP) $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1579 ebtables: dummy
1580 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1581 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1582 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1584 ebtables-install: ebtables
1585 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1587 @mkdir -p $(TARGETDIR)/rom/etc
1588 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1589 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1591 install -d $(INSTALLDIR)/ebtables/usr/lib
1592 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1593 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1594 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1596 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1597 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1598 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1600 ebtables-clean:
1601 -@$(MAKE) -C ebtables clean
1603 #Roadkill
1604 spawn-fcgi/stamp-h1:
1605 cd spawn-fcgi && CC=$(CC) \
1606 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1607 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1608 ac_cv_func_malloc_0_nonnull=yes \
1609 $(CONFIGURE) --prefix=/usr
1610 touch spawn-fcgi/stamp-h1
1612 spawn-fcgi: spawn-fcgi/stamp-h1
1613 @$(MAKE) -C spawn-fcgi $(PARALLEL_BUILD)
1615 spawn-fcgi-clean:
1616 -@$(MAKE) -C spawn-fcgi clean
1617 rm -f spawn-fcgi/stamp-h1
1619 spawn-fcgi-install: spawn-fcgi
1620 install -d $(INSTALLDIR)/spawn-fcgi/usr/bin
1621 install spawn-fcgi/src/spawn-fcgi $(INSTALLDIR)/spawn-fcgi/usr/bin/spawn-fcgi
1622 $(STRIP) -s $(INSTALLDIR)/spawn-fcgi/usr/bin/spawn-fcgi
1624 #Roadkill
1625 glib/stamp-h1:
1626 @$(SEP)
1627 @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 \
1628 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 \
1629 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 \
1630 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 \
1631 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
1632 @$(MAKE) -C glib
1633 touch glib/stamp-h1
1635 glib: glib/stamp-h1
1636 @$(MAKE) -C glib $(PARALLEL_BUILD)
1638 glib-clean:
1639 -@$(MAKE) -C glib clean
1640 rm -f glib/stamp-h1
1642 glib-install: glib
1643 @$(MAKE) -C glib DESTDIR=$(INSTALLDIR)/glib install
1645 nocat/stamp-h1: glib-install
1646 @$(SEP)
1647 @cd nocat && \
1648 NC_CONF_PATH="/" \
1649 $(CONFIGURE) --with-firewall=iptables --with-glib-prefix="$(INSTALLDIR)/glib/usr" --localstatedir=/var --sysconfdir=/etc
1650 @$(MAKE) -C nocat
1652 echo *** integrate glib to nocat installdir
1653 install -d $(INSTALLDIR)/nocat/usr/lib
1654 install -D glib/.libs/libglib-1.2.so.0.0.10 $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1655 cd $(INSTALLDIR)/nocat/usr/lib && ln -s libglib-1.2.so.0.0.10 libglib-1.2.so.0
1656 $(STRIP) $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1657 touch nocat/stamp-h1
1659 nocat: nocat/stamp-h1
1660 @$(MAKE) -C nocat $(PARALLEL_BUILD)
1662 nocat-clean:
1663 -@$(MAKE) -C nocat clean
1664 rm -f nocat/stamp-h1
1666 nocat-install:
1667 install -D nocat/src/splashd $(INSTALLDIR)/nocat/usr/sbin/splashd
1668 $(STRIP) $(INSTALLDIR)/nocat/usr/sbin/splashd
1669 mkdir -p $(INSTALLDIR)/nocat/usr/libexec/nocat
1670 install -D nocat/libexec/iptables/* $(INSTALLDIR)/nocat/usr/libexec/nocat
1672 #Tomato RAF
1673 pcre/stamp-h1:
1674 $(SEP)
1675 cd pcre && \
1676 CC=$(CC) CXX=$(HOST)-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1677 $(CONFIGURE) --prefix=/usr --disable-dependency-tracking --enable-utf8 --enable-unicode-properties --disable-cpp
1678 @touch pcre/stamp-h1
1679 [ -d pcre/m4 ] || mkdir pcre/m4
1681 pcre: pcre/stamp-h1
1683 pcre-install: pcre
1684 @$(SEP)
1685 install -D pcre/.libs/libpcre.so.1 $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1.2.3
1686 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1.2.3
1687 install -D pcre/.libs/libpcreposix.so.0.0.2 $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.2
1688 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.2
1689 cd $(INSTALLDIR)/pcre/usr/lib/ && \
1690 ln -sf libpcre.so.1.2.3 libpcre.so.1 && \
1691 ln -sf libpcreposix.so.0.0.2 libpcreposix.so.0
1693 pcre-clean:
1694 ( if [ -f pcre/Makefile ]; then \
1695 $(MAKE) -C pcre clean; \
1696 rm -rf pcre/stamp-h1; \
1697 fi )
1699 php/stamp-h1: pcre zlib
1700 @$(SEP)
1701 cd php && CC=$(CC) CXX=$(ARCH)-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1702 CFLAGS="-Os -Wall -I $(TOP)/zlib -I $(TOP)/pcre -L $(TOP)/pcre/.libs/libpcre.so.1.2.3 -L $(TOP)/pcre/.libs/libpcreposix.so.0.0.2 $(EXTRACFLAGS)" \
1703 $(CONFIGURE) --prefix=/usr \
1704 --enable-shared \
1705 --disable-static \
1706 --disable-rpath \
1707 --disable-debug \
1708 --without-pear \
1709 --with-config-file-path=/etc \
1710 --with-config-file-scan-dir=/etc/php5 \
1711 --disable-short-tags \
1712 --with-zlib="$(TOP)/zlib/staged" \
1713 --with-zlib-dir="$(TOP)/zlib/staged" \
1714 --disable-phar \
1715 --enable-cli \
1716 --enable-cgi \
1717 --disable-calendar \
1718 --disable-ctype \
1719 --without-curl \
1720 --disable-fileinfo \
1721 --without-gettext \
1722 --disable-dom \
1723 --disable-exif \
1724 --disable-ftp \
1725 --without-gmp \
1726 --disable-hash \
1727 --without-iconv \
1728 --enable-json \
1729 --without-ldap \
1730 --disable-mbstring \
1731 --without-mcrypt \
1732 --without-mysqli \
1733 --without-openssl \
1734 --disable-pcntl \
1735 --without-pdo-mysql \
1736 --without-pdo-pgsql \
1737 --without-pdo-sqlite \
1738 --disable-pdo \
1739 --without-pgsql \
1740 --enable-session \
1741 --disable-shmop \
1742 --disable-simplexml \
1743 --disable-soap \
1744 --disable-sockets \
1745 --without-sqlite \
1746 --without-sqlite3 \
1747 --disable-sysvmsg \
1748 --disable-sysvsem \
1749 --disable-sysvshm \
1750 --disable-tokenizer \
1751 --disable-xml \
1752 --disable-xmlreader \
1753 --disable-xmlwriter \
1754 --enable-zip \
1755 --disable-filter \
1756 --disable-libxml \
1757 ac_cv_c_bigendian_php="no" \
1758 php_cv_cc_rpath="no" \
1759 iconv_impl_name="gnu_libiconv"
1760 @touch php/stamp-h1
1762 php: php/stamp-h1
1763 @$(SEP)
1764 @$(MAKE) -C php
1766 php-clean:
1767 -@$(MAKE) -C php clean
1768 -@rm php/stamp-h1
1770 php-install: php
1771 @$(SEP)
1772 install -d $(INSTALLDIR)/php/usr/sbin
1773 install -D php/sapi/cli/php $(INSTALLDIR)/php/usr/sbin/php-cli && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cli
1774 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cli
1775 install -D php/sapi/cgi/php-cgi $(INSTALLDIR)/php/usr/sbin/php-cgi && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cgi
1776 cd $(INSTALLDIR)/php/usr/sbin && ln -sf php-cgi php-fcgi
1777 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cgi
1779 nginx/stamp-h1: openssl zlib pcre
1780 @$(SEP)
1781 cd $(TOP)/nginx && ./configure --crossbuild=Linux::$(ARCH) \
1782 --prefix=/usr \
1783 --sbin-path=/usr/sbin \
1784 --conf-path=/etc/nginx/nginx.conf \
1785 --error-log-path=/tmp/var/log/nginx/error.log \
1786 --http-log-path=/tmp/var/log/nginx/access.log \
1787 --pid-path=/tmp/var/run/nginx.pid \
1788 --lock-path=/tmp/var/run/nginx.lock.accept \
1789 --http-client-body-temp-path=/tmp/var/lib/nginx/client \
1790 --http-fastcgi-temp-path=/tmp/var/lib/nginx/fastcgi \
1791 --with-http_flv_module \
1792 --with-http_ssl_module \
1793 --with-http_gzip_static_module \
1794 --http-uwsgi-temp-path=/tmp/var/lib/nginx/uwsgi \
1795 --http-scgi-temp-path=/tmp/var/lib/nginx/scgi \
1796 --http-proxy-temp-path=/tmp/var/lib/nginx/proxy \
1797 --with-cc="$(CC)" \
1798 --with-ld-opt="$(LDFLAGS) -L $(TOP)/pcre/.libs -L $(TOP)/zlib -L $(TOP)/openssl" \
1799 --with-cc-opt="$(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) -I $(TOP)/openssl/include -I $(TOP)/openssl/include/openssl -I $(TOP)/pcre -I $(TOP)/zlib" \
1800 $(ADDITIONAL_MODULES)
1802 nginx: nginx/stamp-h1
1803 @$(SEP)
1804 @$(MAKE) -C nginx
1806 nginx-clean:
1807 -@$(MAKE) -C nginx clean
1808 -@rm -f nginx/stamp-h1
1810 nginx-install: nginx
1811 install -d $(INSTALLDIR)/nginx/usr/sbin
1812 install -D nginx/objs/nginx $(INSTALLDIR)/nginx/usr/sbin/nginx && chmod 755 $(INSTALLDIR)/nginx/usr/sbin/nginx
1813 $(STRIP) $(INSTALLDIR)/nginx/usr/sbin/nginx
1815 lzo/stamp-h1:
1816 cd lzo && \
1817 CFLAGS="-O3 -Wall -fPIC $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
1818 touch lzo/stamp-h1
1820 lzo: lzo/stamp-h1
1821 @$(MAKE) -C lzo $(PARALLEL_BUILD)
1823 lzo-clean:
1824 -@$(MAKE) -C lzo clean
1825 @rm -f lzo/stamp-h1
1827 lzo-install: lzo
1828 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1829 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1830 cd $(INSTALLDIR)/lzo/usr/lib && ln -sf liblzo2.so.2 liblzo2.so
1832 openvpn/.conf: openssl lzo
1833 cd openvpn && CFLAGS="-O3 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1834 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1835 CPPFLAGS="-I$(TOP)/lzo/include -I$(TOP)/openssl/include" \
1836 $(CONFIGURE) --prefix= \
1837 --with-crypto-library=openssl \
1838 --disable-debug --disable-plugin-auth-pam --disable-plugin-down-root --with-plugindir=/lib --enable-management --enable-small \
1839 --disable-selinux --disable-socks --enable-password-save \
1840 OPENSSL_SSL_CFLAGS="-I$(TOP)/openssl/include" \
1841 OPENSSL_SSL_LIBS="-L$(TOP)/openssl -lssl" \
1842 ac_cv_lib_resolv_gethostbyname=no
1843 touch openvpn/.conf
1845 openvpn: openvpn/.conf
1846 @$(MAKE) -C openvpn $(PARALLEL_BUILD)
1848 openvpn-clean:
1849 -@$(MAKE) -C openvpn clean
1850 @rm -f openvpn/.conf
1852 openvpn-install: openvpn
1853 install -D openvpn/src/openvpn/.libs/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1854 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1855 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1857 openvpn_plugin_auth_nvram:nvram
1859 #shibby
1860 libcurl/stamp-h1: zlib openssl
1861 cd libcurl && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1862 CPPFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections -I$(TOP)/zlib" \
1863 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1864 $(CONFIGURE) --prefix=/usr --disable-thread --enable-shared --enable-static \
1865 --enable-ares --enable-cookies --enable-crypto-auth --enable-nonblocking \
1866 --enable-file --enable-ftp --enable-http --enable-ipv6 --enable-tftp \
1867 --disable-nls --disable-ares --disable-dict --disable-debug --disable-gopher \
1868 --disable-ldap --disable-manual --disable-telnet --disable-verbose \
1869 --with-random="/dev/urandom" --with-ssl="$(TOP)/openssl" \
1870 --without-gnutls --without-krb4 --without-libidn \
1871 --with-linux-headers=$(LINUXDIR)/include \
1872 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
1873 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
1874 touch libcurl/stamp-h1
1876 libcurl: libcurl/stamp-h1
1877 @$(MAKE) -C libcurl $(PARALLEL_BUILD)
1879 libcurl-clean:
1880 -@$(MAKE) -C libcurl clean
1881 @rm -f libcurl/stamp-h1 libcurl/Makefile
1883 libcurl-install: libcurl
1884 install -d $(INSTALLDIR)/libcurl/usr/lib
1885 install -D libcurl/lib/.libs/libcurl.so.4.3.0 $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.3.0
1886 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.3.0
1887 cd $(INSTALLDIR)/libcurl/usr/lib/ && \
1888 ln -sf libcurl.so.4.3.0 libcurl.so.4 && \
1889 ln -sf libcurl.so.4.3.0 libcurl.so
1891 libevent/stamp-h1:
1892 cd libevent && CC=$(CC) \
1893 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1894 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1895 $(CONFIGURE)
1896 touch libevent/stamp-h1
1898 libevent: libevent/stamp-h1
1899 @$(SEP)
1900 $(MAKE) -C libevent $(PARALLEL_BUILD)
1901 $(MAKE) -C libevent DESTDIR=$(TOP)/libevent/staged install
1903 libevent-clean:
1904 -@$(MAKE) -C libevent clean
1905 @rm -f libevent/stamp-h1 libevent/Makefile
1906 @rm -rf libevent/staged
1908 libevent-install: libevent
1909 install -d $(INSTALLDIR)/libevent/usr/lib
1910 install libevent/.libs/libevent-2.0.so.5.1.9 $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
1911 $(STRIP) -s $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
1913 libiconv/stamp-h1:
1914 cd libiconv && CC=$(CC) \
1915 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1916 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1917 $(CONFIGURE) --prefix=/usr --disable-nls --enable-static --enable-shared
1918 touch libiconv/stamp-h1
1920 libiconv: libiconv/stamp-h1
1921 @$(SEP)
1922 $(MAKE) -C libiconv $(PARALLEL_BUILD)
1924 libiconv-clean:
1925 -@$(MAKE) -C libiconv clean
1926 @rm -rf libiconv/stamp-h1 libiconv/Makefile
1928 libiconv-install: libiconv
1929 install -d $(INSTALLDIR)/libiconv/usr/lib
1930 install libiconv/lib/.libs/libiconv.so.2.4.0 $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2.4.0
1931 $(STRIP)-s $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2.4.0
1932 cd $(INSTALLDIR)/libiconv/usr/lib/ && \
1933 ln -sf libiconv.so.2.4.0 libiconv.so.2 && \
1934 ln -sf libiconv.so.2.4.0 libiconv.so
1936 transmission/stamp-h1: openssl libcurl libevent zlib
1937 cd transmission && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1938 autoreconf && \
1939 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
1940 --param large-function-growth=800 --param max-inline-insns-single=3000 \
1941 -ffunction-sections -fdata-sections" \
1942 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC \
1943 -L$(TOP)/zlib -L$(TOP)/openssl -L$(TOP)/libcurl/lib/.libs -L$(TOP)/libevent/.libs" \
1944 HAVE_CXX=yes \
1945 $(CONFIGURE) --target=mipsel-linux --host=mipsel-linux --build=x86_64-linux-gnu --prefix=/usr --disable-nls \
1946 --enable-lightweight --enable-largefile --enable-utp --without-gtk \
1947 LIBCURL_CFLAGS="-I$(TOP)/libcurl/include" \
1948 LIBCURL_LDFLAGS="-L$(TOP)/libcurl/lib/.libs/" \
1949 LIBCURL_LIBS="-lcurl" \
1950 LIBEVENT_CFLAGS="-I$(TOP)/libevent/include" \
1951 LIBEVENT_LDFLAGS="-L$(TOP)/libevent/.libs" \
1952 LIBEVENT_LIBS="-levent" \
1953 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
1954 OPENSSL_LDFLAGS="-L$(TOP)/openssl" \
1955 OPENSSL_LIBS="-lcrypto -lssl" \
1956 ZLIB_CFLAGS="-I$(TOP)/zlib" \
1957 ZLIB_LDFLAGS="-L$(TOP)/zlib" \
1958 ZLIB_LIBS="-lz"
1959 touch transmission/stamp-h1
1961 transmission: transmission/stamp-h1
1962 @$(SEP)
1963 $(MAKE) -C transmission $(PARALLEL_BUILD)
1965 transmission-clean:
1966 -@$(MAKE) -C transmission clean
1967 @rm -f transmission/stamp-h1 transmission/Makefile
1969 transmission-install: transmission
1970 $(MAKE) -C transmission DESTDIR=$(INSTALLDIR)/transmission install-strip
1971 @rm -rf $(INSTALLDIR)/transmission/usr/share/man
1972 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-cli
1973 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-show
1974 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-edit
1975 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-create
1976 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-daemon
1977 ifeq ($(TCONFIG_TR_EXTRAS),y)
1978 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-remote
1979 else
1980 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-remote
1981 endif
1983 btgui:
1984 @$(SEP)
1986 btgui-install: btgui
1987 install -d $(INSTALLDIR)/btgui/usr/bin
1988 install -D transmission/btcheck $(INSTALLDIR)/btgui/usr/bin/btcheck
1990 libnfsidmap/stamp-h1:
1991 cd libnfsidmap && \
1992 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1993 ac_cv_func_malloc_0_nonnull=yes \
1994 ac_cv_func_realloc_0_nonnull=yes \
1995 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
1996 touch libnfsidmap/stamp-h1
1998 libnfsidmap: libnfsidmap/stamp-h1
1999 @$(SEP)
2000 $(MAKE) -C libnfsidmap $(PARALLEL_BUILD)
2002 libnfsidmap-clean:
2003 -@$(MAKE) -C libnfsidmap clean
2004 @rm -f libnfsidmap/stamp-h1
2005 @rm -rf libnfsidmap/staged
2007 libnfsidmap-install: libnfsidmap
2008 install -d $(TOP)/libnfsidmap/staged
2009 $(MAKE) -C libnfsidmap DESTDIR=$(TOP)/libnfsidmap/staged install
2011 portmap/stamp-h1:
2012 cd portmap \
2013 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2014 $(MAKE) -C portmap CC=$(CC) AR=$(AR) LD=$(LD) RANLIB=$(RANLIB) RPCUSER="nobody"
2015 touch portmap/stamp-h1
2017 portmap: portmap/stamp-h1
2018 @$(SEP)
2019 $(MAKE) -C portmap $(PARALLEL_BUILD)
2021 portmap-clean:
2022 -@$(MAKE) -C portmap clean
2023 @rm -f portmap/stamp-h1
2025 portmap-install: portmap
2026 install -d $(INSTALLDIR)/portmap/usr/sbin
2027 install -D portmap/portmap $(INSTALLDIR)/portmap/usr/sbin/portmap
2028 $(STRIP) -s $(INSTALLDIR)/portmap/usr/sbin/portmap
2030 e2fsprogs/stamp-h1:
2031 cd e2fsprogs && \
2032 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2033 $(CONFIGURE) --prefix=$(TOP)/e2fsprogs/staged --enable-shared --enable-static
2034 touch e2fsprogs/stamp-h1
2036 e2fsprogs: e2fsprogs/stamp-h1
2037 @$(SEP)
2038 $(MAKE) -C e2fsprogs $(PARALLEL_BUILD)
2040 e2fsprogs-clean:
2041 -@$(MAKE) -C e2fsprogs clean
2042 @rm -f e2fsprogs/stamp-h1
2043 @rm -f e2fsprogs/Makefile
2044 @rm -rf e2fsprogs/staged
2046 nfs-utils/stamp-h1: libevent-install e2fsprogs portmap libnfsidmap-install
2047 cd nfs-utils && STRIP='mipsel-uclibc-strip' \
2048 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
2049 -I$(TOP)/libevent/staged/usr/local/include -I$(TOP)/e2fsprogs/lib \
2050 -I$(TOP)/libnfsidmap/staged/usr/include -ffunction-sections -fdata-sections" \
2051 LDFLAGS="-L$(TOP)/libevent/staged/usr/local/lib -L$(TOP)/e2fsprogs/lib \
2052 -L$(TOP)/libnfsidmap/staged/usr/lib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2053 ac_cv_func_malloc_0_nonnull=yes \
2054 ac_cv_func_realloc_0_nonnull=yes \
2055 $(CONFIGURE) --disable-gss --without-tcp-wrappers --enable-static --enable-shared \
2056 --enable-nfsv4 --enable-nfsv3
2057 touch nfs-utils/stamp-h1
2059 nfs-utils: nfs-utils/stamp-h1
2060 @$(SEP)
2061 $(MAKE) -C nfs-utils $(PARALLEL_BUILD)
2063 nfs-utils-clean:
2064 -@$(MAKE) -C nfs-utils clean
2065 @rm -f nfs-utils/stamp-h1
2067 nfs-utils-install: nfs-utils
2068 install -d $(INSTALLDIR)/nfs-utils/usr/sbin
2069 install -D nfs-utils/utils/mount/mount.nfs $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
2070 install -D nfs-utils/utils/nfsd/nfsd $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
2071 install -D nfs-utils/utils/showmount/showmount $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
2072 install -D nfs-utils/utils/exportfs/exportfs $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
2073 install -D nfs-utils/utils/statd/statd $(INSTALLDIR)/nfs-utils/usr/sbin/statd
2074 install -D nfs-utils/utils/mountd/mountd $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
2075 install -D nfs-utils/nfs.rc $(INSTALLDIR)/nfs-utils/usr/sbin/nfs.rc
2076 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
2077 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
2078 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
2079 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
2080 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/statd
2081 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
2083 sd-idle/stamp-h1:
2084 cd sd-idle \
2085 CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
2086 $(MAKE) -C sd-idle
2087 chmod 0755 sd-idle/sd-idle
2088 touch sd-idle/stamp-h1
2090 sd-idle-clean:
2091 -@$(MAKE) -C sd-idle clean
2092 @rm -f sd-idle/stamp-h1
2094 sd-idle-install: sd-idle/stamp-h1
2095 install -d $(INSTALLDIR)/sd-idle/usr/bin
2096 install -D sd-idle/sd-idle $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
2097 $(STRIP) -s $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
2099 snmp/stamp-h1:
2100 cd snmp && \
2101 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2102 $(CONFIGURE) --prefix=/usr --with-endianness=little --enable-mini-agent --disable-debugging \
2103 --disable-privacy --without-opaque-special-types --with-persistent-directory=/tmp/snmp-persist \
2104 --with-default-snmp-version=3 --with-sys-contact=root --with-sys-location=Unknown --with-logfile=/dev/null \
2105 --with-out-transports=UDPIPv6,TCPIPv6,AAL5PVC,IPX,TCP,Unix --enable-shared=no --enable-static --with-gnu-ld \
2106 --enable-internal-md5 --with-copy-persistent-files=no --without-openssl -sysconfdir=/tmp \
2107 --with-mib-modules=mibII,host,mibII/ip,mibII/tcp,mibII/udp,mibII/icmp,mibII/var_route,mibII/kernel_linux,qos,ucd_snmp \
2108 --with-out-mib-modules=snmpv3mibs,agent_mips,agentx,notification,utilities,target --disable-ipv6 --with-defaults \
2109 --without-efence --without-rsaref --without-kmem-usage --without-rpm --without-dmalloc
2110 touch snmp/stamp-h1
2112 snmp: snmp/stamp-h1
2113 @$(SEP)
2114 $(MAKE) -C snmp
2116 snmp-clean:
2117 -@$(MAKE) -C snmp clean
2118 @rm -f snmp/stamp-h1
2120 snmp-install: snmp
2121 install -D snmp/agent/snmpd $(INSTALLDIR)/snmp/usr/sbin/snmpd
2122 $(STRIP) $(INSTALLDIR)/snmp/usr/sbin/snmpd
2124 apcupsd/stamp-h1:
2125 cd apcupsd && touch autoconf/variables.mak && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2126 $(MAKE) configure && \
2127 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2128 LDFLAGS="-L$(TOOLCHAIN)/lib -ffunction-sections -fdata-sections" \
2129 $(CONFIGURE) --prefix=/usr --without-x --enable-usb --disable-pcnet --enable-cgi \
2130 --disable-lgd --enable-net --sysconfdir=/usr/local/apcupsd --bindir=/bin \
2131 --disable-dumb --disable-snmp --disable-net-snmp --with-cgi-bin=/www/apcupsd --with-serial-dev=
2132 touch apcupsd/stamp-h1
2134 apcupsd: apcupsd/stamp-h1
2135 $(MAKE) -C apcupsd $(PARALLEL_BUILD)
2137 apcupsd-clean:
2138 -@$(MAKE) -C apcupsd clean
2139 @rm -f apcupsd/stamp-h1
2140 @rm -f apcupsd/config*
2142 apcupsd-install: apcupsd
2143 $(MAKE) -C apcupsd DESTDIR=$(INSTALLDIR)/apcupsd install
2144 @rm -rf $(INSTALLDIR)/apcupsd/sbin/apctest
2145 @rm -rf $(INSTALLDIR)/apcupsd/www/apcupsd/ups*.cgi
2146 $(STRIP) $(INSTALLDIR)/apcupsd/sbin/*
2147 $(STRIP) $(INSTALLDIR)/apcupsd/www/apcupsd/*
2149 libsodium/stamp-h1:
2150 cd $(TOP)/libsodium && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2151 $(CONFIGURE) --prefix=/usr --disable-ssp
2152 touch libsodium/stamp-h1
2154 libsodium: libsodium/stamp-h1
2155 $(MAKE) -C libsodium $(PARALLEL_BUILD)
2157 libsodium-install: libsodium
2158 install -d $(INSTALLDIR)/libsodium/usr/lib
2159 install -D libsodium/src/libsodium/.libs/libsodium.so.10.0.0 $(INSTALLDIR)/libsodium/usr/lib/libsodium.so.10.0.0
2160 $(STRIP) -s $(INSTALLDIR)/libsodium/usr/lib/libsodium.so.10.0.0
2161 cd $(INSTALLDIR)/libsodium/usr/lib/ && \
2162 ln -sf libsodium.so.10.0.0 libsodium.so.10 && \
2163 ln -sf libsodium.so.10.0.0 libsodium.so
2165 libsodium-clean:
2166 -$(MAKE) -C libsodium clean
2167 @rm -rf libsodium/stamp-h1
2169 dnscrypt/stamp-h1: libsodium
2170 cd $(TOP)/dnscrypt && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2171 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2172 CPPFLAGS="-I$(TOP)/libsodium/src/libsodium/include" \
2173 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -L$(TOP)/libsodium/src/libsodium/.libs" \
2174 $(CONFIGURE) --prefix=/usr --disable-ssp
2175 touch dnscrypt/stamp-h1
2177 dnscrypt: dnscrypt/stamp-h1
2178 $(MAKE) -C dnscrypt $(PARALLEL_BUILD)
2180 dnscrypt-install: dnscrypt
2181 install -D dnscrypt/src/proxy/.libs/dnscrypt-proxy $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
2182 install -D dnscrypt/src/hostip/.libs/hostip $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
2183 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
2184 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
2186 dnscrypt-clean:
2187 -@$(MAKE) -C dnscrypt clean
2188 @rm -rf dnscrypt/stamp-h1 dnscrypt/src/dnscrypt-proxy/.deps dnscrypt/Makefile
2190 tor/stamp-h1: openssl zlib libevent
2191 cd $(TOP)/tor && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2192 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2193 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
2194 $(CONFIGURE) --prefix=/usr --with-libevent-dir=$(TOP)/libevent/staged/usr/local \
2195 --with-openssl-dir=$(TOP)/openssl --with-zlib-dir=$(TOP)/zlib \
2196 --disable-asciidoc --disable-threads
2197 touch tor/stamp-h1
2199 tor: tor/stamp-h1
2200 $(MAKE) -C tor $(PARALLEL_BUILD)
2202 tor-install: tor
2203 install -D tor/src/or/tor $(INSTALLDIR)/tor/usr/sbin/tor
2204 $(STRIP) -s $(INSTALLDIR)/tor/usr/sbin/tor
2206 tor-clean:
2207 -@$(MAKE) -C tor clean
2208 @rm -rf tor/stamp-h1 tor/Makefile
2210 udpxy/stamp-h1:
2211 cd udpxy \
2212 $(MAKE) -C udpxy CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
2213 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections"
2214 touch udpxy/stamp-h1
2216 udpxy-clean:
2217 -@$(MAKE) -C udpxy clean
2218 @rm -f udpxy/stamp-h1
2220 udpxy-install: udpxy/stamp-h1
2221 install -d $(INSTALLDIR)/udpxy/usr/bin
2222 install -D udpxy/udpxy $(INSTALLDIR)/udpxy/bin/udpxy
2223 $(STRIP) -s $(INSTALLDIR)/udpxy/bin/udpxy
2225 mdadm:
2226 $(MAKE) -C mdadm $(PARALLEL_BUILD)
2228 mdadm-install: mdadm
2229 install -D mdadm/mdadm $(INSTALLDIR)/mdadm/usr/sbin/mdadm
2230 $(STRIP) -s $(INSTALLDIR)/mdadm/usr/sbin/mdadm
2232 mdadm-clean:
2233 -@$(MAKE) -C mdadm clean
2235 ipset:
2236 $(MAKE) -C ipset binaries
2238 ipset-install: ipset
2239 install -D ipset/ipset $(INSTALLDIR)/ipset/usr/sbin/ipset
2240 install -d $(INSTALLDIR)/ipset/usr/lib/
2241 install ipset/*.so $(INSTALLDIR)/ipset/usr/lib/
2242 $(STRIP) $(INSTALLDIR)/ipset/usr/lib/*.so
2243 $(STRIP) $(INSTALLDIR)/ipset/usr/sbin/ipset
2245 ipset-clean:
2246 -@$(MAKE) -C ipset clean
2248 comgt:
2249 @$(MAKE) -C comgt CC=$(CC) CFLAGS="$(EXTRACFLAGS)" LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" comgt
2251 comgt-install: comgt
2252 install -D comgt/comgt $(INSTALLDIR)/comgt/usr/sbin/comgt
2253 cd $(INSTALLDIR)/comgt/usr/sbin/ && \
2254 ln -sf comgt gcom
2255 $(STRIP) -s $(INSTALLDIR)/comgt/usr/sbin/comgt
2256 @mkdir -p $(TARGETDIR)/rom/etc/gcom
2257 @cp -f comgt/gcom/* $(TARGETDIR)/rom/etc/gcom/
2259 comgt-clean:
2260 -@$(MAKE) -C comgt clean
2263 # Generic rules
2267 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
2270 %-clean:
2271 @-[ ! -d $* ] || $(MAKE) -C $* clean
2273 %-distclean:
2274 @-[ ! -d $* ] || $(MAKE) -C $* distclean
2276 %-install: %
2277 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
2279 %-build:
2280 $(MAKE) $*-clean $*
2282 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
2284 .PHONY: all clean distclean mrproper install package
2285 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
2286 .PHONY: dummy libnet libpcap