Add NFS kernel modules
[tomato.git] / release / src / router / Makefile
blobc3409e0d392a540f5f5e0f9c24b0333259cc206e
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 obj-$(TCONFIG_NFS) += portmap
59 obj-$(TCONFIG_NFS) += e2fsprogs
60 obj-$(TCONFIG_NFS) += libevent
61 obj-$(TCONFIG_NFS) += libnfsidmap
62 obj-$(TCONFIG_NFS) += nfs-utils
64 # !!TB
65 obj-$(TCONFIG_USB) += p910nd
66 obj-$(TCONFIG_USB) += scsi-idle
67 obj-y += libusb10
68 #obj-y += libusb
69 obj-y += usbmodeswitch
70 obj-$(TCONFIG_FTP) += vsftpd
72 ifeq ($(CONFIG_LINUX26),y)
73 ifeq ($(TCONFIG_SAMBASRV),y)
74 NEED_EX_NLS = y
75 endif
76 ifeq ($(TCONFIG_USB_EXTRAS),y)
77 NEED_EX_USB = y
78 endif
79 endif
81 ifeq ($(TCONFIG_SAMBASRV),y)
82 ifeq ($(TCONFIG_SAMBA3),y)
83 NEED_SAMBA3 = y
84 else
85 NEED_SAMBA2 = y
86 endif
87 endif
89 ifeq ($(TCONFIG_IPV6),y)
90 export TCONFIG_IPV6 := y
91 else
92 TCONFIG_IPV6 :=
93 endif
95 obj-$(NEED_SAMBA2) += samba
96 obj-$(NEED_SAMBA3) += samba3
97 obj-$(TCONFIG_NTFS) += ntfs-3g
98 obj-$(TCONFIG_EBTABLES) += ebtables
99 obj-$(TCONFIG_IPV6) += radvd
100 obj-$(TCONFIG_IPV6) += dhcpv6
102 obj-$(TCONFIG_MEDIA_SERVER) += zlib
103 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
104 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
105 obj-$(TCONFIG_MEDIA_SERVER) += libogg
106 obj-$(TCONFIG_MEDIA_SERVER) += flac
107 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
108 obj-$(TCONFIG_MEDIA_SERVER) += libexif
109 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
110 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
111 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
112 MEDIA_SERVER_STATIC=y
114 obj-y += miniupnpd
115 # obj-y += upnp
119 # configurable packages
121 obj-$(TCONFIG_L2TP) += xl2tpd
122 obj-$(TCONFIG_PPTP) += accel-pptp
123 obj-$(TCONFIG_HTTPS) += openssl
124 obj-$(TCONFIG_SSH) += dropbear
125 obj-$(TCONFIG_ZEBRA) += zebra
126 # obj-$(TCONFIG_IPP2P) += ipp2p
127 obj-$(TCONFIG_LZO) += lzo
128 obj-$(TCONFIG_OPENVPN) += openvpn
129 obj-$(TCONFIG_EMF) += emf
130 obj-$(TCONFIG_EMF) += igs
132 obj-$(CONFIG_LINUX26) += hotplug2
133 obj-$(CONFIG_LINUX26) += udevtrigger
135 ifeq ($(TCONFIG_OPENVPN),y)
136 export FULL_OPENSSL := y
137 else
138 ifeq ($(TCONFIG_FTP_SSL),y)
139 export FULL_OPENSSL := y
140 else
141 FULL_OPENSSL :=
142 endif
143 endif
145 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
146 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
151 # Basic rules
154 all: clean-build libc $(obj-y) kernel
157 kernel: $(LINUXDIR)/.config
158 @$(SEP)
160 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
161 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC); \
163 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
164 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC); \
166 ifeq ($(CONFIG_LINUX26),y)
167 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR)
168 endif
171 lzma-loader:
172 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD)
174 lzma-loader-install: lzma-loader
175 @$(SEP)
178 kmod: dummy
179 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC)
181 testfind:
182 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
183 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
185 install package: $(obj-install) $(LINUXDIR)/.config
186 @$(SEP)
188 install -d $(TARGETDIR)
191 # kernel modules
192 $(MAKE) -C $(LINUXDIR) modules_install \
193 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" \
194 DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
196 ifneq ($(CONFIG_LINUX26),y)
197 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded -x {} \;
198 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded -x {} \;
199 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded -x {} \;
200 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded -x {} \;
201 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded -x {} \;
202 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded -x {} \;
203 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded -x {} \;
205 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug -x -R .mdebug.abi32 {} \;
206 endif
208 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
210 # nice and clean
211 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
212 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
213 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
214 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
215 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
216 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
217 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
218 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
219 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
220 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
222 ##!!TB
223 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
224 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
225 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
226 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
227 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jfs/* . && rm -rf jfs || true
228 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
229 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
230 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
231 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
232 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
233 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
234 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
235 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
236 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
237 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
238 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
239 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
240 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
241 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
242 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
243 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
244 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
245 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
246 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
247 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
248 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
249 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
250 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
251 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
252 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
253 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
254 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
255 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
256 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
257 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
258 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
259 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
260 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
261 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv pwc/* . && rm -rf pwc || true
262 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv gl860/* . && rm -rf gl860 || true
263 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv m5602/* . && rm -rf m5602 || true
264 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv stv06xx/* . && rm -rf stv06xx || true
265 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv gspca/* . && rm -rf gspca || true
266 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
268 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
269 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
270 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
271 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
272 cd $(TARGETDIR)/lib/modules && rm -f */source || true
274 # misc
275 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
276 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
277 done
279 ifneq ($(TCONFIG_L7),y)
280 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
281 endif
283 # uClibc
284 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
285 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
286 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
287 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
288 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
289 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
290 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
291 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
292 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
293 ifeq ($(TCONFIG_SSH),y)
294 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
295 endif
296 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
297 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
298 $(STRIP) $(TARGETDIR)/lib/*.so.0
299 endif
301 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
303 @echo ---
305 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
306 @$(SRCBASE)/btools/libfoo.pl
307 else
308 @$(SRCBASE)/btools/libfoo.pl --noopt
309 endif
310 @chmod 0555 $(TARGETDIR)/lib/*.so*
311 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
313 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
314 # separated/copied extra stuff
315 @rm -rf $(PLATFORMDIR)/extras
316 @mkdir $(PLATFORMDIR)/extras
317 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
319 $(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
320 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
322 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
323 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
324 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
325 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
326 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
327 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
328 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/jfs.*o $(PLATFORMDIR)/extras/ || true
329 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
330 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
331 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
332 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
333 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
334 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
335 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
336 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
337 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
338 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
340 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
341 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
342 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
343 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*acm.*o $(PLATFORMDIR)/extras/ || true
344 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
345 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
347 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
348 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
349 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
350 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
351 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
352 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
353 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
354 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
355 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
356 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
357 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_ether.*o $(PLATFORMDIR)/extras/ || true
358 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
359 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/usbnet.*o $(PLATFORMDIR)/extras/ || true
360 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/rndis_host.*o $(PLATFORMDIR)/extras/ || true
361 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb || true
362 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
363 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
364 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
365 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
366 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
367 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
368 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
369 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
370 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
371 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
372 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
373 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ctf*.*o $(PLATFORMDIR)/extras/ || true
374 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
375 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
376 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
377 @mv $(TARGETDIR)/lib/modules/*/kernel/crypto/* $(PLATFORMDIR)/extras/ || true
378 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/crypto || true
380 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
381 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
382 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
383 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
384 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
385 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
386 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
388 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
389 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
390 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
391 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
392 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
393 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
394 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
395 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
396 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
397 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
398 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
399 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
400 ifneq ($(TCONFIG_USB),y)
401 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
402 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
403 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
404 endif
406 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
407 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
408 ifneq ($(TCONFIG_USB_EXTRAS),y)
409 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
410 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
411 endif
412 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
413 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
414 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
415 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
416 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
417 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
418 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
420 @mkdir -p $(PLATFORMDIR)/extras/apps
421 @mkdir -p $(PLATFORMDIR)/extras/lib
423 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
424 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
425 @mv $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
427 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
428 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
429 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
430 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
431 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
432 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
433 ifneq ($(NEED_EX_USB),y)
434 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
435 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
436 endif
437 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
439 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
440 ifeq ($(TCONFIG_L7PAT),y)
441 @cd layer7 && ./squish.sh
442 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
443 endif
445 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
446 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
447 @echo ---
449 @rm -f $(TARGETDIR)/lib/modules/*/build
451 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
452 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -nopad | tee target.info
454 # Package kernel and filesystem
455 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
456 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
457 # $(MAKE) -C $(LINUXDIR) zImage ; \
458 # else \
459 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
460 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
461 # fi
463 # Pad self-booting Linux to a 64 KB boundary
464 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
465 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
466 # Append filesystem to self-booting Linux
467 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
470 libc: $(LIBDIR)/ld-uClibc.so.0
471 # $(MAKE) -C ../../../tools-src/uClibc all
472 # $(MAKE) -C ../../../tools-src/uClibc install
476 # cleaners
479 clean: clean-build $(obj-clean)
480 rm -rf layer7/squished
481 rm -f .ipv6-y .ipv6-n
482 rm -f .fullssl-y .fullssl-n
483 make -C config clean
485 clean-build: dummy
486 rm -rf $(TARGETDIR)
487 rm -rf $(INSTALLDIR)
488 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
489 rm -rf $(PLATFORMDIR)/extras
491 distclean: clean
492 ifneq ($(INSIDE_MAK),1)
493 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
494 endif
495 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
498 # configuration
501 CONFIG_IN := config/config.in
503 config/conf config/mconf:
504 @$(MAKE) -C config
506 rconf: config/conf
507 @config/conf $(CONFIG_IN)
509 rmconf: config/mconf
510 @config/mconf $(CONFIG_IN)
512 roldconf: config/conf
513 @config/conf -o $(CONFIG_IN)
514 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean
516 kconf:
517 @$(MAKE) -C $(LINUXDIR) config
519 kmconf:
520 @$(MAKE) -C $(LINUXDIR) menuconfig
522 koldconf:
523 @$(MAKE) -C $(LINUXDIR) oldconfig
524 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
526 bboldconf:
527 @$(MAKE) -C busybox oldconfig
529 config conf: rconf kconf
531 menuconfig mconf: rmconf kmconf
533 .ipv6-y .ipv6-n:
534 @rm -f .ipv6-y .ipv6-n
535 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
536 @touch $@
538 .fullssl-y .fullssl-n:
539 @rm -f .fullssl-y .fullssl-n
540 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
541 @touch $@
543 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
545 oldconfig oldconf: koldconf roldconf dependconf bboldconf
549 # overrides and extra dependencies
552 busybox: dummy
553 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)"
555 # V=1
557 busybox-install:
558 rm -rf $(INSTALLDIR)/busybox
559 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
561 busybox-clean:
562 $(MAKE) -C busybox distclean
564 busybox-config:
565 $(MAKE) -C busybox menuconfig
568 httpd: shared nvram mssl
569 @$(SEP)
570 @$(MAKE) -C httpd
572 www-install:
573 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
575 matrixssl:
576 @$(SEP)
577 @$(MAKE) -C matrixssl/src
579 matrixssl-install:
580 @true
582 matrixssl-clean:
583 $(MAKE) -C matrixssl/src clean
585 cyassl/stamp-h1:
586 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
587 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections \
588 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
589 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
590 PTHREAD_LIBS="-lpthread" \
591 $(CONFIGURE)
592 @touch cyassl/stamp-h1
594 cyassl: cyassl/stamp-h1
595 @$(SEP)
596 @$(MAKE) -C cyassl
598 cyassl-clean:
599 -@$(MAKE) -C cyassl clean
600 @rm -f cyassl/stamp-h1
602 cyassl-install:
603 @true
605 ifeq ($(FULL_OPENSSL),y)
606 OPENSSL_CIPHERS:=enable-rc5
607 else
608 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-aes no-aes192 no-cast no-des no-modes no-tls1 no-tlsext
609 endif
611 openssl/stamp-h1:
612 cd openssl && \
613 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
614 -ffunction-sections -fdata-sections -Wl,--gc-sections \
615 shared $(OPENSSL_CIPHERS) \
616 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
617 no-seed no-capieng no-cms no-gms no-gmp no-rfc3779 \
618 no-ec no-ecdh no-ecdsa no-err no-hw no-jpake no-threads \
619 no-zlib no-engine no-engines no-sse2 no-perlasm \
620 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
622 @$(MAKE) -C openssl clean
623 @touch openssl/stamp-h1
625 openssl: openssl/stamp-h1
627 openssl-clean:
628 -@$(MAKE) -C openssl clean
629 @rm -f openssl/stamp-h1
631 openssl-install: openssl
632 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
633 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
634 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
636 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
637 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
638 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
640 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
642 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
643 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
645 ifeq ($(FULL_OPENSSL),y)
646 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
647 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
648 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
649 endif
651 mssl: $(if $(FULL_OPENSSL),openssl,cyassl)
653 mdu: shared mssl
655 rc: nvram shared
657 bridge/Makefile:
658 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
659 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
661 bridge: bridge/Makefile
662 @$(SEP)
663 @$(MAKE) -C bridge
665 bridge-clean:
666 -@$(MAKE) -C bridge clean
667 @rm -f bridge/Makefile
669 bridge-install:
670 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
671 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
673 dnsmasq:
674 @$(SEP)
675 @$(MAKE) -C dnsmasq \
676 COPTS="$(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6) $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
677 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC"
679 dnsmasq-install:
680 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
681 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
683 iptables:
684 @$(SEP)
685 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE"
687 iptables-install:
688 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
689 cd $(INSTALLDIR)/iptables/usr/sbin && \
690 ln -sf iptables iptables-restore
692 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
693 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
695 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
697 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
698 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
699 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
701 ifeq ($(TCONFIG_IPV6),y)
702 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
703 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
704 cd $(INSTALLDIR)/iptables/usr/sbin && \
705 ln -sf ip6tables ip6tables-restore
706 endif
708 iptables-clean:
709 -$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
711 ppp:
712 @$(SEP)
713 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
714 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
716 ppp-%:
717 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
719 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
720 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
721 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
722 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
723 @touch rp-pppoe/src/stamp-h1
725 rp-pppoe: pppd rp-pppoe/src/stamp-h1
726 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so
728 rp-pppoe-clean:
729 -$(MAKE) -C rp-pppoe/src clean
730 @rm -f rp-pppoe/src/pppoe-relay
731 @rm -f rp-pppoe/src/stamp-h1
733 rp-pppoe-install: rp-pppoe
734 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
735 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
736 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
737 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
740 upnp: nvram shared iptables
742 miniupnpd-config:
743 @cd miniupnpd && ./genconfig.sh
745 miniupnpd: iptables miniupnpd-config
746 @$(SEP)
747 $(MAKE) -C miniupnpd miniupnpd -f Makefile.linux \
748 TARGET_OPENWRT="not really" CC=$(CC) \
749 CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/iptables/include" \
750 LDFLAGS="-L$(TOP)/iptables -liptc" LIBS=""
752 miniupnpd-clean:
753 -$(MAKE) -C miniupnpd -f Makefile.linux clean
754 @rm -f miniupnpd/config.h
756 miniupnpd-install:
757 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
758 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
760 # !!TB
761 shared: busybox
763 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
764 @$(SEP)
765 $(MAKE) -C vsftpd
767 vsftpd-install: vsftpd
768 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
769 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
771 ntfs-3g/Makefile:
772 cd ntfs-3g && \
773 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
774 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
775 $(CONFIGURE) --enable-shared=no --enable-static=no \
776 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
777 --disable-ntfsprogs --disable-crypto --without-uuid \
778 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
780 ntfs-3g: ntfs-3g/Makefile
781 @$(MAKE) -C ntfs-3g
783 ntfs-3g-clean:
784 -@$(MAKE) -C ntfs-3g clean
785 @rm -f ntfs-3g/Makefile
787 ntfs-3g-install: ntfs-3g
788 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
789 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
790 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
791 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
792 ln -sf ../bin/ntfs-3g mount.ntfs
794 libusb10/Makefile: libusb10/Makefile.in
795 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
796 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
798 libusb10: libusb10/Makefile
799 $(MAKE) -C $@
801 libusb10-install: libusb10
802 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
803 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
805 libusb10-clean:
806 -@$(MAKE) -C $@ clean
807 @rm -rf libusb10/Makefile
809 libusb/Makefile: libusb/Makefile.in
810 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
811 $(CONFIGURE) --prefix=/usr \
812 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
813 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
814 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
816 libusb: libusb10 libusb/Makefile
817 $(MAKE) -C $@
819 libusb-install: libusb
820 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
821 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
823 libusb-clean:
824 -@$(MAKE) -C $@ clean
825 @rm -rf libusb/Makefile
827 usbmodeswitch: libusb10
828 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
829 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
830 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
832 usbmodeswitchdb-install:
833 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
834 # compress whitespace
835 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
836 F=`basename $$D`; \
837 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
838 done
840 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
841 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
842 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
843 @mkdir -p $(TARGETDIR)/rom/etc
844 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
847 radvd/stamp-h1:
848 cd radvd && CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
849 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
850 $(CONFIGURE) --prefix=""
851 @$(MAKE) -C radvd clean
852 @touch radvd/stamp-h1
854 radvd: radvd/stamp-h1
856 radvd-clean:
857 -@$(MAKE) -C radvd distclean
858 @rm -f radvd/stamp-h1
860 radvd-install: radvd
861 install -D radvd/radvd $(INSTALLDIR)/radvd/usr/sbin/radvd
862 $(STRIP) $(INSTALLDIR)/radvd/usr/sbin/radvd
864 dhcpv6/stamp-h1:
865 @cd dhcpv6 && \
866 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
867 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
868 ac_cv_func_setpgrp_void=yes \
869 $(CONFIGURE) --prefix= --with-localdbdir=/var
870 @$(MAKE) -C dhcpv6 clean
871 @touch dhcpv6/stamp-h1
873 dhcpv6: dhcpv6/stamp-h1
874 @$(SEP)
875 @$(MAKE) -C dhcpv6 dhcp6c
877 dhcpv6-install: dhcpv6
878 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
879 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
881 dhcpv6-clean:
882 -@$(MAKE) -C dhcpv6 clean
883 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
886 p910nd:
887 samba:
888 samba3:
890 nvram: shared
892 prebuilt: shared
894 vlan:
895 @$(SEP)
896 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
898 vlan-install:
899 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
900 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
903 pptp-client-install:
904 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
905 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
908 accel-pptp: pppd accel-pptp/Makefile
909 @$(MAKE) -C accel-pptp
911 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
912 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
913 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
915 accel-pptp-clean:
916 -@$(MAKE) -C accel-pptp clean
917 @rm -f accel-pptp/Makefile
919 accel-pptp-install: accel-pptp
920 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
921 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
924 pppd/Makefile: pppd/linux/Makefile.top
925 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
927 pppd: pppd/Makefile
928 @$(SEP)
929 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
931 pppd-clean:
932 -$(MAKE) -C pppd clean
933 @rm -f pppd/Makefile
935 pppd-install: pppd
936 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
937 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
938 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
939 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
940 ifeq ($(TCONFIG_L2TP),y)
941 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
942 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
943 endif
945 # ipupdate-install:
946 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
947 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
949 zebra/stamp-h1:
950 @cd zebra && rm -f config.cache && \
951 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
952 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
953 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
954 $(CONFIGURE) --sysconfdir=/etc \
955 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
956 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
957 @touch zebra/stamp-h1
959 zebra: zebra/stamp-h1
960 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
962 zebra-clean:
963 -@$(MAKE) -C zebra clean
964 @rm -f zebra/stamp-h1
966 zebra-install: zebra
967 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
968 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
969 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
970 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
971 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
972 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
975 rp-l2tp-install:
976 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
977 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
978 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
979 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
980 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
981 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
982 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
984 xl2tpd: pppd
985 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
987 xl2tpd-install: xl2tpd
988 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
989 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
992 bpalogin-install:
993 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
994 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
997 # libnet:
998 # @$(SEP)
999 # @-mkdir -p libnet/lib
1000 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1002 # libpcap:
1003 # @$(SEP)
1004 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1006 libbcm:
1007 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
1009 libbcm-install:
1010 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1011 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1014 iproute2:
1015 @$(SEP)
1016 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1018 iproute2-install: iproute2
1019 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1020 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1021 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1022 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1025 ntpc: nvram shared
1028 dropbear: dropbear/config.h
1029 @$(SEP)
1030 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1
1032 dropbear-install:
1033 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1034 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1035 cd $(INSTALLDIR)/dropbear/usr/bin && \
1036 ln -sf dropbearmulti dropbear && \
1037 ln -sf dropbearmulti dropbearconvert && \
1038 ln -sf dropbearmulti dropbearkey && \
1039 ln -sf dropbearmulti dbclient && \
1040 ln -sf dropbearmulti ssh && \
1041 ln -sf dropbearmulti scp
1043 dropbear-clean:
1044 -@$(MAKE) -C dropbear clean
1045 @rm -f dropbear/config.h
1047 dropbear/config.h:
1048 cd dropbear && \
1049 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1050 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1051 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1052 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1053 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1054 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty --enable-bundled-libtom
1055 @$(MAKE) -C dropbear clean
1057 # Media libraries
1059 sqlite/stamp-h1:
1060 cd sqlite && \
1061 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1062 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1063 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1064 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1065 touch sqlite/stamp-h1
1067 sqlite: sqlite/stamp-h1
1068 @$(MAKE) -C sqlite all
1070 sqlite-clean:
1071 -@$(MAKE) -C sqlite clean
1072 @rm -f sqlite/stamp-h1
1074 sqlite-install: sqlite
1075 @$(SEP)
1076 ifneq ($(MEDIA_SERVER_STATIC),y)
1077 install -D sqlite/.libs/libsqlite3.so.0 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1078 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1079 endif
1081 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1083 FFMPEG_DECODERS:=aac ac3 atrac3 flac h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1084 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1086 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1087 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1089 FFMPEG_PROTOCOLS:=file
1090 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1092 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
1093 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1095 ffmpeg/stamp-h1: zlib
1096 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1097 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1098 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1099 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1100 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1101 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1102 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1103 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1104 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1105 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1106 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1107 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1108 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1109 --extra-libs="-L$(TOP)/zlib -lz" \
1110 --enable-zlib --disable-debug --prefix=''
1111 touch ffmpeg/stamp-h1
1113 ffmpeg: ffmpeg/stamp-h1 zlib
1114 @$(MAKE) -C ffmpeg all
1116 ffmpeg-clean:
1117 -@$(MAKE) -C ffmpeg clean
1118 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1120 ffmpeg-install: ffmpeg
1121 @$(SEP)
1122 ifneq ($(MEDIA_SERVER_STATIC),y)
1123 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1124 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1125 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1126 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1127 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1128 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1129 endif
1131 libogg/stamp-h1:
1132 cd libogg && \
1133 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1134 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1135 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1136 touch libogg/stamp-h1
1138 libogg: libogg/stamp-h1
1139 @$(MAKE) -C libogg all
1141 libogg-clean:
1142 -@$(MAKE) -C libogg clean
1143 @rm -f libogg/stamp-h1
1145 libogg-install: libogg
1146 @$(SEP)
1147 ifneq ($(MEDIA_SERVER_STATIC),y)
1148 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1149 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1150 endif
1152 flac/stamp-h1: libogg
1153 cd flac && \
1154 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1155 CPPFLAGS="-I$(TOP)/libogg/include" \
1156 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1157 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1158 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1159 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1160 touch flac/stamp-h1
1162 flac: flac/stamp-h1 libogg
1163 @$(MAKE) -C flac/src/libFLAC all
1165 flac-clean:
1166 -@$(MAKE) -C flac clean
1167 @rm -f flac/stamp-h1
1169 flac-install: flac
1170 @$(SEP)
1171 ifneq ($(MEDIA_SERVER_STATIC),y)
1172 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1173 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1174 endif
1176 jpeg/stamp-h1:
1177 cd jpeg && \
1178 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1179 touch jpeg/stamp-h1
1181 jpeg: jpeg/stamp-h1
1182 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so
1184 jpeg-clean:
1185 -@$(MAKE) -C jpeg clean
1186 @rm -f jpeg/stamp-h1 jpeg/Makefile
1188 jpeg-install: jpeg
1189 @$(SEP)
1190 ifneq ($(MEDIA_SERVER_STATIC),y)
1191 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1192 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1193 endif
1195 libexif/stamp-h1:
1196 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1197 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1198 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1199 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1200 touch libexif/stamp-h1
1202 libexif: libexif/stamp-h1
1203 @$(MAKE) -C libexif all
1205 libexif-clean:
1206 -@$(MAKE) -C libexif clean
1207 @rm -f libexif/stamp-h1
1209 libexif-install: libexif
1210 @$(SEP)
1211 ifneq ($(MEDIA_SERVER_STATIC),y)
1212 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1213 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1214 endif
1216 zlib/stamp-h1:
1217 cd zlib && \
1218 CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1219 ./configure --shared --prefix=''
1220 touch zlib/stamp-h1
1222 zlib: zlib/stamp-h1
1223 @$(MAKE) -C zlib CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) all
1225 zlib-clean:
1226 -@$(MAKE) -C zlib clean
1227 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1229 zlib-install: zlib
1230 @$(SEP)
1231 ifneq ($(MEDIA_SERVER_STATIC),y)
1232 install -d $(INSTALLDIR)/zlib/usr/lib
1233 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1234 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1235 endif
1237 libid3tag/stamp-h1: zlib
1238 cd libid3tag && \
1239 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1240 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1241 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1242 --disable-debugging --disable-profiling
1243 touch libid3tag/stamp-h1
1245 libid3tag: libid3tag/stamp-h1 zlib
1246 @$(MAKE) -C libid3tag all
1248 libid3tag-clean:
1249 -@$(MAKE) -C libid3tag clean
1250 @rm -f libid3tag/stamp-h1
1252 libid3tag-install: libid3tag
1253 @$(SEP)
1254 ifneq ($(MEDIA_SERVER_STATIC),y)
1255 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1256 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1257 endif
1259 libvorbis/stamp-h1: libogg
1260 cd libvorbis && \
1261 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1262 CPPFLAGS="-I$(TOP)/libogg/include" \
1263 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1264 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1265 --with-ogg-includes="$(TOP)/libogg/include" \
1266 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1267 touch libvorbis/stamp-h1
1269 libvorbis: libvorbis/stamp-h1
1270 @$(MAKE) -C libvorbis/lib all
1272 libvorbis-clean:
1273 -@$(MAKE) -C libvorbis clean
1274 @rm -f libvorbis/stamp-h1
1276 libvorbis-install: libvorbis
1277 @$(SEP)
1278 ifneq ($(MEDIA_SERVER_STATIC),y)
1279 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1280 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1281 endif
1283 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1284 @$(SEP)
1285 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna
1288 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1289 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1290 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1291 $(CONFIGURE) --prefix=/usr
1293 igmpproxy: igmpproxy/src/Makefile
1294 @$(SEP)
1295 @$(MAKE) -C igmpproxy/src
1297 igmpproxy-install: igmpproxy
1298 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1299 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1301 igmpproxy-clean:
1302 -$(MAKE) -C igmpproxy/src clean
1303 @rm -f igmpproxy/src/Makefile
1305 udev:
1306 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1307 PROGRAMS=udevtrigger
1309 udev-install: udev
1310 install -d $(INSTALLDIR)
1311 install -d $(TARGETDIR)
1312 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1314 hotplug2:
1315 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1317 hotplug2-install: hotplug2
1318 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1319 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1321 emf:
1322 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1324 emf-install: emf
1325 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1327 igs:
1328 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1330 igs-install: igs
1331 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1334 ebtables: dummy
1335 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1336 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1337 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1339 ebtables-install: ebtables
1340 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1342 @mkdir -p $(TARGETDIR)/rom/etc
1343 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1344 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1346 install -d $(INSTALLDIR)/ebtables/usr/lib
1347 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1348 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1349 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1351 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1352 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1353 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1355 ebtables-clean:
1356 make -C ebtables clean
1358 lzo/stamp-h1:
1359 cd lzo && \
1360 CFLAGS="-Os -Wall $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
1361 touch lzo/stamp-h1
1363 lzo: lzo/stamp-h1
1365 lzo-clean:
1366 -$(MAKE) -C lzo clean
1367 @rm -f lzo/stamp-h1
1369 lzo-install: lzo
1370 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1371 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1372 cd $(INSTALLDIR)/lzo/usr/lib && ln -sf liblzo2.so.2 liblzo2.so
1375 openvpn: openvpn/.conf openssl lzo
1377 openvpn/.conf:
1378 cd openvpn && CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1379 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1380 $(CONFIGURE) --prefix= \
1381 --with-lzo-headers="$(TOP)/lzo/include" \
1382 --with-ssl-headers="$(TOP)/openssl/include/" \
1383 --with-iproute-path="/usr/sbin/ip" \
1384 --disable-debug --disable-plugins --enable-management --enable-small \
1385 --disable-selinux --disable-socks --enable-password-save
1386 touch openvpn/.conf
1388 openvpn-clean:
1389 -$(MAKE) -C openvpn clean
1390 @rm -f openvpn/.conf
1392 openvpn-install: openvpn
1393 install -D openvpn/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1394 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1395 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1397 libevent/stamp-h1:
1398 cd libevent && \
1399 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1400 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1401 $(CONFIGURE)
1402 touch libevent/stamp-h1
1404 libevent: libevent/stamp-h1
1405 @$(SEP)
1406 $(MAKE) -C libevent
1408 libevent-clean:
1409 -@$(MAKE) -C libevent clean
1410 @rm -f libevent/stamp-h1 libevent/Makefile
1411 @rm -rf libevent/staged
1413 libevent-install: libevent
1414 install -d $(TOP)/libevent/staged
1415 $(MAKE) -C libevent DESTDIR=$(TOP)/libevent/staged install
1417 libnfsidmap/stamp-h1:
1418 cd libnfsidmap && \
1419 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1420 ac_cv_func_malloc_0_nonnull=yes \
1421 ac_cv_func_realloc_0_nonnull=yes \
1422 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
1423 touch libnfsidmap/stamp-h1
1425 libnfsidmap: libnfsidmap/stamp-h1
1426 @$(SEP)
1427 $(MAKE) -C libnfsidmap
1429 libnfsidmap-clean:
1430 -$(MAKE) -C libnfsidmap clean
1431 @rm -f libnfsidmap/stamp-h1
1432 @rm -rf libnfsidmap/staged
1434 libnfsidmap-install: libnfsidmap
1435 install -d $(TOP)/libnfsidmap/staged
1436 $(MAKE) -C libnfsidmap DESTDIR=$(TOP)/libnfsidmap/staged install
1438 portmap/stamp-h1:
1439 cd portmap \
1440 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1441 $(MAKE) -C portmap CC=$(CC) AR=$(AR) LD=$(LD) RANLIB=$(RANLIB) RPCUSER="nobody"
1442 touch portmap/stamp-h1
1444 portmap: portmap/stamp-h1
1445 @$(SEP)
1446 $(MAKE) -C portmap
1448 portmap-clean:
1449 -$(MAKE) -C portmap clean
1450 @rm -f portmap/stamp-h1
1452 portmap-install: portmap
1453 install -d $(INSTALLDIR)/portmap/usr/sbin
1454 install -D portmap/portmap $(INSTALLDIR)/portmap/usr/sbin/portmap
1455 $(STRIP) -s $(INSTALLDIR)/portmap/usr/sbin/portmap
1457 e2fsprogs/stamp-h1:
1458 cd e2fsprogs && \
1459 CFLAGS="-Os -Wall $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
1460 touch e2fsprogs/stamp-h1
1462 e2fsprogs: e2fsprogs/stamp-h1
1464 e2fsprogs-clean:
1465 -$(MAKE) -C e2fsprogs clean
1466 @rm -f e2fsprogs/stamp-h1
1468 e2fsprogs-install: e2fsprogs
1470 nfs-utils/stamp-h1: libevent-install e2fsprogs portmap libnfsidmap-install
1471 cd nfs-utils && STRIP='mipsel-uclibc-strip' \
1472 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
1473 -I$(TOP)/libevent/staged/usr/local/include -I$(TOP)/e2fsprogs/lib \
1474 -I$(TOP)/libnfsidmap/staged/usr/include -ffunction-sections -fdata-sections" \
1475 LDFLAGS="-L$(TOP)/libevent/staged/usr/local/lib -L$(TOP)/e2fsprogs/lib \
1476 -L$(TOP)/libnfsidmap/staged/usr/lib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1477 ac_cv_func_malloc_0_nonnull=yes \
1478 ac_cv_func_realloc_0_nonnull=yes \
1479 $(CONFIGURE) --disable-gss --without-tcp-wrappers --enable-static --enable-shared \
1480 --enable-nfsv4 --enable-nfsv3
1481 touch nfs-utils/stamp-h1
1483 nfs-utils: nfs-utils/stamp-h1
1485 nfs-utils-clean:
1486 -$(MAKE) -C nfs-utils clean
1487 @rm -f nfs-utils/stamp-h1
1489 nfs-utils-install: nfs-utils
1490 install -d $(INSTALLDIR)/nfs-utils/usr/sbin
1491 install -D nfs-utils/utils/mount/mount.nfs $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
1492 install -D nfs-utils/utils/nfsd/nfsd $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
1493 install -D nfs-utils/utils/showmount/showmount $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
1494 install -D nfs-utils/utils/exportfs/exportfs $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
1495 install -D nfs-utils/utils/statd/statd $(INSTALLDIR)/nfs-utils/usr/sbin/statd
1496 install -D nfs-utils/utils/mountd/mountd $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
1497 install -D nfs-utils/nfs.rc $(INSTALLDIR)/nfs-utils/usr/sbin/nfs.rc
1498 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
1499 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
1500 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
1501 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
1502 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/statd
1503 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
1507 # Generic rules
1511 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
1514 %-clean:
1515 @-[ ! -d $* ] || $(MAKE) -C $* clean
1517 %-distclean:
1518 @-[ ! -d $* ] || $(MAKE) -C $* distclean
1520 %-install: %
1521 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
1523 %-build:
1524 $(MAKE) $*-clean $*
1526 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
1528 .PHONY: all clean distclean mrproper install package
1529 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
1530 .PHONY: dummy libnet libpcap