Fix OpenVPN depends on K24 builds
[tomato.git] / release / src / router / Makefile
blobbae03df84821c34e535dd6d58f717db6deb57c1d
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
20 SEP=echo "\033[41;1m $@ \033[0m"
23 # standard packages
25 obj-y += lzma-loader
26 obj-y += nvram
27 obj-y += shared
28 obj-y += prebuilt
29 obj-y += igmpproxy
30 obj-y += iptables
31 obj-y += rc
32 obj-y += iproute2
33 obj-y += rom
34 obj-y += others
35 obj-y += busybox
36 obj-y += httpd
37 obj-y += www
38 obj-y += bridge
39 obj-y += dnsmasq
40 obj-y += etc
41 # obj-y += vlan # use Busybox vconfig
42 obj-y += pppd
43 obj-y += rp-pppoe
44 obj-y += utils
45 obj-y += ntpc
46 obj-y += rstats
47 obj-y += cstats
48 obj-y += udpxy
49 obj-$(TCONFIG_TOR) += tor
50 obj-$(TCONFIG_TOR) += libevent
51 obj-$(TCONFIG_TOR) += zlib
52 obj-$(TCONFIG_DNSCRYPT) += dnscrypt
53 obj-$(TCONFIG_SNMP) += snmp
54 obj-$(TCONFIG_SDHC) += mmc
56 # !!TB - updated Broadcom Wireless driver
57 obj-y += et
58 obj-y += libbcmcrypto
59 obj-y += wlconf
61 obj-y += cyassl
62 obj-y += mssl
63 obj-y += mdu
64 obj-$(TCONFIG_RAID) += mdadm
66 obj-$(TCONFIG_NFS) += portmap
67 obj-$(TCONFIG_NFS) += e2fsprogs
68 obj-$(TCONFIG_NFS) += libevent
69 obj-$(TCONFIG_NFS) += libnfsidmap
70 obj-$(TCONFIG_NFS) += nfs-utils
72 #Roadkill
73 obj-$(TCONFIG_NOCAT) += nocat
75 # !!TB
76 obj-$(TCONFIG_USB) += p910nd
78 obj-$(TCONFIG_UPS) += apcupsd
80 ifeq ($(CONFIG_LINUX26),y)
81 obj-$(TCONFIG_USB) += sd-idle
82 else
83 obj-$(TCONFIG_USB) += scsi-idle
84 endif
86 obj-y += libusb10
87 #obj-y += libusb
88 obj-y += usbmodeswitch
89 obj-$(TCONFIG_FTP) += vsftpd
91 ifeq ($(CONFIG_LINUX26),y)
92 ifeq ($(TCONFIG_SAMBASRV),y)
93 NEED_EX_NLS = y
94 endif
95 ifeq ($(TCONFIG_USB_EXTRAS),y)
96 NEED_EX_USB = y
97 endif
98 endif
100 ifeq ($(TCONFIG_SAMBASRV),y)
101 ifeq ($(TCONFIG_SAMBA3),y)
102 NEED_SAMBA3 = y
103 else
104 NEED_SAMBA2 = y
105 endif
106 endif
108 ifeq ($(TCONFIG_IPV6),y)
109 export TCONFIG_IPV6 := y
110 else
111 TCONFIG_IPV6 :=
112 endif
114 ifeq ($(TCONFIG_IPSEC),y)
115 export TCONFIG_IPSEC := y
116 else
117 TCONFIG_IPSEC :=
118 endif
120 ifeq ($(TCONFIG_RAID),y)
121 export TCONFIG_RAID := y
122 else
123 TCONFIG_RAID :=
124 endif
126 obj-$(NEED_SAMBA2) += samba
127 obj-$(NEED_SAMBA3) += samba3
128 obj-$(TCONFIG_NTFS) += ntfs-3g
129 obj-$(TCONFIG_EBTABLES) += ebtables
130 obj-$(TCONFIG_IPV6) += libdaemon
131 obj-$(TCONFIG_IPV6) += radvd
132 obj-$(TCONFIG_IPV6) += dhcpv6
134 obj-$(TCONFIG_MEDIA_SERVER) += zlib
135 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
136 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
137 obj-$(TCONFIG_MEDIA_SERVER) += libogg
138 obj-$(TCONFIG_MEDIA_SERVER) += flac
139 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
140 obj-$(TCONFIG_MEDIA_SERVER) += libexif
141 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
142 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
143 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
144 MEDIA_SERVER_STATIC=y
146 obj-y += miniupnpd
147 # obj-y += upnp
151 # configurable packages
153 obj-$(TCONFIG_L2TP) += xl2tpd
154 obj-$(TCONFIG_PPTP) += accel-pptp
155 obj-$(TCONFIG_PPTPD) += pptpd
156 obj-$(TCONFIG_HTTPS) += openssl
157 obj-$(TCONFIG_SSH) += dropbear
158 obj-$(TCONFIG_ZEBRA) += zebra
159 # obj-$(TCONFIG_IPP2P) += ipp2p
160 obj-$(TCONFIG_LZO) += lzo
161 obj-$(TCONFIG_OPENVPN) += openvpn
162 obj-$(TCONFIG_EMF) += emf
163 obj-$(TCONFIG_EMF) += igs
165 obj-$(TCONFIG_BBT) += openssl
166 obj-$(TCONFIG_BBT) += libevent
167 obj-$(TCONFIG_BBT) += libcurl
168 obj-$(TCONFIG_BBT) += transmission
169 obj-$(TCONFIG_BT) += btgui
170 obj-$(TCONFIG_BBT) += zlib
171 #obj-$(TCONFIG_BBT) += libiconv
173 obj-$(CONFIG_LINUX26) += hotplug2
174 obj-$(CONFIG_LINUX26) += udevtrigger
176 ifeq ($(TCONFIG_OPENVPN),y)
177 export FULL_OPENSSL := y
178 else
179 ifeq ($(TCONFIG_FTP_SSL),y)
180 export FULL_OPENSSL := y
181 else
182 ifeq ($(TCONFIG_BBT),y)
183 export FULL_OPENSSL := y
184 else
185 ifeq ($(TCONFIG_TOR),y)
186 export FULL_OPENSSL := y
187 else
188 FULL_OPENSSL :=
189 endif
190 endif
191 endif
192 endif
194 obj-y += wanuptime
196 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
197 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
202 # Basic rules
205 all: clean-build libc $(obj-y) kernel
208 kernel: $(LINUXDIR)/.config
209 @$(SEP)
211 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
212 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC); \
214 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
215 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC); \
217 ifeq ($(CONFIG_LINUX26),y)
218 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR)
219 endif
222 lzma-loader:
223 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD)
225 lzma-loader-install: lzma-loader
226 @$(SEP)
229 kmod: dummy
230 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC)
232 testfind:
233 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
234 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
236 install package: $(obj-install) $(LINUXDIR)/.config
237 @$(SEP)
239 install -d $(TARGETDIR)
242 # kernel modules
243 $(MAKE) -C $(LINUXDIR) modules_install \
244 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" \
245 DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
247 ifneq ($(CONFIG_LINUX26),y)
248 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded -x {} \;
249 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded -x {} \;
250 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded -x {} \;
251 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded -x {} \;
252 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded -x {} \;
253 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded -x {} \;
254 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded -x {} \;
256 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug -x -R .mdebug.abi32 {} \;
257 endif
259 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
261 # nice and clean
262 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
263 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
264 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
265 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
266 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
267 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
268 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
269 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
270 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
271 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
273 ##!!TB
274 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
275 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
276 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
277 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
278 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jfs/* . && rm -rf jfs || true
279 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
280 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
281 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
282 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
283 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
284 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
285 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfs/* . && rm -rf hfs || true
286 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
287 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
288 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
289 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
290 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
291 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
292 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
293 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
294 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
295 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
296 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
297 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
298 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
299 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
300 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
301 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
302 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
303 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
304 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
305 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
306 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
307 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
308 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
309 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
310 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
311 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
312 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
313 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv pwc/* . && rm -rf pwc || true
314 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv gl860/* . && rm -rf gl860 || true
315 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv m5602/* . && rm -rf m5602 || true
316 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv stv06xx/* . && rm -rf stv06xx || true
317 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv gspca/* . && rm -rf gspca || true
318 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
320 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
321 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
322 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
323 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
324 cd $(TARGETDIR)/lib/modules && rm -f */source || true
326 # misc
327 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
328 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
329 done
331 ifneq ($(TCONFIG_L7),y)
332 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
333 endif
335 # uClibc
336 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
337 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
338 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
339 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
340 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
341 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
342 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
343 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
344 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
345 ifeq ($(TCONFIG_SSH),y)
346 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
347 endif
348 ifeq ($(TCONFIG_BBT),y)
349 install $(LIBDIR)/librt-0.9.30.1.so $(TARGETDIR)/lib/librt.so.0
350 endif
351 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
352 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
353 $(STRIP) $(TARGETDIR)/lib/*.so.0
354 endif
356 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
358 @echo ---
360 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
361 @$(SRCBASE)/btools/libfoo.pl
362 else
363 @$(SRCBASE)/btools/libfoo.pl --noopt
364 endif
365 @chmod 0555 $(TARGETDIR)/lib/*.so*
366 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
368 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
369 # separated/copied extra stuff
370 @rm -rf $(PLATFORMDIR)/extras
371 @mkdir $(PLATFORMDIR)/extras
372 @mkdir $(PLATFORMDIR)/extras/ipsec
373 @mkdir $(PLATFORMDIR)/extras/raid
374 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
375 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/usr/lib/iptables/libipt_policy.*o $(PLATFORMDIR)/extras/ipsec/ || true
377 $(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
378 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
380 $(if $(TCONFIG_RAID),@cp -f,@mv) $(TARGETDIR)/usr/sbin/mdadm $(PLATFORMDIR)/extras/raid/ || true
381 $(if $(TCONFIG_RAID),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/md/*.ko $(PLATFORMDIR)/extras/raid/ || true
382 $(if $(TCONFIG_RAID),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/drivers/md || true
384 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
385 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
386 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
387 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
388 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
389 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/jfs.*o $(PLATFORMDIR)/extras/ || true
390 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
391 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
392 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
393 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
394 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
395 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
396 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
397 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
398 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
399 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
401 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
402 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
403 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
404 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*acm.*o $(PLATFORMDIR)/extras/ || true
405 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_ether.*o $(PLATFORMDIR)/extras/ || true
406 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
407 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/usbnet.*o $(PLATFORMDIR)/extras/ || true
408 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
409 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
411 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ch341.*o $(PLATFORMDIR)/extras/ || true
412 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
413 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
414 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
415 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
416 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
417 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
418 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
419 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
420 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
421 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
422 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/rndis_host.*o $(PLATFORMDIR)/extras/ || true
423 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb || true
424 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
425 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
426 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
427 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
428 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
429 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
430 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
431 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
432 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
433 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
434 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
435 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ctf*.*o $(PLATFORMDIR)/extras/ || true
436 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
437 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
438 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
439 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/crypto/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
440 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/crypto || true
441 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
442 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm || true
443 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/key/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
444 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/net/key || true
445 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/xfrm*.ko $(PLATFORMDIR)/extras/ipsec/ || true
446 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/tunnel*.ko $(PLATFORMDIR)/extras/ipsec/ || true
447 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ah*.ko $(PLATFORMDIR)/extras/ipsec/ || true
448 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/esp*.ko $(PLATFORMDIR)/extras/ipsec/ || true
449 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ipcomp*.ko $(PLATFORMDIR)/extras/ipsec/ || true
450 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_policy.ko $(PLATFORMDIR)/extras/ipsec/ || true
452 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
453 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
454 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
455 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
456 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
457 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
458 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
460 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
461 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
462 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
463 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
464 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
465 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
466 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
467 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
468 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
469 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
470 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
471 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
472 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfs.*o $(PLATFORMDIR)/extras/ || true
473 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
475 ifneq ($(TCONFIG_USB),y)
476 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
477 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
478 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
479 endif
481 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
482 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
483 ifneq ($(TCONFIG_USB_EXTRAS),y)
484 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
485 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
486 endif
487 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
488 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
489 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
490 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
491 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
492 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
493 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
495 @mkdir -p $(PLATFORMDIR)/extras/apps
496 @mkdir -p $(PLATFORMDIR)/extras/lib
498 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
499 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
500 @mv $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
502 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
503 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
504 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
505 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
506 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
507 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
508 ifneq ($(NEED_EX_USB),y)
509 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
510 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
511 endif
512 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
514 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
515 ifeq ($(TCONFIG_L7PAT),y)
516 @cd layer7 && ./squish.sh
517 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
518 endif
520 ifeq ($(TCONFIG_PPTPD),y)
521 @mkdir -p $(TARGETDIR)/rom/etc/vpn
522 cp rc/vpn/* $(TARGETDIR)/rom/etc/vpn
523 chmod +x $(TARGETDIR)/rom/etc/vpn/*
524 endif
526 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
527 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
528 @echo ---
530 @rm -f $(TARGETDIR)/lib/modules/*/build
532 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
533 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -nopad | tee target.info
535 # Package kernel and filesystem
536 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
537 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
538 # $(MAKE) -C $(LINUXDIR) zImage ; \
539 # else \
540 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
541 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
542 # fi
544 # Pad self-booting Linux to a 64 KB boundary
545 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
546 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
547 # Append filesystem to self-booting Linux
548 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
551 libc: $(LIBDIR)/ld-uClibc.so.0
552 # $(MAKE) -C ../../../tools-src/uClibc all
553 # $(MAKE) -C ../../../tools-src/uClibc install
557 # cleaners
560 clean: clean-build $(obj-clean)
561 rm -rf layer7/squished
562 rm -f .ipv6-y .ipv6-n
563 rm -f .fullssl-y .fullssl-n
564 make -C config clean
566 clean-build: dummy
567 rm -rf $(TARGETDIR)
568 rm -rf $(INSTALLDIR)
569 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
570 rm -rf $(PLATFORMDIR)/extras
572 distclean: clean
573 ifneq ($(INSIDE_MAK),1)
574 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
575 endif
576 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
579 # configuration
582 CONFIG_IN := config/config.in
584 config/conf config/mconf:
585 @$(MAKE) -C config
587 rconf: config/conf
588 @config/conf $(CONFIG_IN)
590 rmconf: config/mconf
591 @config/mconf $(CONFIG_IN)
593 roldconf: config/conf
594 @config/conf -o $(CONFIG_IN)
595 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean
597 kconf:
598 @$(MAKE) -C $(LINUXDIR) config
600 kmconf:
601 @$(MAKE) -C $(LINUXDIR) menuconfig
603 koldconf:
604 @$(MAKE) -C $(LINUXDIR) oldconfig
605 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
607 bboldconf:
608 @$(MAKE) -C busybox oldconfig
610 config conf: rconf kconf
612 menuconfig mconf: rmconf kmconf
614 .ipv6-y .ipv6-n:
615 @rm -f .ipv6-y .ipv6-n
616 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
617 @touch $@
619 .fullssl-y .fullssl-n:
620 @rm -f .fullssl-y .fullssl-n
621 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
622 @touch $@
624 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
626 oldconfig oldconf: koldconf roldconf dependconf bboldconf
630 # overrides and extra dependencies
633 busybox: dummy
634 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)"
636 # V=1
638 busybox-install:
639 rm -rf $(INSTALLDIR)/busybox
640 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
642 busybox-clean:
643 -@$(MAKE) -C busybox distclean
645 busybox-config:
646 $(MAKE) -C busybox menuconfig
649 httpd: shared nvram mssl
650 @$(SEP)
651 @$(MAKE) -C httpd
653 www-install:
654 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
656 matrixssl:
657 @$(SEP)
658 @$(MAKE) -C matrixssl/src
660 matrixssl-install:
661 @true
663 matrixssl-clean:
664 -@$(MAKE) -C matrixssl/src clean
666 cyassl/stamp-h1:
667 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
668 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections \
669 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
670 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
671 PTHREAD_LIBS="-lpthread" \
672 $(CONFIGURE)
673 @touch cyassl/stamp-h1
675 cyassl: cyassl/stamp-h1
676 @$(SEP)
677 @$(MAKE) -C cyassl
679 cyassl-clean:
680 -@$(MAKE) -C cyassl clean
681 @rm -f cyassl/stamp-h1
683 cyassl-install:
684 @true
686 ifeq ($(FULL_OPENSSL),y)
687 OPENSSL_CIPHERS:=enable-rc5
688 else
689 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-engine no-aes192 no-cast
690 endif
692 openssl/stamp-h1:
693 cd openssl && \
694 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
695 -ffunction-sections -fdata-sections -Wl,--gc-sections \
696 shared $(OPENSSL_CIPHERS) \
697 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
698 no-seed no-capieng no-cms no-gms no-gmp no-rfc3779 \
699 no-ec no-ecdh no-ecdsa no-err no-hw no-jpake no-threads \
700 no-zlib no-engines no-sse2 \
701 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
703 @$(MAKE) -C openssl clean
704 @touch openssl/stamp-h1
706 openssl: openssl/stamp-h1
708 openssl-clean:
709 -@$(MAKE) -C openssl clean
710 @rm -f openssl/stamp-h1
712 openssl-install: openssl
713 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
714 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
715 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
717 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
718 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
719 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
721 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
723 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
724 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
726 ifeq ($(FULL_OPENSSL),y)
727 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
728 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
729 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
730 endif
732 mssl: $(if $(FULL_OPENSSL),openssl,cyassl)
734 mdu: shared mssl
736 rc: nvram shared
738 bridge/Makefile:
739 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
740 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
742 bridge: bridge/Makefile
743 @$(SEP)
744 @$(MAKE) -C bridge
746 bridge-clean:
747 -@$(MAKE) -C bridge clean
748 @rm -f bridge/Makefile
750 bridge-install:
751 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
752 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
754 dnsmasq:
755 @$(SEP)
756 @$(MAKE) -C dnsmasq \
757 COPTS="$(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6) $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
758 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC"
760 dnsmasq-install:
761 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
762 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
764 iptables:
765 ifeq ($(CONFIG_LINUX26),y)
766 cp -f iptables/extensions/libipt_ipp2p_K26.c iptables/extensions/libipt_ipp2p.c
767 else
768 cp -f iptables/extensions/libipt_ipp2p_K24.c iptables/extensions/libipt_ipp2p.c
769 endif
770 @$(SEP)
771 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE"
773 iptables-install:
774 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
775 cd $(INSTALLDIR)/iptables/usr/sbin && \
776 ln -sf iptables iptables-restore
778 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
779 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
781 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
783 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
784 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
785 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
787 ifeq ($(TCONFIG_IPV6),y)
788 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
789 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
790 cd $(INSTALLDIR)/iptables/usr/sbin && \
791 ln -sf ip6tables ip6tables-restore
792 endif
794 iptables-clean:
795 -@$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
797 ppp:
798 @$(SEP)
799 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
800 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
802 ppp-%:
803 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
805 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
806 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
807 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
808 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
809 @touch rp-pppoe/src/stamp-h1
811 rp-pppoe: pppd rp-pppoe/src/stamp-h1
812 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so
814 rp-pppoe-clean:
815 -@$(MAKE) -C rp-pppoe/src clean
816 @rm -f rp-pppoe/src/pppoe-relay
817 @rm -f rp-pppoe/src/stamp-h1
819 rp-pppoe-install: rp-pppoe
820 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
821 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
822 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
823 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
826 upnp: nvram shared iptables
828 miniupnpd-config:
829 @cd miniupnpd && ./genconfig.sh
831 miniupnpd: iptables miniupnpd-config
832 @$(SEP)
833 $(MAKE) -C miniupnpd miniupnpd -f Makefile.linux \
834 TARGET_OPENWRT="not really" CC=$(CC) \
835 CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/iptables/include" \
836 LDFLAGS="-L$(TOP)/iptables -liptc" LIBS=""
838 miniupnpd-clean:
839 -@$(MAKE) -C miniupnpd -f Makefile.linux clean
840 @rm -f miniupnpd/config.h
842 miniupnpd-install:
843 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
844 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
846 # !!TB
847 shared: busybox
849 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
850 @$(SEP)
851 $(MAKE) -C vsftpd
853 vsftpd-install: vsftpd
854 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
855 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
857 ntfs-3g/Makefile:
858 cd ntfs-3g && \
859 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
860 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
861 $(CONFIGURE) --enable-shared=no --enable-static=no \
862 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
863 --disable-ntfsprogs --disable-crypto --without-uuid \
864 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
866 ntfs-3g: ntfs-3g/Makefile
867 @$(MAKE) -C ntfs-3g
869 ntfs-3g-clean:
870 -@$(MAKE) -C ntfs-3g clean
871 @rm -f ntfs-3g/Makefile
873 ntfs-3g-install: ntfs-3g
874 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
875 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
876 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
877 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
878 ln -sf ../bin/ntfs-3g mount.ntfs
880 libusb10/Makefile: libusb10/Makefile.in
881 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
882 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
884 libusb10: libusb10/Makefile
885 $(MAKE) -C $@
887 libusb10-install: libusb10
888 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
889 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
891 libusb10-clean:
892 -@$(MAKE) -C $@ clean
893 @rm -rf libusb10/Makefile
895 libusb/Makefile: libusb/Makefile.in
896 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
897 $(CONFIGURE) --prefix=/usr \
898 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
899 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
900 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
902 libusb: libusb10 libusb/Makefile
903 $(MAKE) -C $@
905 libusb-install: libusb
906 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
907 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
909 libusb-clean:
910 -@$(MAKE) -C $@ clean
911 @rm -rf libusb/Makefile
913 usbmodeswitch: libusb10
914 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
915 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
916 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
918 usbmodeswitchdb-install:
919 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
920 # compress whitespace
921 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
922 F=`basename $$D`; \
923 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
924 done
926 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
927 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
928 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
929 @mkdir -p $(TARGETDIR)/rom/etc
930 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
932 libdaemon: libdaemon/Makefile
933 $(MAKE) -C $@
935 libdaemon/Makefile: libdaemon/Makefile.in
936 cd libdaemon && $(CONFIGURE) ac_cv_func_setpgrp_void=yes \
937 --disable-dependency-tracking
939 libdaemon-install: libdaemon
940 install -D libdaemon/libdaemon/.libs/libdaemon.so.0.5.0 $(INSTALLDIR)/libdaemon/usr/lib/libdaemon.so.0.5.0
941 $(STRIP) $(INSTALLDIR)/libdaemon/usr/lib/*.so.*
942 cd $(INSTALLDIR)/libdaemon/usr/lib && \
943 ln -sf libdaemon.so.0.5.0 libdaemon.so && \
944 ln -sf libdaemon.so.0.5.0 libdaemon.so.0
946 libdaemon-clean:
947 -@$(MAKE) -C libdaemon distclean
949 radvd/stamp-h1:
950 cd radvd && CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
951 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
952 $(CONFIGURE) --prefix="" --disable-dependency-tracking \
953 DAEMON_CFLAGS="-I$(TOP)/libdaemon" \
954 DAEMON_LIBS="-ldaemon -L$(TOP)/libdaemon/libdaemon/.libs"
955 @$(MAKE) -C radvd clean
956 @touch radvd/stamp-h1
958 radvd: libdaemon radvd/stamp-h1
960 radvd-clean:
961 -@$(MAKE) -C radvd distclean
962 @rm -f radvd/stamp-h1
964 radvd-install: radvd
965 install -D radvd/radvd $(INSTALLDIR)/radvd/usr/sbin/radvd
966 $(STRIP) $(INSTALLDIR)/radvd/usr/sbin/radvd
968 dhcpv6/stamp-h1:
969 @cd dhcpv6 && \
970 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
971 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
972 ac_cv_func_setpgrp_void=yes \
973 $(CONFIGURE) --prefix= --with-localdbdir=/var
974 @$(MAKE) -C dhcpv6 clean
975 @touch dhcpv6/stamp-h1
977 dhcpv6: dhcpv6/stamp-h1
978 @$(SEP)
979 @$(MAKE) -C dhcpv6 dhcp6c
981 dhcpv6-install: dhcpv6
982 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
983 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
985 dhcpv6-clean:
986 -@$(MAKE) -C dhcpv6 clean
987 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
990 p910nd:
991 samba:
992 samba3:
994 nvram: shared
996 prebuilt: shared
998 vlan:
999 @$(SEP)
1000 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
1002 vlan-install:
1003 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
1004 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
1007 pptp-client-install:
1008 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1009 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1012 accel-pptp: pppd accel-pptp/Makefile
1013 @$(MAKE) -C accel-pptp
1015 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
1016 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
1017 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
1019 accel-pptp-clean:
1020 -@$(MAKE) -C accel-pptp clean
1021 @rm -f accel-pptp/Makefile
1023 accel-pptp-install: accel-pptp
1024 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
1025 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
1027 pptpd/stamp-h1:
1028 cd pptpd && $(CONFIGURE) --prefix=$(INSTALLDIR)/pptpd --enable-bcrelay CC=mipsel-uclibc-gcc \
1029 STRIP=mipsel-uclibc-strip AR=mipsel-uclibc-ar LD=mipsel-uclibc-ld NM=mipsel-uclibc-nm RANLIB=mipsel-uclibc-ranlib
1030 touch pptpd/stamp-h1
1032 pptpd: pptpd/stamp-h1
1034 pptpd-install: pptpd
1035 @echo pptpd
1036 @install -D pptpd/pptpd $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1037 @install -D pptpd/bcrelay $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1038 @install -D pptpd/pptpctrl $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1039 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1040 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1041 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1043 pptpd-clean:
1044 -@$(MAKE) -C pptpd clean
1045 rm -rf pptpd/stamp-h1 pptpd/.deps
1047 pppd/Makefile: pppd/linux/Makefile.top
1048 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
1050 pppd: pppd/Makefile
1051 @$(SEP)
1052 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
1054 pppd-clean:
1055 -@$(MAKE) -C pppd clean
1056 @rm -f pppd/Makefile
1058 pppd-install: pppd
1059 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
1060 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
1061 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
1062 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
1063 ifeq ($(TCONFIG_L2TP),y)
1064 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
1065 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
1066 endif
1068 # ipupdate-install:
1069 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1070 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1072 zebra/stamp-h1:
1073 @cd zebra && rm -f config.cache && \
1074 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1075 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1076 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1077 $(CONFIGURE) --sysconfdir=/etc \
1078 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
1079 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
1080 @touch zebra/stamp-h1
1082 zebra: zebra/stamp-h1
1083 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
1085 zebra-clean:
1086 -@$(MAKE) -C zebra clean
1087 @rm -f zebra/stamp-h1
1089 zebra-install: zebra
1090 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
1091 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
1092 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1093 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
1094 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
1095 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1098 rp-l2tp-install:
1099 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1100 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1101 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
1102 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1103 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1104 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1105 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1107 xl2tpd: pppd
1108 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
1110 xl2tpd-install: xl2tpd
1111 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1112 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1115 bpalogin-install:
1116 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1117 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1120 # libnet:
1121 # @$(SEP)
1122 # @-mkdir -p libnet/lib
1123 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1125 # libpcap:
1126 # @$(SEP)
1127 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1129 libbcm:
1130 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
1132 libbcm-install:
1133 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1134 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1137 iproute2:
1138 @$(SEP)
1139 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1141 iproute2-install: iproute2
1142 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1143 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1144 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1145 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1148 ntpc: nvram shared
1151 dropbear: dropbear/config.h
1152 @$(SEP)
1153 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1
1155 dropbear-install:
1156 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1157 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1158 cd $(INSTALLDIR)/dropbear/usr/bin && \
1159 ln -sf dropbearmulti dropbear && \
1160 ln -sf dropbearmulti dropbearconvert && \
1161 ln -sf dropbearmulti dropbearkey && \
1162 ln -sf dropbearmulti dbclient && \
1163 ln -sf dropbearmulti ssh && \
1164 ln -sf dropbearmulti scp
1166 dropbear-clean:
1167 -@$(MAKE) -C dropbear clean
1168 @rm -f dropbear/config.h
1170 dropbear/config.h:
1171 cd dropbear && \
1172 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1173 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1174 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1175 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1176 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1177 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty --enable-bundled-libtom
1178 @$(MAKE) -C dropbear clean
1180 # Media libraries
1182 sqlite/stamp-h1:
1183 cd sqlite && \
1184 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1185 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1186 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1187 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1188 touch sqlite/stamp-h1
1190 sqlite: sqlite/stamp-h1
1191 @$(MAKE) -C sqlite all
1193 sqlite-clean:
1194 -@$(MAKE) -C sqlite clean
1195 @rm -f sqlite/stamp-h1
1197 sqlite-install: sqlite
1198 @$(SEP)
1199 ifneq ($(MEDIA_SERVER_STATIC),y)
1200 install -D sqlite/.libs/libsqlite3.so.0 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1201 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1202 endif
1204 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1206 FFMPEG_DECODERS:=aac ac3 atrac3 flac h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1207 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1209 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1210 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1212 FFMPEG_PROTOCOLS:=file
1213 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1215 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
1216 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1218 ffmpeg/stamp-h1: zlib
1219 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1220 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1221 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1222 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1223 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1224 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1225 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1226 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1227 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1228 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1229 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1230 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1231 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1232 --extra-libs="-L$(TOP)/zlib -lz" \
1233 --enable-zlib --disable-debug --prefix=''
1234 touch ffmpeg/stamp-h1
1236 ffmpeg: ffmpeg/stamp-h1 zlib
1237 @$(MAKE) -C ffmpeg all
1239 ffmpeg-clean:
1240 -@$(MAKE) -C ffmpeg clean
1241 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1243 ffmpeg-install: ffmpeg
1244 @$(SEP)
1245 ifneq ($(MEDIA_SERVER_STATIC),y)
1246 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1247 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1248 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1249 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1250 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1251 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1252 endif
1254 libogg/stamp-h1:
1255 cd libogg && \
1256 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1257 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1258 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1259 touch libogg/stamp-h1
1261 libogg: libogg/stamp-h1
1262 @$(MAKE) -C libogg all
1264 libogg-clean:
1265 -@$(MAKE) -C libogg clean
1266 @rm -f libogg/stamp-h1
1268 libogg-install: libogg
1269 @$(SEP)
1270 ifneq ($(MEDIA_SERVER_STATIC),y)
1271 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1272 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1273 endif
1275 flac/stamp-h1: libogg
1276 cd flac && \
1277 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1278 CPPFLAGS="-I$(TOP)/libogg/include" \
1279 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1280 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1281 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1282 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1283 touch flac/stamp-h1
1285 flac: flac/stamp-h1 libogg
1286 @$(MAKE) -C flac/src/libFLAC all
1288 flac-clean:
1289 -@$(MAKE) -C flac clean
1290 @rm -f flac/stamp-h1
1292 flac-install: flac
1293 @$(SEP)
1294 ifneq ($(MEDIA_SERVER_STATIC),y)
1295 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1296 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1297 endif
1299 jpeg/stamp-h1:
1300 cd jpeg && \
1301 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1302 touch jpeg/stamp-h1
1304 jpeg: jpeg/stamp-h1
1305 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so
1307 jpeg-clean:
1308 -@$(MAKE) -C jpeg clean
1309 @rm -f jpeg/stamp-h1 jpeg/Makefile
1311 jpeg-install: jpeg
1312 @$(SEP)
1313 ifneq ($(MEDIA_SERVER_STATIC),y)
1314 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1315 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1316 endif
1318 libexif/stamp-h1:
1319 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1320 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1321 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1322 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1323 touch libexif/stamp-h1
1325 libexif: libexif/stamp-h1
1326 @$(MAKE) -C libexif all
1328 libexif-clean:
1329 -@$(MAKE) -C libexif clean
1330 @rm -f libexif/stamp-h1
1332 libexif-install: libexif
1333 @$(SEP)
1334 ifneq ($(MEDIA_SERVER_STATIC),y)
1335 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1336 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1337 endif
1339 zlib/stamp-h1:
1340 cd zlib && \
1341 CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1342 ./configure --shared --prefix=''
1343 touch zlib/stamp-h1
1345 zlib: zlib/stamp-h1
1346 @$(MAKE) -C zlib CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) all
1348 zlib-clean:
1349 -@$(MAKE) -C zlib clean
1350 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1352 zlib-install: zlib
1353 @$(SEP)
1354 ifneq ($(MEDIA_SERVER_STATIC),y)
1355 install -d $(INSTALLDIR)/zlib/usr/lib
1356 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1357 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1358 endif
1359 ifeq ($(TCONFIG_BT),y)
1360 install -d $(INSTALLDIR)/zlib/usr/lib
1361 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1362 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1363 endif
1364 ifeq ($(TCONFIG_TOR),y)
1365 install -d $(INSTALLDIR)/zlib/usr/lib
1366 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1367 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1368 endif
1370 libid3tag/stamp-h1: zlib
1371 cd libid3tag && \
1372 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1373 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1374 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1375 --disable-debugging --disable-profiling
1376 touch libid3tag/stamp-h1
1378 libid3tag: libid3tag/stamp-h1 zlib
1379 @$(MAKE) -C libid3tag all
1381 libid3tag-clean:
1382 -@$(MAKE) -C libid3tag clean
1383 @rm -f libid3tag/stamp-h1
1385 libid3tag-install: libid3tag
1386 @$(SEP)
1387 ifneq ($(MEDIA_SERVER_STATIC),y)
1388 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1389 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1390 endif
1392 libvorbis/stamp-h1: libogg
1393 cd libvorbis && \
1394 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1395 CPPFLAGS="-I$(TOP)/libogg/include" \
1396 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1397 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1398 --with-ogg-includes="$(TOP)/libogg/include" \
1399 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1400 touch libvorbis/stamp-h1
1402 libvorbis: libvorbis/stamp-h1
1403 @$(MAKE) -C libvorbis/lib all
1405 libvorbis-clean:
1406 -@$(MAKE) -C libvorbis clean
1407 @rm -f libvorbis/stamp-h1
1409 libvorbis-install: libvorbis
1410 @$(SEP)
1411 ifneq ($(MEDIA_SERVER_STATIC),y)
1412 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1413 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1414 endif
1416 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1417 @$(SEP)
1418 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna
1421 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1422 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1423 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1424 $(CONFIGURE) --prefix=/usr
1426 igmpproxy: igmpproxy/src/Makefile
1427 @$(SEP)
1428 @$(MAKE) -C igmpproxy/src
1430 igmpproxy-install: igmpproxy
1431 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1432 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1434 igmpproxy-clean:
1435 -@$(MAKE) -C igmpproxy/src clean
1436 @rm -f igmpproxy/src/Makefile
1438 udev:
1439 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1440 PROGRAMS=udevtrigger
1442 udev-install: udev
1443 install -d $(INSTALLDIR)
1444 install -d $(TARGETDIR)
1445 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1447 hotplug2:
1448 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1450 hotplug2-install: hotplug2
1451 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1452 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1454 emf:
1455 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1457 emf-install: emf
1458 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1460 igs:
1461 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1463 igs-install: igs
1464 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1466 wanuptime: nvram shared
1467 @$(SEP)
1468 @$(MAKE) -C wanuptime
1470 wanuptime-clean:
1471 -@$(MAKE) -C wanuptime clean
1473 wanuptime-install:
1474 install -D wanuptime/wanuptime $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1475 $(STRIP) $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1477 ebtables: dummy
1478 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1479 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1480 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1482 ebtables-install: ebtables
1483 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1485 @mkdir -p $(TARGETDIR)/rom/etc
1486 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1487 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1489 install -d $(INSTALLDIR)/ebtables/usr/lib
1490 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1491 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1492 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1494 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1495 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1496 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1498 ebtables-clean:
1499 -@$(MAKE) -C ebtables clean
1501 #Roadkill
1502 glib/stamp-h1:
1503 @$(SEP)
1504 @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 \
1505 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 \
1506 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 \
1507 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 \
1508 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
1509 @$(MAKE) -C glib
1510 touch glib/stamp-h1
1512 glib: glib/stamp-h1
1514 glib-clean:
1515 -@$(MAKE) -C glib clean
1516 rm -f glib/stamp-h1
1518 glib-install: glib
1519 @$(MAKE) -C glib DESTDIR=$(INSTALLDIR)/glib install
1521 #Roadkill
1522 nocat/stamp-h1: glib-install
1523 @$(SEP)
1524 @cd nocat && \
1525 NC_CONF_PATH="/" \
1526 $(CONFIGURE) --with-firewall=iptables --with-glib-prefix="$(INSTALLDIR)/glib/usr" --localstatedir=/var --sysconfdir=/etc
1527 @$(MAKE) -C nocat
1529 echo *** integrate glib to nocat installdir
1530 install -d $(INSTALLDIR)/nocat/usr/lib
1531 install -D glib/.libs/libglib-1.2.so.0.0.10 $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1532 cd $(INSTALLDIR)/nocat/usr/lib && ln -s libglib-1.2.so.0.0.10 libglib-1.2.so.0
1533 $(STRIP) $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1534 touch nocat/stamp-h1
1536 nocat: nocat/stamp-h1
1538 nocat-clean:
1539 -@$(MAKE) -C nocat clean
1540 rm -f nocat/stamp-h1
1542 nocat-install:
1543 install -D nocat/src/splashd $(INSTALLDIR)/nocat/usr/sbin/splashd
1544 $(STRIP) $(INSTALLDIR)/nocat/usr/sbin/splashd
1545 mkdir -p $(INSTALLDIR)/nocat/usr/libexec/nocat
1546 install -D nocat/libexec/iptables/* $(INSTALLDIR)/nocat/usr/libexec/nocat
1548 lzo/stamp-h1:
1549 cd lzo && \
1550 CFLAGS="-Os -Wall $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
1551 touch lzo/stamp-h1
1553 lzo: lzo/stamp-h1
1555 lzo-clean:
1556 -@$(MAKE) -C lzo clean
1557 @rm -f lzo/stamp-h1
1559 lzo-install: lzo
1560 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1561 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1562 cd $(INSTALLDIR)/lzo/usr/lib && ln -sf liblzo2.so.2 liblzo2.so
1565 openvpn: openvpn/.conf openssl lzo
1567 openvpn/.conf:
1568 cd openvpn && CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1569 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1570 CPPFLAGS="-I$(TOP)/lzo/include -I$(TOP)/openssl/include" \
1571 $(CONFIGURE) --prefix= \
1572 --with-crypto-library=openssl \
1573 --with-iproute-path="/usr/sbin/ip" \
1574 --disable-debug --disable-plugins --enable-management --enable-small \
1575 --disable-selinux --disable-socks --enable-password-save \
1576 OPENSSL_SSL_CFLAGS="-I$(TOP)/openssl/include" \
1577 OPENSSL_SSL_LIBS="-L$(TOP)/openssl -lssl" \
1578 ac_cv_lib_resolv_gethostbyname=no
1579 touch openvpn/.conf
1581 openvpn-clean:
1582 -@$(MAKE) -C openvpn clean
1583 @rm -f openvpn/.conf
1585 openvpn-install: openvpn
1586 install -D openvpn/src/openvpn/.libs/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1587 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1588 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1590 #shibby
1591 libcurl/stamp-h1: zlib openssl
1592 cd libcurl && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1593 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1594 CPPFLAGS="-I$(TOP)/zlib" \
1595 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1596 $(CONFIGURE) --prefix=/usr --disable-thread --enable-shared --enable-static \
1597 --enable-ares --enable-cookies --enable-crypto-auth --enable-nonblocking \
1598 --enable-file --enable-ftp --enable-http --enable-ipv6 --enable-tftp \
1599 --disable-nls --disable-ares --disable-dict --disable-debug --disable-gopher \
1600 --disable-ldap --disable-manual --disable-telnet --disable-verbose \
1601 --with-random="/dev/urandom" --with-ssl="$(TOP)/openssl" \
1602 --without-gnutls --without-krb4 --without-libidn \
1603 --with-linux-headers=$(LINUXDIR)/include \
1604 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
1605 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
1606 touch libcurl/stamp-h1
1608 libcurl: libcurl/stamp-h1
1609 @$(MAKE) -C libcurl
1611 libcurl-clean:
1612 -@$(MAKE) -C libcurl clean
1613 @rm -f libcurl/stamp-h1 libcurl/Makefile
1615 libcurl-install: libcurl
1616 install -d $(INSTALLDIR)/libcurl/usr/lib
1617 install -D libcurl/lib/.libs/libcurl.so.4.2.0 $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.2.0
1618 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.2.0
1619 cd $(INSTALLDIR)/libcurl/usr/lib/ && \
1620 ln -sf libcurl.so.4.2.0 libcurl.so.4 && \
1621 ln -sf libcurl.so.4.2.0 libcurl.so
1623 libevent/stamp-h1:
1624 cd libevent && CC=$(CC) \
1625 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1626 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1627 $(CONFIGURE)
1628 touch libevent/stamp-h1
1630 libevent: libevent/stamp-h1
1631 @$(SEP)
1632 $(MAKE) -C libevent
1633 $(MAKE) -C libevent DESTDIR=$(TOP)/libevent/staged install
1635 libevent-clean:
1636 -@$(MAKE) -C libevent clean
1637 @rm -f libevent/stamp-h1 libevent/Makefile
1638 @rm -rf libevent/staged
1640 libevent-install: libevent
1641 install -d $(INSTALLDIR)/libevent/usr/lib
1642 install libevent/.libs/libevent-2.0.so.5.1.6 $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
1643 $(STRIP) -s $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
1645 libiconv/stamp-h1:
1646 cd libiconv && CC=$(CC) \
1647 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1648 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1649 $(CONFIGURE) --prefix=/usr --disable-nls --enable-static
1650 touch libiconv/stamp-h1
1652 libiconv: libiconv/stamp-h1
1653 @$(SEP)
1654 $(MAKE) -C libiconv
1656 libiconv-clean:
1657 -@$(MAKE) -C libiconv clean
1658 @rm -f libiconv/stamp-h1 libiconv/Makefile
1660 libiconv-install: libiconv
1661 install -d $(INSTALLDIR)/libiconv/usr/lib
1662 install libiconv/lib/.libs/libiconv.so.2.4.0 $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2
1663 $(STRIP)-s $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2
1665 transmission/stamp-h1: openssl libcurl libevent zlib
1666 cd transmission && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1667 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
1668 --param large-function-growth=800 --param max-inline-insns-single=3000 \
1669 -ffunction-sections -fdata-sections" \
1670 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1671 CPPFLAGS="-I$(TOP)/zlib" \
1672 HAVE_CXX=yes \
1673 $(CONFIGURE) --target=mipsel-linux --prefix=/usr --disable-nls \
1674 --enable-lightweight --enable-largefile --enable-utp --without-gtk \
1675 LIBCURL_CFLAGS="-I$(TOP)/libcurl/include" \
1676 LIBCURL_LIBS="-L$(TOP)/libcurl/lib/.libs/ -lcurl" \
1677 LIBEVENT_CFLAGS="-I$(TOP)/libevent/include" \
1678 LIBEVENT_LIBS="-L$(TOP)/libevent/.libs -levent" \
1679 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
1680 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
1681 touch transmission/stamp-h1
1683 transmission: transmission/stamp-h1
1684 @$(SEP)
1685 $(MAKE) -C transmission
1687 transmission-clean:
1688 -@$(MAKE) -C transmission clean
1689 @rm -f transmission/stamp-h1 transmission/Makefile
1691 transmission-install: transmission
1692 $(MAKE) -C transmission DESTDIR=$(INSTALLDIR)/transmission install-strip
1693 @rm -rf $(INSTALLDIR)/transmission/usr/share/man
1694 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-cli
1695 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-show
1696 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-edit
1697 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-create
1698 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-daemon
1699 ifeq ($(TCONFIG_TR_EXTRAS),y)
1700 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-remote
1701 else
1702 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-remote
1703 endif
1705 btgui:
1706 @$(SEP)
1708 btgui-install: btgui
1709 install -d $(INSTALLDIR)/btgui/usr/bin
1710 install -D transmission/btcheck $(INSTALLDIR)/btgui/usr/bin/btcheck
1712 libnfsidmap/stamp-h1:
1713 cd libnfsidmap && \
1714 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1715 ac_cv_func_malloc_0_nonnull=yes \
1716 ac_cv_func_realloc_0_nonnull=yes \
1717 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
1718 touch libnfsidmap/stamp-h1
1720 libnfsidmap: libnfsidmap/stamp-h1
1721 @$(SEP)
1722 $(MAKE) -C libnfsidmap
1724 libnfsidmap-clean:
1725 -@$(MAKE) -C libnfsidmap clean
1726 @rm -f libnfsidmap/stamp-h1
1727 @rm -rf libnfsidmap/staged
1729 libnfsidmap-install: libnfsidmap
1730 install -d $(TOP)/libnfsidmap/staged
1731 $(MAKE) -C libnfsidmap DESTDIR=$(TOP)/libnfsidmap/staged install
1733 portmap/stamp-h1:
1734 cd portmap \
1735 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1736 $(MAKE) -C portmap CC=$(CC) AR=$(AR) LD=$(LD) RANLIB=$(RANLIB) RPCUSER="nobody"
1737 touch portmap/stamp-h1
1739 portmap: portmap/stamp-h1
1740 @$(SEP)
1741 $(MAKE) -C portmap
1743 portmap-clean:
1744 -@$(MAKE) -C portmap clean
1745 @rm -f portmap/stamp-h1
1747 portmap-install: portmap
1748 install -d $(INSTALLDIR)/portmap/usr/sbin
1749 install -D portmap/portmap $(INSTALLDIR)/portmap/usr/sbin/portmap
1750 $(STRIP) -s $(INSTALLDIR)/portmap/usr/sbin/portmap
1752 e2fsprogs/stamp-h1:
1753 cd e2fsprogs && \
1754 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1755 $(CONFIGURE) --prefix=$(TOP)/e2fsprogs/staged --enable-shared --enable-static
1756 touch e2fsprogs/stamp-h1
1758 e2fsprogs: e2fsprogs/stamp-h1
1759 @$(SEP)
1760 $(MAKE) -C e2fsprogs
1762 e2fsprogs-clean:
1763 -@$(MAKE) -C e2fsprogs clean
1764 @rm -f e2fsprogs/stamp-h1
1765 @rm -f e2fsprogs/Makefile
1766 @rm -rf e2fsprogs/staged
1768 nfs-utils/stamp-h1: libevent-install e2fsprogs portmap libnfsidmap-install
1769 cd nfs-utils && STRIP='mipsel-uclibc-strip' \
1770 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
1771 -I$(TOP)/libevent/staged/usr/local/include -I$(TOP)/e2fsprogs/lib \
1772 -I$(TOP)/libnfsidmap/staged/usr/include -ffunction-sections -fdata-sections" \
1773 LDFLAGS="-L$(TOP)/libevent/staged/usr/local/lib -L$(TOP)/e2fsprogs/lib \
1774 -L$(TOP)/libnfsidmap/staged/usr/lib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1775 ac_cv_func_malloc_0_nonnull=yes \
1776 ac_cv_func_realloc_0_nonnull=yes \
1777 $(CONFIGURE) --disable-gss --without-tcp-wrappers --enable-static --enable-shared \
1778 --enable-nfsv4 --enable-nfsv3
1779 touch nfs-utils/stamp-h1
1781 nfs-utils: nfs-utils/stamp-h1
1783 nfs-utils-clean:
1784 -@$(MAKE) -C nfs-utils clean
1785 @rm -f nfs-utils/stamp-h1
1787 nfs-utils-install: nfs-utils
1788 install -d $(INSTALLDIR)/nfs-utils/usr/sbin
1789 install -D nfs-utils/utils/mount/mount.nfs $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
1790 install -D nfs-utils/utils/nfsd/nfsd $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
1791 install -D nfs-utils/utils/showmount/showmount $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
1792 install -D nfs-utils/utils/exportfs/exportfs $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
1793 install -D nfs-utils/utils/statd/statd $(INSTALLDIR)/nfs-utils/usr/sbin/statd
1794 install -D nfs-utils/utils/mountd/mountd $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
1795 install -D nfs-utils/nfs.rc $(INSTALLDIR)/nfs-utils/usr/sbin/nfs.rc
1796 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
1797 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
1798 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
1799 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
1800 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/statd
1801 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
1803 sd-idle/stamp-h1:
1804 cd sd-idle \
1805 CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
1806 $(MAKE) -C sd-idle
1807 chmod 0755 sd-idle/sd-idle
1808 touch sd-idle/stamp-h1
1810 sd-idle-clean:
1811 -@$(MAKE) -C sd-idle clean
1812 @rm -f sd-idle/stamp-h1
1814 sd-idle-install: sd-idle/stamp-h1
1815 install -d $(INSTALLDIR)/sd-idle/usr/bin
1816 install -D sd-idle/sd-idle $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
1817 $(STRIP) -s $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
1819 snmp/stamp-h1:
1820 cd snmp && \
1821 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1822 $(CONFIGURE) --prefix=/usr --with-endianness=little --enable-mini-agent --disable-debugging \
1823 --disable-privacy --without-opaque-special-types --with-persistent-directory=/tmp/snmp-persist \
1824 --with-default-snmp-version=3 --with-sys-contact=root --with-sys-location=Unknown --with-logfile=/dev/null \
1825 --with-out-transports=UDPIPv6,TCPIPv6,AAL5PVC,IPX,TCP,Unix --enable-shared=no --enable-static --with-gnu-ld \
1826 --enable-internal-md5 --with-copy-persistent-files=no --without-openssl -sysconfdir=/tmp \
1827 --with-mib-modules=mibII,host,mibII/ip,mibII/tcp,mibII/udp,mibII/icmp,mibII/var_route,mibII/kernel_linux,qos,ucd_snmp \
1828 --with-out-mib-modules=snmpv3mibs,agent_mips,agentx,notification,utilities,target --disable-ipv6 --with-defaults \
1829 --without-efence --without-rsaref --without-kmem-usage --without-rpm --without-dmalloc
1830 touch snmp/stamp-h1
1832 snmp: snmp/stamp-h1
1833 @$(SEP)
1834 $(MAKE) -C snmp
1836 snmp-clean:
1837 -@$(MAKE) -C snmp clean
1838 @rm -f snmp/stamp-h1
1840 snmp-install: snmp
1841 install -D snmp/agent/snmpd $(INSTALLDIR)/snmp/usr/sbin/snmpd
1842 $(STRIP) $(INSTALLDIR)/snmp/usr/sbin/snmpd
1844 apcupsd/stamp-h1:
1845 cd apcupsd && touch autoconf/variables.mak && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1846 $(MAKE) configure && \
1847 LDFLAGS="-L$(TOOLCHAIN)/lib -ffunction-sections -fdata-sections" \
1848 $(CONFIGURE) --prefix=/usr --without-x --enable-shared --enable-static --enable-usb --disable-pcnet --enable-cgi \
1849 --disable-lgd --enable-net --enable-powerflute --sysconfdir=/usr/local/apcupsd --bindir=/bin \
1850 --disable-dumb --disable-snmp --disable-net-snmp --with-cgi-bin=/www/apcupsd --with-serial-dev= \
1851 touch apcupsd/stamp-h1
1853 apcupsd: apcupsd/stamp-h1
1854 $(MAKE) -C apcupsd
1856 apcupsd-clean:
1857 -@$(MAKE) -C apcupsd clean
1858 @rm -f apcupsd/stamp-h1
1859 @rm -f apcupsd/config*
1861 apcupsd-install: apcupsd
1862 $(MAKE) -C apcupsd DESTDIR=$(INSTALLDIR)/apcupsd install
1863 @rm -rf $(INSTALLDIR)/apcupsd/sbin/apctest
1864 @rm -rf $(INSTALLDIR)/apcupsd/www/apcupsd/ups*.cgi
1865 $(STRIP) $(INSTALLDIR)/apcupsd/sbin/*
1866 $(STRIP) $(INSTALLDIR)/apcupsd/www/apcupsd/*
1868 dnscrypt/stamp-h1:
1869 cd $(TOP)/dnscrypt && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1870 $(CONFIGURE) --prefix=/usr --disable-ssp
1871 touch dnscrypt/stamp-h1
1873 dnscrypt: dnscrypt/stamp-h1
1875 dnscrypt-install: dnscrypt
1876 install -D dnscrypt/src/proxy/dnscrypt-proxy $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
1877 install -D dnscrypt/src/hostip/hostip $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
1878 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
1879 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
1881 dnscrypt-clean:
1882 -@$(MAKE) -c dnscrypt clean
1883 @rm -rf dnscrypt/stamp-h1 dnscrypt/src/dnscrypt-proxy/.deps dnscrypt/Makefile
1885 tor/stamp-h1: openssl zlib libevent
1886 cd $(TOP)/tor && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1887 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1888 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1889 $(CONFIGURE) --prefix=/usr --with-libevent-dir=$(TOP)/libevent/staged/usr/local \
1890 --with-openssl-dir=$(TOP)/openssl --with-zlib-dir=$(TOP)/zlib
1891 touch tor/stamp-h1
1893 tor: tor/stamp-h1
1895 tor-install: tor
1896 install -D tor/src/or/tor $(INSTALLDIR)/tor/usr/sbin/tor
1897 $(STRIP) -s $(INSTALLDIR)/tor/usr/sbin/tor
1899 tor-clean:
1900 -@$(MAKE) -c tor clean
1901 @rm -rf tor/stamp-h1 tor/Makefile
1903 mdadm:
1905 mdadm-install: mdadm
1906 install -D mdadm/mdadm $(INSTALLDIR)/mdadm/usr/sbin/mdadm
1907 $(STRIP) -s $(INSTALLDIR)/mdadm/usr/sbin/mdadm
1909 mdadm-clean:
1910 -@$(MAKE) -c mdadm clean
1913 # Generic rules
1917 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
1920 %-clean:
1921 @-[ ! -d $* ] || $(MAKE) -C $* clean
1923 %-distclean:
1924 @-[ ! -d $* ] || $(MAKE) -C $* distclean
1926 %-install: %
1927 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
1929 %-build:
1930 $(MAKE) $*-clean $*
1932 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
1934 .PHONY: all clean distclean mrproper install package
1935 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
1936 .PHONY: dummy libnet libpcap