rc: support for Broadcom EMF and IGMP snooping in K26 builds (except Mini/Lite)
[tomato.git] / release / src / router / Makefile
blobeef6f4ba292416d0aaeac6e519419a8ee6998879
2 # Broadcom Linux Router Makefile
4 # Copyright 2005, Broadcom Corporation
5 # All Rights Reserved.
7 # THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8 # KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9 # SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10 # FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
14 include common.mak
16 #TOMATO_EXPERIMENTAL=0
21 SEP=echo "\033[41;1m $@ \033[0m"
24 # standard packages
26 obj-y += lzma-loader
27 obj-y += nvram
28 obj-y += shared
29 obj-y += prebuilt
30 obj-y += igmpproxy
31 obj-y += iptables
32 obj-y += rc
33 obj-y += iproute2
34 obj-y += rom
35 obj-y += others
36 obj-y += busybox
37 obj-y += httpd
38 obj-y += www
39 obj-y += bridge
40 obj-y += dnsmasq
41 obj-y += etc
42 # obj-y += vlan # use Busybox vconfig
43 obj-y += ppp
44 obj-y += ttcp
45 obj-y += utils
46 obj-y += ntpc
47 obj-y += rstats
49 # !!TB - updated Broadcom Wireless driver
50 obj-y += et
51 obj-y += libbcmcrypto
52 obj-y += wlconf
54 obj-y += mssl
55 obj-y += mdu
57 # !!TB
58 obj-$(TCONFIG_USB) += p910nd
59 obj-$(TCONFIG_USB) += scsi-idle
60 obj-y += libusb10
61 #obj-y += libusb
62 obj-y += usbmodeswitch
63 obj-$(TCONFIG_FTP) += vsftpd
65 ifeq ($(CONFIG_LINUX26),y)
66 ifeq ($(TCONFIG_SAMBASRV),y)
67 NEED_EX_NLS = y
68 endif
69 ifeq ($(TCONFIG_USB_EXTRAS),y)
70 NEED_EX_USB = y
71 endif
72 endif
74 ifeq ($(TCONFIG_SAMBASRV),y)
75 ifeq ($(TCONFIG_SAMBA3),y)
76 NEED_SAMBA3 = y
77 else
78 NEED_SAMBA2 = y
79 endif
80 endif
82 ifeq ($(TCONFIG_IPV6),y)
83 export TCONFIG_IPV6 := y
84 else
85 TCONFIG_IPV6 :=
86 endif
88 obj-$(NEED_SAMBA2) += samba
89 obj-$(NEED_SAMBA3) += samba3
90 obj-$(TCONFIG_NTFS) += ntfs-3g
91 obj-$(TCONFIG_EBTABLES) += ebtables
92 obj-$(TCONFIG_IPV6) += radvd
94 obj-$(TCONFIG_MEDIA_SERVER) += zlib
95 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
96 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
97 obj-$(TCONFIG_MEDIA_SERVER) += libogg
98 obj-$(TCONFIG_MEDIA_SERVER) += flac
99 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
100 obj-$(TCONFIG_MEDIA_SERVER) += libexif
101 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
102 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
103 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
104 MEDIA_SERVER_STATIC=y
106 obj-y += miniupnpd
107 # obj-y += upnp
111 # configurable packages
113 obj-$(TCONFIG_L2TP) += xl2tpd
114 obj-$(TCONFIG_PPTP) += accel-pptp
115 obj-$(TCONFIG_HTTPS) += openssl
116 obj-$(TCONFIG_HTTPS) += matrixssl
117 obj-$(TCONFIG_SSH) += dropbear
118 obj-$(TCONFIG_ZEBRA) += zebra
119 # obj-$(TCONFIG_IPP2P) += ipp2p
120 obj-$(TCONFIG_LZO) += lzo
121 obj-$(TCONFIG_OPENVPN) += openvpn
122 obj-$(TCONFIG_EMF) += emf
123 obj-$(TCONFIG_EMF) += igs
125 ifeq ($(TCONFIG_L2TP),y)
126 NEED_PPPD = y
127 endif
128 ifeq ($(TCONFIG_PPTP),y)
129 NEED_PPPD = y
130 endif
131 obj-$(NEED_PPPD) += pppd
133 obj-$(CONFIG_LINUX26) += hotplug2
134 obj-$(CONFIG_LINUX26) += udev
136 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
137 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
142 # Basic rules
145 all: clean-build libc $(obj-y) kernel
148 kernel: $(LINUXDIR)/.config
149 @$(SEP)
151 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
152 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC); \
154 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
155 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC); \
157 ifeq ($(CONFIG_LINUX26),y)
158 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR)
159 endif
162 lzma-loader:
163 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD)
165 lzma-loader-install: lzma-loader
166 @$(SEP)
169 kmod: dummy
170 $(MAKE) -C $(LINUXDIR) modules
172 testfind:
173 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
174 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
176 install package: $(obj-install) $(LINUXDIR)/.config
177 @$(SEP)
179 install -d $(TARGETDIR)
182 # kernel modules
183 $(MAKE) -C $(LINUXDIR) modules_install DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
184 ##!!TB find $(TARGETDIR)/lib/modules -name *.o -exec mipsel-linux-strip --strip-unneeded {} \;
185 find $(TARGETDIR)/lib/modules -name *.o -exec $(STRIP) --strip-debug {} \;
186 find $(TARGETDIR)/lib/modules -name *.ko -exec $(STRIP) --strip-debug {} \;
188 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
190 # nice and clean
191 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
192 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
193 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
194 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
195 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
196 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
197 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
198 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
199 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
200 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
202 ##!!TB
203 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
204 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
205 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
206 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
207 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
208 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
209 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
210 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
211 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
212 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
213 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
214 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
215 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
216 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
217 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
218 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
219 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
220 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
221 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
222 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
223 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
224 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
225 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
226 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
227 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
228 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
229 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
230 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
231 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
232 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
233 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
234 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
235 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
236 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
237 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
238 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
239 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
241 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
242 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
243 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
244 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
245 cd $(TARGETDIR)/lib/modules && rm -f */source || true
247 # misc
248 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
249 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
250 done
252 ifneq ($(TCONFIG_L7),y)
253 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
254 endif
256 # uClibc
257 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
258 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
259 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
260 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
261 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
262 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
263 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
264 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
265 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
266 ifeq ($(TCONFIG_SSH),y)
267 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
268 endif
269 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
270 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
271 $(STRIP) $(TARGETDIR)/lib/*.so.0
272 endif
274 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
276 @echo ---
278 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
279 @../btools/libfoo.pl
280 else
281 @../btools/libfoo.pl --noopt
282 endif
283 @chmod 0555 $(TARGETDIR)/lib/*.so*
284 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
286 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
287 # separated/copied extra stuff
288 @rm -rf $(PLATFORMDIR)/extras
289 @mkdir $(PLATFORMDIR)/extras
290 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
292 $(if $(TCONFIG_OPENVPN),@cp -f,$(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/tun.*o $(PLATFORMDIR)/extras/ || true
293 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
295 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
296 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
297 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
298 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
299 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
300 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
301 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
302 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
303 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
304 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
305 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
306 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
307 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
308 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
309 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
310 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
312 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
313 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
314 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
315 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*acm.*o $(PLATFORMDIR)/extras/ || true
316 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
317 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
319 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
320 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
321 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
322 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
323 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
324 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
325 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
326 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
327 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
328 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_ether.*o $(PLATFORMDIR)/extras/ || true
329 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
330 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/usbnet.*o $(PLATFORMDIR)/extras/ || true
331 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/rndis_host.*o $(PLATFORMDIR)/extras/ || true
332 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb || true
333 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
334 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
335 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
336 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
337 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
338 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
339 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
340 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
341 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
342 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
343 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
344 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
345 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
346 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
347 @mv $(TARGETDIR)/lib/modules/*/kernel/crypto/* $(PLATFORMDIR)/extras/ || true
348 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/crypto || true
350 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
351 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
352 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
353 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
354 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
355 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
356 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
358 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
359 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
360 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
361 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
362 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
363 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
364 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
365 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
366 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
367 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
368 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
369 ifneq ($(TCONFIG_USB),y)
370 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
371 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
372 endif
374 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
375 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
376 ifneq ($(TCONFIG_USB_EXTRAS),y)
377 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
378 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
379 endif
380 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
381 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
382 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
383 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
384 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
385 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
386 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
388 @mkdir -p $(PLATFORMDIR)/extras/apps
389 @mkdir -p $(PLATFORMDIR)/extras/lib
391 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
392 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
393 @mv $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
395 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
396 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
397 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
398 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
399 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
400 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
401 ifneq ($(NEED_EX_USB),y)
402 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
403 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
404 endif
405 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
407 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
408 ifeq ($(TCONFIG_L7PAT),y)
409 @cd layer7 && ./squish.sh
410 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
411 endif
413 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
414 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
415 @echo ---
417 @rm -f $(TARGETDIR)/lib/modules/*/build
419 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
420 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -nopad | tee target.info
422 # Package kernel and filesystem
423 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
424 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
425 # $(MAKE) -C $(LINUXDIR) zImage ; \
426 # else \
427 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
428 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
429 # fi
431 # Pad self-booting Linux to a 64 KB boundary
432 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
433 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
434 # Append filesystem to self-booting Linux
435 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
438 libc: $(LIBDIR)/ld-uClibc.so.0
439 # $(MAKE) -C ../../../tools-src/uClibc all
440 # $(MAKE) -C ../../../tools-src/uClibc install
444 # cleaners
447 clean: clean-build $(obj-clean)
448 rm -rf layer7/squished
449 make -C config clean
451 clean-build: dummy
452 rm -rf $(TARGETDIR)
453 rm -rf $(INSTALLDIR)
454 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
455 rm -rf $(PLATFORMDIR)/extras
457 distclean: clean
458 ifneq ($(INSIDE_MAK),1)
459 $(MAKE) -C .. $@ INSIDE_MAK=1
460 endif
461 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
464 # configuration
467 CONFIG_IN := config/config.in
469 config/conf config/mconf:
470 @$(MAKE) -C config
472 rconf: config/conf
473 @config/conf $(CONFIG_IN)
475 rmconf: config/mconf
476 @config/mconf $(CONFIG_IN)
478 roldconf: config/conf
479 @config/conf -o $(CONFIG_IN)
480 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dnsmasq-clean
481 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean openssl-clean mssl-clean mdu-clean ppp-clean
483 kconf:
484 @$(MAKE) -C $(LINUXDIR) config
486 kmconf:
487 @$(MAKE) -C $(LINUXDIR) menuconfig
489 koldconf:
490 @$(MAKE) -C $(LINUXDIR) oldconfig
491 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
493 bboldconf:
494 @$(MAKE) -C busybox oldconfig
496 config conf: rconf kconf
498 menuconfig mconf: rmconf kmconf
500 oldconfig oldconf: koldconf roldconf bboldconf
504 # overrides and extra dependencies
507 busybox: dummy
508 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)"
510 # V=1
512 busybox-install:
513 rm -rf $(INSTALLDIR)/busybox
514 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
516 busybox-clean:
517 $(MAKE) -C busybox distclean
519 busybox-config:
520 $(MAKE) -C busybox menuconfig
523 httpd: shared nvram mssl
524 @$(SEP)
525 @$(MAKE) -C httpd
527 www-install:
528 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
530 matrixssl:
531 @$(SEP)
532 @$(MAKE) -C matrixssl/src
534 matrixssl-install:
535 @true
537 matrixssl-clean:
538 $(MAKE) -C matrixssl/src clean
540 ifeq ($(TCONFIG_OPENVPN),y)
541 OPENSSL_CIPHERS:=enable-rc5
542 else
543 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-aes no-aes192 no-cast no-des no-modes no-tls1 no-tlsext
544 endif
546 openssl/stamp-h1:
547 cd openssl && \
548 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
549 -ffunction-sections -fdata-sections -Wl,--gc-sections \
550 shared $(OPENSSL_CIPHERS) \
551 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
552 no-seed no-capieng no-cms no-gms no-gmp no-rfc3779 \
553 no-ec no-ecdh no-ecdsa no-err no-hw no-jpake no-threads \
554 no-zlib no-engine no-engines no-sse2 no-perlasm \
555 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
557 @$(MAKE) -C openssl clean
558 @touch openssl/stamp-h1
560 openssl: openssl/stamp-h1
562 openssl-clean:
563 -@$(MAKE) -C openssl clean
564 @rm -f openssl/stamp-h1
566 openssl-install: openssl
567 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
568 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
569 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
571 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
572 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
573 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
575 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
577 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
578 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
580 ifeq ($(TCONFIG_FTP_SSL),y)
581 # !!TB
582 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
583 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
584 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
585 endif
587 ifeq ($(TCONFIG_OPENVPN),y)
588 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
589 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
590 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
591 endif
593 mssl: $(if $(TCONFIG_OPENVPN),openssl,matrixssl)
595 mdu: shared mssl
597 rc: nvram shared
599 bridge/Makefile:
600 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
601 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
603 bridge: bridge/Makefile
604 @$(SEP)
605 @$(MAKE) -C bridge
607 bridge-clean:
608 -@$(MAKE) -C bridge clean
609 @rm -f bridge/Makefile
611 bridge-install:
612 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
613 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
615 dnsmasq:
616 @$(SEP)
617 @$(MAKE) -C dnsmasq \
618 COPTS="$(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6) $(if $(TCONFIG_USB_EXTRAS),,-DNO_SCRIPT) $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
619 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC"
621 dnsmasq-install:
622 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
623 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
625 iptables:
626 @$(SEP)
627 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS)"
629 iptables-install:
630 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
631 cd $(INSTALLDIR)/iptables/usr/sbin && \
632 ln -sf iptables iptables-restore
634 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
635 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
637 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
639 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
640 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
641 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
643 ifeq ($(TCONFIG_IPV6),y)
644 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
645 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
646 cd $(INSTALLDIR)/iptables/usr/sbin && \
647 ln -sf ip6tables ip6tables-restore
648 endif
650 iptables-clean:
651 -$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
653 ppp:
654 @$(SEP)
655 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
656 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
658 ppp-%:
659 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
662 upnp: nvram shared iptables
664 miniupnpd: iptables
665 @$(SEP)
666 $(MAKE) -C miniupnpd -f Makefile.tomato
668 miniupnpd-clean:
669 -$(MAKE) -C miniupnpd -f Makefile.tomato clean
671 miniupnpd-install:
672 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
673 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
675 # !!TB
676 shared: busybox
678 vsftpd: openssl
679 @$(SEP)
680 $(MAKE) -C vsftpd
682 vsftpd-install:
683 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
684 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
686 ntfs-3g/Makefile:
687 cd ntfs-3g && \
688 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
689 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
690 $(CONFIGURE) --enable-shared=no --enable-static=no \
691 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
692 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
694 ntfs-3g: ntfs-3g/Makefile
695 @$(MAKE) -C ntfs-3g
697 ntfs-3g-clean:
698 -@$(MAKE) -C ntfs-3g clean
699 @rm -f ntfs-3g/Makefile
701 ntfs-3g-install: ntfs-3g
702 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
703 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
704 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
705 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
706 ln -sf ../bin/ntfs-3g mount.ntfs
708 libusb10/Makefile: libusb10/Makefile.in
709 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
710 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
712 libusb10: libusb10/Makefile
713 $(MAKE) -C $@
715 libusb10-install: libusb10
716 install -D libusb10/libusb/.libs/libusb-1.0.so.0.0.0 $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so.0
717 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so.*
718 cd $(INSTALLDIR)/libusb10/usr/lib && \
719 ln -sf libusb-1.0.so.0 libusb-1.0.so.0.0.0 && \
720 ln -sf libusb-1.0.so.0 libusb-1.0.so
722 libusb/Makefile: libusb/Makefile.in
723 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
724 $(CONFIGURE) --prefix=/usr \
725 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
726 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
727 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
729 libusb: libusb10 libusb/Makefile
730 $(MAKE) -C $@
732 libusb-install: libusb
733 install -D libusb/libusb/.libs/libusb-0.1.so.4.4.4 $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so.4
734 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so.*
735 cd $(INSTALLDIR)/libusb/usr/lib && \
736 ln -sf libusb-0.1.so.4 libusb-0.1.so.4.4.4 && \
737 ln -sf libusb-0.1.so.4 libusb.so
739 usbmodeswitch: libusb10
740 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
741 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
742 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
744 usbmodeswitchdb-install:
745 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
746 # compress whitespace
747 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
748 F=`basename $$D`; \
749 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
750 done
752 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
753 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
754 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
755 @mkdir -p $(TARGETDIR)/rom/etc
756 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
759 radvd/stamp-h: radvd/Makefile.in
760 cd radvd && CPPFLAGS="-Os $(EXTRACFLAGS)" $(CONFIGURE) --prefix=""
762 radvd: radvd/stamp-h
764 radvd-clean:
765 -@$(MAKE) -C radvd distclean
767 radvd-install:
768 install -D radvd/radvd $(INSTALLDIR)/radvd/usr/sbin/radvd
769 $(STRIP) $(INSTALLDIR)/radvd/usr/sbin/radvd
771 p910nd:
772 samba:
773 samba3:
775 nvram: shared
777 prebuilt: shared
779 vlan:
780 @$(SEP)
781 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
783 vlan-install:
784 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
785 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
788 pptp-client-install:
789 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
790 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
793 accel-pptp: pppd accel-pptp/Makefile
794 @$(MAKE) -C accel-pptp
796 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
797 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
798 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
800 accel-pptp-clean:
801 -@$(MAKE) -C accel-pptp clean
802 @rm -f accel-pptp/Makefile
804 accel-pptp-install: accel-pptp
805 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
806 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
809 pppd/Makefile: pppd/linux/Makefile.top
810 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
812 pppd: pppd/Makefile
813 @$(SEP)
814 @$(MAKE) -C pppd $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
816 pppd-clean:
817 -$(MAKE) -C pppd clean
818 @rm -f pppd/Makefile
820 pppd-install: pppd
821 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
822 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
823 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
824 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
825 ifeq ($(TCONFIG_L2TP),y)
826 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
827 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
828 endif
830 # ipupdate-install:
831 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
832 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
834 zebra/stamp-h1:
835 @cd zebra && rm -f config.cache && \
836 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
837 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
838 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
839 $(CONFIGURE) --sysconfdir=/etc \
840 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
841 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
842 @touch zebra/stamp-h1
844 zebra: zebra/stamp-h1
845 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
847 zebra-clean:
848 -@$(MAKE) -C zebra clean
849 @rm -f zebra/stamp-h1
851 zebra-install: zebra
852 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
853 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
854 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
855 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
856 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
857 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
860 rp-l2tp-install:
861 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
862 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
863 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
864 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
865 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
866 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
867 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
869 xl2tpd: pppd
870 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
872 xl2tpd-install: xl2tpd
873 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
874 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
877 bpalogin-install:
878 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
879 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
882 # libnet:
883 # @$(SEP)
884 # @-mkdir -p libnet/lib
885 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
887 # libpcap:
888 # @$(SEP)
889 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
891 libbcm:
892 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
894 libbcm-install:
895 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
896 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
899 iproute2-install:
900 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
901 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
902 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
903 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
906 ntpc: nvram shared
909 dropbear: dropbear/config.h
910 @$(SEP)
911 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1
913 dropbear-install:
914 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
915 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
916 cd $(INSTALLDIR)/dropbear/usr/bin && \
917 ln -sf dropbearmulti dropbear && \
918 ln -sf dropbearmulti dropbearconvert && \
919 ln -sf dropbearmulti dropbearkey && \
920 ln -sf dropbearmulti dbclient && \
921 ln -sf dropbearmulti ssh && \
922 ln -sf dropbearmulti scp
924 dropbear-clean:
925 -@$(MAKE) -C dropbear clean
926 @rm -f dropbear/config.h
928 dropbear/config.h:
929 cd dropbear && CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
930 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
931 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
932 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
933 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
934 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty
935 @$(MAKE) -C dropbear clean
937 # Media libraries
939 sqlite/stamp-h1:
940 cd sqlite && \
941 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
942 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
943 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
944 --disable-readline --disable-dynamic-extensions --enable-threadsafe
945 touch sqlite/stamp-h1
947 sqlite: sqlite/stamp-h1
948 @$(MAKE) -C sqlite all
950 sqlite-clean:
951 -@$(MAKE) -C sqlite clean
952 @rm -f sqlite/stamp-h1
954 sqlite-install: sqlite
955 @$(SEP)
956 ifneq ($(MEDIA_SERVER_STATIC),y)
957 install -D sqlite/.libs/libsqlite3.so.0 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
958 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
959 endif
961 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
963 FFMPEG_DECODERS:=aac ac3 atrac3 h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
964 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
966 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
967 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
969 FFMPEG_PROTOCOLS:=file
970 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
972 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
973 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
975 ffmpeg/stamp-h1: zlib
976 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
977 ./configure --enable-cross-compile --arch=mips --target_os=linux \
978 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
979 --enable-pthreads --enable-small --disable-encoders --disable-filters \
980 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
981 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
982 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
983 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
984 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
985 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
986 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
987 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
988 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
989 --extra-libs="-L$(TOP)/zlib -lz" \
990 --enable-zlib --disable-debug --prefix=''
991 touch ffmpeg/stamp-h1
993 ffmpeg: ffmpeg/stamp-h1 zlib
994 @$(MAKE) -C ffmpeg all
996 ffmpeg-clean:
997 -@$(MAKE) -C ffmpeg clean
998 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1000 ffmpeg-install: ffmpeg
1001 @$(SEP)
1002 ifneq ($(MEDIA_SERVER_STATIC),y)
1003 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1004 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1005 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1006 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1007 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1008 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1009 endif
1011 libogg/stamp-h1:
1012 cd libogg && \
1013 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1014 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1015 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1016 touch libogg/stamp-h1
1018 libogg: libogg/stamp-h1
1019 @$(MAKE) -C libogg all
1021 libogg-clean:
1022 -@$(MAKE) -C libogg clean
1023 @rm -f libogg/stamp-h1
1025 libogg-install: libogg
1026 @$(SEP)
1027 ifneq ($(MEDIA_SERVER_STATIC),y)
1028 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1029 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1030 endif
1032 flac/stamp-h1: libogg
1033 cd flac && \
1034 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1035 CPPFLAGS="-I$(TOP)/libogg/include" \
1036 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1037 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1038 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1039 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1040 touch flac/stamp-h1
1042 flac: flac/stamp-h1 libogg
1043 @$(MAKE) -C flac/src/libFLAC all
1045 flac-clean:
1046 -@$(MAKE) -C flac clean
1047 @rm -f flac/stamp-h1
1049 flac-install: flac
1050 @$(SEP)
1051 ifneq ($(MEDIA_SERVER_STATIC),y)
1052 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1053 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1054 endif
1056 jpeg/stamp-h1:
1057 cd jpeg && \
1058 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1059 touch jpeg/stamp-h1
1061 jpeg: jpeg/stamp-h1
1062 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so
1064 jpeg-clean:
1065 -@$(MAKE) -C jpeg clean
1066 @rm -f jpeg/stamp-h1 jpeg/Makefile
1068 jpeg-install: jpeg
1069 @$(SEP)
1070 ifneq ($(MEDIA_SERVER_STATIC),y)
1071 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1072 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1073 endif
1075 libexif/stamp-h1:
1076 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1077 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1078 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1079 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1080 touch libexif/stamp-h1
1082 libexif: libexif/stamp-h1
1083 @$(MAKE) -C libexif all
1085 libexif-clean:
1086 -@$(MAKE) -C libexif clean
1087 @rm -f libexif/stamp-h1
1089 libexif-install: libexif
1090 @$(SEP)
1091 ifneq ($(MEDIA_SERVER_STATIC),y)
1092 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1093 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1094 endif
1096 zlib/stamp-h1:
1097 cd zlib && \
1098 CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1099 ./configure --shared --prefix=''
1100 touch zlib/stamp-h1
1102 zlib: zlib/stamp-h1
1103 @$(MAKE) -C zlib CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) all
1105 zlib-clean:
1106 -@$(MAKE) -C zlib clean
1107 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1109 zlib-install: zlib
1110 @$(SEP)
1111 ifneq ($(MEDIA_SERVER_STATIC),y)
1112 install -d $(INSTALLDIR)/zlib/usr/lib
1113 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1114 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1115 endif
1117 libid3tag/stamp-h1: zlib
1118 cd libid3tag && \
1119 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1120 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1121 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1122 --disable-debugging --disable-profiling
1123 touch libid3tag/stamp-h1
1125 libid3tag: libid3tag/stamp-h1 zlib
1126 @$(MAKE) -C libid3tag all
1128 libid3tag-clean:
1129 -@$(MAKE) -C libid3tag clean
1130 @rm -f libid3tag/stamp-h1
1132 libid3tag-install: libid3tag
1133 @$(SEP)
1134 ifneq ($(MEDIA_SERVER_STATIC),y)
1135 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1136 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1137 endif
1139 libvorbis/stamp-h1: libogg
1140 cd libvorbis && \
1141 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1142 CPPFLAGS="-I$(TOP)/libogg/include" \
1143 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1144 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1145 --with-ogg-includes="$(TOP)/libogg/include" \
1146 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1147 touch libvorbis/stamp-h1
1149 libvorbis: libvorbis/stamp-h1
1150 @$(MAKE) -C libvorbis/lib all
1152 libvorbis-clean:
1153 -@$(MAKE) -C libvorbis clean
1154 @rm -f libvorbis/stamp-h1
1156 libvorbis-install: libvorbis
1157 @$(SEP)
1158 ifneq ($(MEDIA_SERVER_STATIC),y)
1159 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1160 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1161 endif
1163 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1164 @$(SEP)
1165 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna
1168 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1169 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1170 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1171 $(CONFIGURE) --prefix=/usr
1173 igmpproxy: igmpproxy/src/Makefile
1174 @$(SEP)
1175 @$(MAKE) -C igmpproxy/src
1177 igmpproxy-install: igmpproxy
1178 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1179 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1181 igmpproxy-clean:
1182 -$(MAKE) -C igmpproxy/src clean
1183 @rm -f igmpproxy/src/Makefile
1185 udev:
1186 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1187 PROGRAMS=udevtrigger
1189 udev-install: udev
1190 install -d $(INSTALLDIR)
1191 install -d $(TARGETDIR)
1192 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1194 hotplug2:
1195 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1197 hotplug2-install: hotplug2
1198 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1199 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1201 emf:
1202 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1204 emf-install: emf
1205 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1207 igs:
1208 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1210 igs-install: igs
1211 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1214 ebtables: dummy
1215 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1216 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1217 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1219 ebtables-install: ebtables
1220 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1222 @mkdir -p $(TARGETDIR)/rom/etc
1223 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1224 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1226 install -d $(INSTALLDIR)/ebtables/usr/lib
1227 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1228 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1229 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1231 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1232 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1233 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1235 ebtables-clean:
1236 make -C ebtables clean
1238 lzo/stamp-h1:
1239 cd lzo && \
1240 CFLAGS="-Os -Wall $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
1241 touch lzo/stamp-h1
1243 lzo: lzo/stamp-h1
1245 lzo-clean:
1246 -$(MAKE) -C lzo clean
1247 @rm -f lzo/stamp-h1
1249 lzo-install: lzo
1250 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1251 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1252 cd $(INSTALLDIR)/lzo/usr/lib && ln -sf liblzo2.so.2 liblzo2.so
1255 openvpn: openvpn/.conf
1257 openvpn/.conf:
1258 cd openvpn && CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1259 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1260 $(CONFIGURE) --prefix= \
1261 --with-lzo-headers="$(TOP)/lzo/include" \
1262 --with-ssl-headers="$(TOP)/openssl/include/" \
1263 --with-iproute-path="/usr/sbin/ip" \
1264 --disable-debug --disable-plugins --enable-management --enable-small \
1265 --disable-selinux --disable-socks --enable-password-save
1266 touch openvpn/.conf
1268 openvpn-clean:
1269 -$(MAKE) -C openvpn clean
1270 @rm -f openvpn/.conf
1272 openvpn-install: openvpn
1273 install -D openvpn/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1274 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1275 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1279 # Generic rules
1283 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
1286 %-clean:
1287 @-[ ! -d $* ] || $(MAKE) -C $* clean
1289 %-install: %
1290 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
1292 %-build:
1293 $(MAKE) $*-clean $*
1295 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
1297 .PHONY: all clean distclean mrproper install package
1298 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
1299 .PHONY: dummy libnet libpcap