Build: cyassl build fix for newer gcc versions
[tomato.git] / release / src / router / Makefile
blob45fb1386e090b8c3f731b5eac824c02770fcbd1b
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 += pppd
44 obj-y += rp-pppoe
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 += cyassl
55 obj-y += mssl
56 obj-y += mdu
58 # !!TB
59 obj-$(TCONFIG_USB) += p910nd
60 obj-$(TCONFIG_USB) += scsi-idle
61 obj-y += libusb10
62 #obj-y += libusb
63 obj-y += usbmodeswitch
64 obj-$(TCONFIG_FTP) += vsftpd
66 ifeq ($(CONFIG_LINUX26),y)
67 ifeq ($(TCONFIG_SAMBASRV),y)
68 NEED_EX_NLS = y
69 endif
70 ifeq ($(TCONFIG_USB_EXTRAS),y)
71 NEED_EX_USB = y
72 endif
73 endif
75 ifeq ($(TCONFIG_SAMBASRV),y)
76 ifeq ($(TCONFIG_SAMBA3),y)
77 NEED_SAMBA3 = y
78 else
79 NEED_SAMBA2 = y
80 endif
81 endif
83 ifeq ($(TCONFIG_IPV6),y)
84 export TCONFIG_IPV6 := y
85 else
86 TCONFIG_IPV6 :=
87 endif
89 obj-$(NEED_SAMBA2) += samba
90 obj-$(NEED_SAMBA3) += samba3
91 obj-$(TCONFIG_NTFS) += ntfs-3g
92 obj-$(TCONFIG_EBTABLES) += ebtables
93 obj-$(TCONFIG_IPV6) += radvd
94 obj-$(TCONFIG_IPV6) += dhcpv6
96 obj-$(TCONFIG_MEDIA_SERVER) += zlib
97 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
98 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
99 obj-$(TCONFIG_MEDIA_SERVER) += libogg
100 obj-$(TCONFIG_MEDIA_SERVER) += flac
101 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
102 obj-$(TCONFIG_MEDIA_SERVER) += libexif
103 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
104 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
105 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
106 MEDIA_SERVER_STATIC=y
108 obj-y += miniupnpd
109 # obj-y += upnp
113 # configurable packages
115 obj-$(TCONFIG_L2TP) += xl2tpd
116 obj-$(TCONFIG_PPTP) += accel-pptp
117 obj-$(TCONFIG_HTTPS) += openssl
118 obj-$(TCONFIG_SSH) += dropbear
119 obj-$(TCONFIG_ZEBRA) += zebra
120 # obj-$(TCONFIG_IPP2P) += ipp2p
121 obj-$(TCONFIG_LZO) += lzo
122 obj-$(TCONFIG_OPENVPN) += openvpn
123 obj-$(TCONFIG_EMF) += emf
124 obj-$(TCONFIG_EMF) += igs
126 obj-$(CONFIG_LINUX26) += hotplug2
127 obj-$(CONFIG_LINUX26) += udevtrigger
129 ifeq ($(TCONFIG_OPENVPN),y)
130 export FULL_OPENSSL := y
131 else
132 ifeq ($(TCONFIG_FTP_SSL),y)
133 export FULL_OPENSSL := y
134 else
135 FULL_OPENSSL :=
136 endif
137 endif
139 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
140 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
145 # Basic rules
148 all: clean-build libc $(obj-y) kernel
151 kernel: $(LINUXDIR)/.config
152 @$(SEP)
154 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
155 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC); \
157 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
158 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC); \
160 ifeq ($(CONFIG_LINUX26),y)
161 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR)
162 endif
165 lzma-loader:
166 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD)
168 lzma-loader-install: lzma-loader
169 @$(SEP)
172 kmod: dummy
173 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC)
175 testfind:
176 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
177 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
179 install package: $(obj-install) $(LINUXDIR)/.config
180 @$(SEP)
182 install -d $(TARGETDIR)
185 # kernel modules
186 $(MAKE) -C $(LINUXDIR) modules_install \
187 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" \
188 DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
190 ifneq ($(CONFIG_LINUX26),y)
191 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded -x {} \;
192 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded -x {} \;
193 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded -x {} \;
194 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded -x {} \;
195 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded -x {} \;
196 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded -x {} \;
197 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded -x {} \;
199 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug -x -R .mdebug.abi32 {} \;
200 endif
202 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
204 # nice and clean
205 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
206 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
207 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
208 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
209 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
210 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
211 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
212 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
213 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
214 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
216 ##!!TB
217 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
218 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
219 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
220 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
221 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jfs/* . && rm -rf jfs || true
222 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
223 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
224 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
225 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
226 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
227 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
228 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
229 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
230 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
231 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
232 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
233 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
234 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
235 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
236 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
237 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
238 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
239 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
240 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
241 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
242 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
243 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
244 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
245 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
246 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
247 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
248 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
249 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
250 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
251 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
252 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
253 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
254 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
255 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv pwc/* . && rm -rf pwc || true
256 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv gl860/* . && rm -rf gl860 || true
257 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv m5602/* . && rm -rf m5602 || true
258 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv stv06xx/* . && rm -rf stv06xx || true
259 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv gspca/* . && rm -rf gspca || true
260 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
262 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
263 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
264 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
265 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
266 cd $(TARGETDIR)/lib/modules && rm -f */source || true
268 # misc
269 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
270 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
271 done
273 ifneq ($(TCONFIG_L7),y)
274 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
275 endif
277 # uClibc
278 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
279 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
280 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
281 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
282 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
283 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
284 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
285 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
286 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
287 ifeq ($(TCONFIG_SSH),y)
288 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
289 endif
290 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
291 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
292 $(STRIP) $(TARGETDIR)/lib/*.so.0
293 endif
295 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
297 @echo ---
299 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
300 @$(SRCBASE)/btools/libfoo.pl
301 else
302 @$(SRCBASE)/btools/libfoo.pl --noopt
303 endif
304 @chmod 0555 $(TARGETDIR)/lib/*.so*
305 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
307 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
308 # separated/copied extra stuff
309 @rm -rf $(PLATFORMDIR)/extras
310 @mkdir $(PLATFORMDIR)/extras
311 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
313 $(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
314 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
316 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
317 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
318 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
319 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
320 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
321 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
322 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/jfs.*o $(PLATFORMDIR)/extras/ || true
323 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
324 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
325 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
326 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
327 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
328 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
329 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
330 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
331 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
332 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
334 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
335 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
336 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
337 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*acm.*o $(PLATFORMDIR)/extras/ || true
338 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
339 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
341 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
342 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
343 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
344 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
345 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
346 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
347 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
348 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
349 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
350 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
351 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_ether.*o $(PLATFORMDIR)/extras/ || true
352 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
353 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/usbnet.*o $(PLATFORMDIR)/extras/ || true
354 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/rndis_host.*o $(PLATFORMDIR)/extras/ || true
355 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb || true
356 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
357 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
358 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
359 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
360 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
361 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
362 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
363 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
364 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
365 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
366 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
367 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ctf*.*o $(PLATFORMDIR)/extras/ || true
368 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
369 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
370 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
371 @mv $(TARGETDIR)/lib/modules/*/kernel/crypto/* $(PLATFORMDIR)/extras/ || true
372 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/crypto || true
374 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
375 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
376 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
377 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
378 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
379 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
380 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
382 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
383 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
384 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
385 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
386 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
387 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
388 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
389 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
390 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
391 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
392 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
393 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
394 ifneq ($(TCONFIG_USB),y)
395 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
396 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
397 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
398 endif
400 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
401 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
402 ifneq ($(TCONFIG_USB_EXTRAS),y)
403 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
404 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
405 endif
406 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
407 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
408 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
409 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
410 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
411 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
412 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
414 @mkdir -p $(PLATFORMDIR)/extras/apps
415 @mkdir -p $(PLATFORMDIR)/extras/lib
417 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
418 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
419 @mv $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
421 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
422 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
423 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
424 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
425 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
426 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
427 ifneq ($(NEED_EX_USB),y)
428 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
429 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
430 endif
431 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
433 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
434 ifeq ($(TCONFIG_L7PAT),y)
435 @cd layer7 && ./squish.sh
436 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
437 endif
439 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
440 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
441 @echo ---
443 @rm -f $(TARGETDIR)/lib/modules/*/build
445 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
446 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -nopad | tee target.info
448 # Package kernel and filesystem
449 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
450 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
451 # $(MAKE) -C $(LINUXDIR) zImage ; \
452 # else \
453 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
454 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
455 # fi
457 # Pad self-booting Linux to a 64 KB boundary
458 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
459 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
460 # Append filesystem to self-booting Linux
461 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
464 libc: $(LIBDIR)/ld-uClibc.so.0
465 # $(MAKE) -C ../../../tools-src/uClibc all
466 # $(MAKE) -C ../../../tools-src/uClibc install
470 # cleaners
473 clean: clean-build $(obj-clean)
474 rm -rf layer7/squished
475 rm -f .ipv6-y .ipv6-n
476 rm -f .fullssl-y .fullssl-n
477 make -C config clean
479 clean-build: dummy
480 rm -rf $(TARGETDIR)
481 rm -rf $(INSTALLDIR)
482 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
483 rm -rf $(PLATFORMDIR)/extras
485 distclean: clean
486 ifneq ($(INSIDE_MAK),1)
487 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
488 endif
489 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
492 # configuration
495 CONFIG_IN := config/config.in
497 config/conf config/mconf:
498 @$(MAKE) -C config
500 rconf: config/conf
501 @config/conf $(CONFIG_IN)
503 rmconf: config/mconf
504 @config/mconf $(CONFIG_IN)
506 roldconf: config/conf
507 @config/conf -o $(CONFIG_IN)
508 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean
510 kconf:
511 @$(MAKE) -C $(LINUXDIR) config
513 kmconf:
514 @$(MAKE) -C $(LINUXDIR) menuconfig
516 koldconf:
517 @$(MAKE) -C $(LINUXDIR) oldconfig
518 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
520 bboldconf:
521 @$(MAKE) -C busybox oldconfig
523 config conf: rconf kconf
525 menuconfig mconf: rmconf kmconf
527 .ipv6-y .ipv6-n:
528 @rm -f .ipv6-y .ipv6-n
529 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
530 @touch $@
532 .fullssl-y .fullssl-n:
533 @rm -f .fullssl-y .fullssl-n
534 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
535 @touch $@
537 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
539 oldconfig oldconf: koldconf roldconf dependconf bboldconf
543 # overrides and extra dependencies
546 busybox: dummy
547 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)"
549 # V=1
551 busybox-install:
552 rm -rf $(INSTALLDIR)/busybox
553 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
555 busybox-clean:
556 $(MAKE) -C busybox distclean
558 busybox-config:
559 $(MAKE) -C busybox menuconfig
562 httpd: shared nvram mssl
563 @$(SEP)
564 @$(MAKE) -C httpd
566 www-install:
567 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
569 matrixssl:
570 @$(SEP)
571 @$(MAKE) -C matrixssl/src
573 matrixssl-install:
574 @true
576 matrixssl-clean:
577 $(MAKE) -C matrixssl/src clean
579 cyassl/stamp-h1:
580 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
581 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections \
582 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
583 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
584 PTHREAD_LIBS="-lpthread" \
585 $(CONFIGURE)
586 @touch cyassl/stamp-h1
588 cyassl: cyassl/stamp-h1
589 @$(SEP)
590 @$(MAKE) -C cyassl
592 cyassl-clean:
593 -@$(MAKE) -C cyassl clean
594 @rm -f cyassl/stamp-h1
596 cyassl-install:
597 @true
599 ifeq ($(FULL_OPENSSL),y)
600 OPENSSL_CIPHERS:=enable-rc5
601 else
602 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-aes no-aes192 no-cast no-des no-modes no-tls1 no-tlsext
603 endif
605 openssl/stamp-h1:
606 cd openssl && \
607 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
608 -ffunction-sections -fdata-sections -Wl,--gc-sections \
609 shared $(OPENSSL_CIPHERS) \
610 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
611 no-seed no-capieng no-cms no-gms no-gmp no-rfc3779 \
612 no-ec no-ecdh no-ecdsa no-err no-hw no-jpake no-threads \
613 no-zlib no-engine no-engines no-sse2 no-perlasm \
614 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
616 @$(MAKE) -C openssl clean
617 @touch openssl/stamp-h1
619 openssl: openssl/stamp-h1
621 openssl-clean:
622 -@$(MAKE) -C openssl clean
623 @rm -f openssl/stamp-h1
625 openssl-install: openssl
626 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
627 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
628 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
630 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
631 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
632 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
634 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
636 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
637 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
639 ifeq ($(FULL_OPENSSL),y)
640 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
641 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
642 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
643 endif
645 mssl: $(if $(FULL_OPENSSL),openssl,cyassl)
647 mdu: shared mssl
649 rc: nvram shared
651 bridge/Makefile:
652 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
653 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
655 bridge: bridge/Makefile
656 @$(SEP)
657 @$(MAKE) -C bridge
659 bridge-clean:
660 -@$(MAKE) -C bridge clean
661 @rm -f bridge/Makefile
663 bridge-install:
664 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
665 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
667 dnsmasq:
668 @$(SEP)
669 @$(MAKE) -C dnsmasq \
670 COPTS="$(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6) $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
671 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC"
673 dnsmasq-install:
674 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
675 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
677 iptables:
678 @$(SEP)
679 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE"
681 iptables-install:
682 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
683 cd $(INSTALLDIR)/iptables/usr/sbin && \
684 ln -sf iptables iptables-restore
686 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
687 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
689 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
691 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
692 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
693 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
695 ifeq ($(TCONFIG_IPV6),y)
696 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
697 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
698 cd $(INSTALLDIR)/iptables/usr/sbin && \
699 ln -sf ip6tables ip6tables-restore
700 endif
702 iptables-clean:
703 -$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
705 ppp:
706 @$(SEP)
707 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
708 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
710 ppp-%:
711 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
713 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
714 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
715 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
716 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
717 @touch rp-pppoe/src/stamp-h1
719 rp-pppoe: pppd rp-pppoe/src/stamp-h1
720 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so
722 rp-pppoe-clean:
723 -$(MAKE) -C rp-pppoe/src clean
724 @rm -f rp-pppoe/src/pppoe-relay
725 @rm -f rp-pppoe/src/stamp-h1
727 rp-pppoe-install: rp-pppoe
728 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
729 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
730 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
731 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
734 upnp: nvram shared iptables
736 miniupnpd-config:
737 @cd miniupnpd && ./genconfig.sh
739 miniupnpd: iptables miniupnpd-config
740 @$(SEP)
741 $(MAKE) -C miniupnpd miniupnpd -f Makefile.linux \
742 TARGET_OPENWRT="not really" CC=$(CC) \
743 CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/iptables/include -I$(TOP)/shared" \
744 LDFLAGS="-L$(TOP)/iptables -liptc" LIBS=""
746 miniupnpd-clean:
747 -$(MAKE) -C miniupnpd -f Makefile.linux clean
748 @rm -f miniupnpd/config.h
750 miniupnpd-install:
751 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
752 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
754 # !!TB
755 shared: busybox
757 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
758 @$(SEP)
759 $(MAKE) -C vsftpd
761 vsftpd-install: vsftpd
762 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
763 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
765 ntfs-3g/Makefile:
766 cd ntfs-3g && \
767 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
768 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
769 $(CONFIGURE) --enable-shared=no --enable-static=no \
770 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
771 --disable-ntfsprogs --disable-crypto --without-uuid \
772 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
774 ntfs-3g: ntfs-3g/Makefile
775 @$(MAKE) -C ntfs-3g
777 ntfs-3g-clean:
778 -@$(MAKE) -C ntfs-3g clean
779 @rm -f ntfs-3g/Makefile
781 ntfs-3g-install: ntfs-3g
782 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
783 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
784 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
785 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
786 ln -sf ../bin/ntfs-3g mount.ntfs
788 libusb10/Makefile: libusb10/Makefile.in
789 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
790 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
792 libusb10: libusb10/Makefile
793 $(MAKE) -C $@
795 libusb10-install: libusb10
796 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
797 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
799 libusb10-clean:
800 -@$(MAKE) -C $@ clean
801 @rm -rf libusb10/Makefile
803 libusb/Makefile: libusb/Makefile.in
804 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
805 $(CONFIGURE) --prefix=/usr \
806 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
807 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
808 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
810 libusb: libusb10 libusb/Makefile
811 $(MAKE) -C $@
813 libusb-install: libusb
814 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
815 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
817 libusb-clean:
818 -@$(MAKE) -C $@ clean
819 @rm -rf libusb/Makefile
821 usbmodeswitch: libusb10
822 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
823 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
824 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
826 usbmodeswitchdb-install:
827 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
828 # compress whitespace
829 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
830 F=`basename $$D`; \
831 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
832 done
834 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
835 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
836 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
837 @mkdir -p $(TARGETDIR)/rom/etc
838 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
841 radvd/stamp-h1:
842 cd radvd && CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
843 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
844 $(CONFIGURE) --prefix=""
845 @$(MAKE) -C radvd clean
846 @touch radvd/stamp-h1
848 radvd: radvd/stamp-h1
850 radvd-clean:
851 -@$(MAKE) -C radvd distclean
852 @rm -f radvd/stamp-h1
854 radvd-install: radvd
855 install -D radvd/radvd $(INSTALLDIR)/radvd/usr/sbin/radvd
856 $(STRIP) $(INSTALLDIR)/radvd/usr/sbin/radvd
858 dhcpv6/stamp-h1:
859 @cd dhcpv6 && \
860 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
861 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
862 ac_cv_func_setpgrp_void=yes \
863 $(CONFIGURE) --prefix= --with-localdbdir=/var
864 @$(MAKE) -C dhcpv6 clean
865 @touch dhcpv6/stamp-h1
867 dhcpv6: dhcpv6/stamp-h1
868 @$(SEP)
869 @$(MAKE) -C dhcpv6 dhcp6c
871 dhcpv6-install: dhcpv6
872 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
873 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
875 dhcpv6-clean:
876 -@$(MAKE) -C dhcpv6 clean
877 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
880 p910nd:
881 samba:
882 samba3:
884 nvram: shared
886 prebuilt: shared
888 vlan:
889 @$(SEP)
890 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
892 vlan-install:
893 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
894 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
897 pptp-client-install:
898 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
899 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
902 accel-pptp: pppd accel-pptp/Makefile
903 @$(MAKE) -C accel-pptp
905 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
906 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
907 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
909 accel-pptp-clean:
910 -@$(MAKE) -C accel-pptp clean
911 @rm -f accel-pptp/Makefile
913 accel-pptp-install: accel-pptp
914 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
915 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
918 pppd/Makefile: pppd/linux/Makefile.top
919 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
921 pppd: pppd/Makefile
922 @$(SEP)
923 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
925 pppd-clean:
926 -$(MAKE) -C pppd clean
927 @rm -f pppd/Makefile
929 pppd-install: pppd
930 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
931 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
932 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
933 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
934 ifeq ($(TCONFIG_L2TP),y)
935 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
936 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
937 endif
939 # ipupdate-install:
940 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
941 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
943 zebra/stamp-h1:
944 @cd zebra && rm -f config.cache && \
945 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
946 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
947 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
948 $(CONFIGURE) --sysconfdir=/etc \
949 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
950 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
951 @touch zebra/stamp-h1
953 zebra: zebra/stamp-h1
954 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
956 zebra-clean:
957 -@$(MAKE) -C zebra clean
958 @rm -f zebra/stamp-h1
960 zebra-install: zebra
961 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
962 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
963 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
964 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
965 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
966 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
969 rp-l2tp-install:
970 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
971 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
972 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
973 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
974 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
975 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
976 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
978 xl2tpd: pppd
979 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
981 xl2tpd-install: xl2tpd
982 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
983 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
986 bpalogin-install:
987 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
988 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
991 # libnet:
992 # @$(SEP)
993 # @-mkdir -p libnet/lib
994 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
996 # libpcap:
997 # @$(SEP)
998 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1000 libbcm:
1001 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
1003 libbcm-install:
1004 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1005 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1008 iproute2:
1009 @$(SEP)
1010 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1012 iproute2-install: iproute2
1013 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1014 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1015 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1016 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1019 ntpc: nvram shared
1022 dropbear: dropbear/config.h
1023 @$(SEP)
1024 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1
1026 dropbear-install:
1027 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1028 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1029 cd $(INSTALLDIR)/dropbear/usr/bin && \
1030 ln -sf dropbearmulti dropbear && \
1031 ln -sf dropbearmulti dropbearconvert && \
1032 ln -sf dropbearmulti dropbearkey && \
1033 ln -sf dropbearmulti dbclient && \
1034 ln -sf dropbearmulti ssh && \
1035 ln -sf dropbearmulti scp
1037 dropbear-clean:
1038 -@$(MAKE) -C dropbear clean
1039 @rm -f dropbear/config.h
1041 dropbear/config.h:
1042 cd dropbear && \
1043 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1044 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1045 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1046 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1047 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1048 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty --enable-bundled-libtom
1049 @$(MAKE) -C dropbear clean
1051 # Media libraries
1053 sqlite/stamp-h1:
1054 cd sqlite && \
1055 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1056 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1057 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1058 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1059 touch sqlite/stamp-h1
1061 sqlite: sqlite/stamp-h1
1062 @$(MAKE) -C sqlite all
1064 sqlite-clean:
1065 -@$(MAKE) -C sqlite clean
1066 @rm -f sqlite/stamp-h1
1068 sqlite-install: sqlite
1069 @$(SEP)
1070 ifneq ($(MEDIA_SERVER_STATIC),y)
1071 install -D sqlite/.libs/libsqlite3.so.0 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1072 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1073 endif
1075 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1077 FFMPEG_DECODERS:=aac ac3 atrac3 flac h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1078 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1080 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1081 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1083 FFMPEG_PROTOCOLS:=file
1084 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1086 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
1087 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1089 ffmpeg/stamp-h1: zlib
1090 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1091 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1092 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1093 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1094 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1095 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1096 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1097 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1098 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1099 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1100 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1101 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1102 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1103 --extra-libs="-L$(TOP)/zlib -lz" \
1104 --enable-zlib --disable-debug --prefix=''
1105 touch ffmpeg/stamp-h1
1107 ffmpeg: ffmpeg/stamp-h1 zlib
1108 @$(MAKE) -C ffmpeg all
1110 ffmpeg-clean:
1111 -@$(MAKE) -C ffmpeg clean
1112 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1114 ffmpeg-install: ffmpeg
1115 @$(SEP)
1116 ifneq ($(MEDIA_SERVER_STATIC),y)
1117 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1118 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1119 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1120 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1121 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1122 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1123 endif
1125 libogg/stamp-h1:
1126 cd libogg && \
1127 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1128 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1129 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1130 touch libogg/stamp-h1
1132 libogg: libogg/stamp-h1
1133 @$(MAKE) -C libogg all
1135 libogg-clean:
1136 -@$(MAKE) -C libogg clean
1137 @rm -f libogg/stamp-h1
1139 libogg-install: libogg
1140 @$(SEP)
1141 ifneq ($(MEDIA_SERVER_STATIC),y)
1142 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1143 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1144 endif
1146 flac/stamp-h1: libogg
1147 cd flac && \
1148 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1149 CPPFLAGS="-I$(TOP)/libogg/include -I$(LINUXDIR)/include" \
1150 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1151 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1152 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1153 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1154 touch flac/stamp-h1
1156 flac: flac/stamp-h1 libogg
1157 @$(MAKE) -C flac/src/libFLAC all
1159 flac-clean:
1160 -@$(MAKE) -C flac clean
1161 @rm -f flac/stamp-h1
1163 flac-install: flac
1164 @$(SEP)
1165 ifneq ($(MEDIA_SERVER_STATIC),y)
1166 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1167 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1168 endif
1170 jpeg/stamp-h1:
1171 cd jpeg && \
1172 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1173 touch jpeg/stamp-h1
1175 jpeg: jpeg/stamp-h1
1176 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so
1178 jpeg-clean:
1179 -@$(MAKE) -C jpeg clean
1180 @rm -f jpeg/stamp-h1 jpeg/Makefile
1182 jpeg-install: jpeg
1183 @$(SEP)
1184 ifneq ($(MEDIA_SERVER_STATIC),y)
1185 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1186 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1187 endif
1189 libexif/stamp-h1:
1190 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1191 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1192 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1193 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1194 touch libexif/stamp-h1
1196 libexif: libexif/stamp-h1
1197 @$(MAKE) -C libexif all
1199 libexif-clean:
1200 -@$(MAKE) -C libexif clean
1201 @rm -f libexif/stamp-h1
1203 libexif-install: libexif
1204 @$(SEP)
1205 ifneq ($(MEDIA_SERVER_STATIC),y)
1206 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1207 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1208 endif
1210 zlib/stamp-h1:
1211 cd zlib && \
1212 CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1213 ./configure --shared --prefix=''
1214 touch zlib/stamp-h1
1216 zlib: zlib/stamp-h1
1217 @$(MAKE) -C zlib CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) all
1219 zlib-clean:
1220 -@$(MAKE) -C zlib clean
1221 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1223 zlib-install: zlib
1224 @$(SEP)
1225 ifneq ($(MEDIA_SERVER_STATIC),y)
1226 install -d $(INSTALLDIR)/zlib/usr/lib
1227 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1228 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1229 endif
1231 libid3tag/stamp-h1: zlib
1232 cd libid3tag && \
1233 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1234 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1235 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1236 --disable-debugging --disable-profiling
1237 touch libid3tag/stamp-h1
1239 libid3tag: libid3tag/stamp-h1 zlib
1240 @$(MAKE) -C libid3tag all
1242 libid3tag-clean:
1243 -@$(MAKE) -C libid3tag clean
1244 @rm -f libid3tag/stamp-h1
1246 libid3tag-install: libid3tag
1247 @$(SEP)
1248 ifneq ($(MEDIA_SERVER_STATIC),y)
1249 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1250 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1251 endif
1253 libvorbis/stamp-h1: libogg
1254 cd libvorbis && \
1255 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1256 CPPFLAGS="-I$(TOP)/libogg/include" \
1257 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1258 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1259 --with-ogg-includes="$(TOP)/libogg/include" \
1260 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1261 touch libvorbis/stamp-h1
1263 libvorbis: libvorbis/stamp-h1
1264 @$(MAKE) -C libvorbis/lib all
1266 libvorbis-clean:
1267 -@$(MAKE) -C libvorbis clean
1268 @rm -f libvorbis/stamp-h1
1270 libvorbis-install: libvorbis
1271 @$(SEP)
1272 ifneq ($(MEDIA_SERVER_STATIC),y)
1273 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1274 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1275 endif
1277 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1278 @$(SEP)
1279 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna
1282 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1283 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1284 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1285 $(CONFIGURE) --prefix=/usr
1287 igmpproxy: igmpproxy/src/Makefile
1288 @$(SEP)
1289 @$(MAKE) -C igmpproxy/src
1291 igmpproxy-install: igmpproxy
1292 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1293 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1295 igmpproxy-clean:
1296 -$(MAKE) -C igmpproxy/src clean
1297 @rm -f igmpproxy/src/Makefile
1299 udev:
1300 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1301 PROGRAMS=udevtrigger
1303 udev-install: udev
1304 install -d $(INSTALLDIR)
1305 install -d $(TARGETDIR)
1306 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1308 hotplug2:
1309 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1311 hotplug2-install: hotplug2
1312 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1313 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1315 emf:
1316 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1318 emf-install: emf
1319 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1321 igs:
1322 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1324 igs-install: igs
1325 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1328 ebtables: dummy
1329 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1330 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1331 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1333 ebtables-install: ebtables
1334 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1336 @mkdir -p $(TARGETDIR)/rom/etc
1337 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1338 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1340 install -d $(INSTALLDIR)/ebtables/usr/lib
1341 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1342 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1343 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1345 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1346 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1347 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1349 ebtables-clean:
1350 make -C ebtables clean
1352 lzo/stamp-h1:
1353 cd lzo && \
1354 CFLAGS="-Os -Wall $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
1355 touch lzo/stamp-h1
1357 lzo: lzo/stamp-h1
1359 lzo-clean:
1360 -$(MAKE) -C lzo clean
1361 @rm -f lzo/stamp-h1
1363 lzo-install: lzo
1364 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1365 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1366 cd $(INSTALLDIR)/lzo/usr/lib && ln -sf liblzo2.so.2 liblzo2.so
1369 openvpn: openvpn/.conf openssl lzo
1371 openvpn/.conf:
1372 cd openvpn && CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1373 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1374 $(CONFIGURE) --prefix= \
1375 --with-lzo-headers="$(TOP)/lzo/include" \
1376 --with-ssl-headers="$(TOP)/openssl/include/" \
1377 --with-iproute-path="/usr/sbin/ip" \
1378 --disable-debug --disable-plugins --enable-management --enable-small \
1379 --disable-selinux --disable-socks --enable-password-save
1380 touch openvpn/.conf
1382 openvpn-clean:
1383 -$(MAKE) -C openvpn clean
1384 @rm -f openvpn/.conf
1386 openvpn-install: openvpn
1387 install -D openvpn/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1388 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1389 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1393 # Generic rules
1397 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
1400 %-clean:
1401 @-[ ! -d $* ] || $(MAKE) -C $* clean
1403 %-distclean:
1404 @-[ ! -d $* ] || $(MAKE) -C $* distclean
1406 %-install: %
1407 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
1409 %-build:
1410 $(MAKE) $*-clean $*
1412 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
1414 .PHONY: all clean distclean mrproper install package
1415 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
1416 .PHONY: dummy libnet libpcap