Merge commit 'origin/Transmission' into tomato-shibby
[tomato.git] / release / src / router / Makefile
blob916e1ded471d460c2990d350fee7d2e95df3ff10
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 #Roadkill
65 obj-$(TCONFIG_NOCAT) += nocat
67 # !!TB
68 obj-$(TCONFIG_USB) += p910nd
69 obj-$(TCONFIG_USB) += scsi-idle
70 obj-y += libusb10
71 #obj-y += libusb
72 obj-y += usbmodeswitch
73 obj-$(TCONFIG_FTP) += vsftpd
75 ifeq ($(CONFIG_LINUX26),y)
76 ifeq ($(TCONFIG_SAMBASRV),y)
77 NEED_EX_NLS = y
78 endif
79 ifeq ($(TCONFIG_USB_EXTRAS),y)
80 NEED_EX_USB = y
81 endif
82 endif
84 ifeq ($(TCONFIG_SAMBASRV),y)
85 ifeq ($(TCONFIG_SAMBA3),y)
86 NEED_SAMBA3 = y
87 else
88 NEED_SAMBA2 = y
89 endif
90 endif
92 ifeq ($(TCONFIG_IPV6),y)
93 export TCONFIG_IPV6 := y
94 else
95 TCONFIG_IPV6 :=
96 endif
98 obj-$(NEED_SAMBA2) += samba
99 obj-$(NEED_SAMBA3) += samba3
100 obj-$(TCONFIG_NTFS) += ntfs-3g
101 obj-$(TCONFIG_EBTABLES) += ebtables
102 obj-$(TCONFIG_IPV6) += radvd
103 obj-$(TCONFIG_IPV6) += dhcpv6
105 obj-$(TCONFIG_MEDIA_SERVER) += zlib
106 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
107 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
108 obj-$(TCONFIG_MEDIA_SERVER) += libogg
109 obj-$(TCONFIG_MEDIA_SERVER) += flac
110 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
111 obj-$(TCONFIG_MEDIA_SERVER) += libexif
112 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
113 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
114 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
115 MEDIA_SERVER_STATIC=y
117 obj-y += miniupnpd
118 # obj-y += upnp
122 # configurable packages
124 obj-$(TCONFIG_L2TP) += xl2tpd
125 obj-$(TCONFIG_PPTP) += accel-pptp
126 obj-$(TCONFIG_HTTPS) += openssl
127 obj-$(TCONFIG_SSH) += dropbear
128 obj-$(TCONFIG_ZEBRA) += zebra
129 # obj-$(TCONFIG_IPP2P) += ipp2p
130 obj-$(TCONFIG_LZO) += lzo
131 obj-$(TCONFIG_OPENVPN) += openvpn
132 obj-$(TCONFIG_EMF) += emf
133 obj-$(TCONFIG_EMF) += igs
135 obj-$(TCONFIG_BT) += openssl
136 obj-$(TCONFIG_BT) += libevent
137 obj-$(TCONFIG_BT) += libcurl
138 obj-$(TCONFIG_BT) += transmission
139 obj-$(TCONFIG_BT) += zlib
141 obj-$(CONFIG_LINUX26) += hotplug2
142 obj-$(CONFIG_LINUX26) += udevtrigger
144 ifeq ($(TCONFIG_OPENVPN),y)
145 export FULL_OPENSSL := y
146 else
147 ifeq ($(TCONFIG_FTP_SSL),y)
148 export FULL_OPENSSL := y
149 else
150 ifeq ($(TCONFIG_BT),y)
151 export FULL_OPENSSL := y
152 else
153 FULL_OPENSSL :=
154 endif
155 endif
156 endif
158 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
159 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
164 # Basic rules
167 all: clean-build libc $(obj-y) kernel
170 kernel: $(LINUXDIR)/.config
171 @$(SEP)
173 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
174 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC); \
176 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
177 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC); \
179 ifeq ($(CONFIG_LINUX26),y)
180 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR)
181 endif
184 lzma-loader:
185 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD)
187 lzma-loader-install: lzma-loader
188 @$(SEP)
191 kmod: dummy
192 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC)
194 testfind:
195 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
196 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
198 install package: $(obj-install) $(LINUXDIR)/.config
199 @$(SEP)
201 install -d $(TARGETDIR)
204 # kernel modules
205 $(MAKE) -C $(LINUXDIR) modules_install \
206 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" \
207 DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
209 ifneq ($(CONFIG_LINUX26),y)
210 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded -x {} \;
211 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded -x {} \;
212 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded -x {} \;
213 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded -x {} \;
214 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded -x {} \;
215 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded -x {} \;
216 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded -x {} \;
218 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug -x -R .mdebug.abi32 {} \;
219 endif
221 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
223 # nice and clean
224 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
225 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
226 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
227 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
228 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
229 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
230 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
231 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
232 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
233 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
235 ##!!TB
236 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
237 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
238 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
239 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
240 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jfs/* . && rm -rf jfs || true
241 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
242 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
243 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
244 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
245 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
246 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
247 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
248 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
249 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
250 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
251 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
252 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
253 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
254 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
255 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
256 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
257 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
258 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
259 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
260 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
261 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
262 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
263 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
264 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
265 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
266 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
267 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
268 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
269 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
270 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
271 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
272 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
273 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
274 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv pwc/* . && rm -rf pwc || true
275 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv gl860/* . && rm -rf gl860 || true
276 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv m5602/* . && rm -rf m5602 || true
277 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv stv06xx/* . && rm -rf stv06xx || true
278 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv gspca/* . && rm -rf gspca || true
279 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
281 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
282 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
283 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
284 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
285 cd $(TARGETDIR)/lib/modules && rm -f */source || true
287 # misc
288 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
289 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
290 done
292 ifneq ($(TCONFIG_L7),y)
293 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
294 endif
296 # uClibc
297 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
298 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
299 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
300 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
301 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
302 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
303 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
304 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
305 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
306 ifeq ($(TCONFIG_SSH),y)
307 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
308 endif
309 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
310 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
311 $(STRIP) $(TARGETDIR)/lib/*.so.0
312 endif
314 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
316 @echo ---
318 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
319 @$(SRCBASE)/btools/libfoo.pl
320 else
321 @$(SRCBASE)/btools/libfoo.pl --noopt
322 endif
323 @chmod 0555 $(TARGETDIR)/lib/*.so*
324 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
326 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
327 # separated/copied extra stuff
328 @rm -rf $(PLATFORMDIR)/extras
329 @mkdir $(PLATFORMDIR)/extras
330 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
332 $(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
333 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
335 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
336 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
337 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
338 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
339 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
340 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
341 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/jfs.*o $(PLATFORMDIR)/extras/ || true
342 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
343 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
344 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
345 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
346 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
347 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
348 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
349 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
350 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
351 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
353 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
354 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
355 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
356 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*acm.*o $(PLATFORMDIR)/extras/ || true
357 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
358 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
360 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
361 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
362 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
363 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
364 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
365 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
366 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
367 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
368 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
369 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
370 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_ether.*o $(PLATFORMDIR)/extras/ || true
371 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
372 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/usbnet.*o $(PLATFORMDIR)/extras/ || true
373 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/rndis_host.*o $(PLATFORMDIR)/extras/ || true
374 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb || true
375 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
376 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
377 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
378 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
379 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
380 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
381 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
382 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
383 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
384 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
385 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
386 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ctf*.*o $(PLATFORMDIR)/extras/ || true
387 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
388 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
389 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
390 @mv $(TARGETDIR)/lib/modules/*/kernel/crypto/* $(PLATFORMDIR)/extras/ || true
391 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/crypto || true
393 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
394 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
395 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
396 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
397 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
398 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
399 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
401 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
402 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
403 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
404 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
405 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
406 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
407 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
408 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
409 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
410 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
411 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
412 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
413 ifneq ($(TCONFIG_USB),y)
414 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
415 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
416 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
417 endif
419 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
420 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
421 ifneq ($(TCONFIG_USB_EXTRAS),y)
422 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
423 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
424 endif
425 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
426 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
427 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
428 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
429 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
430 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
431 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
433 @mkdir -p $(PLATFORMDIR)/extras/apps
434 @mkdir -p $(PLATFORMDIR)/extras/lib
436 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
437 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
438 @mv $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
440 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
441 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
442 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
443 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
444 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
445 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
446 ifneq ($(NEED_EX_USB),y)
447 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
448 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
449 endif
450 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
452 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
453 ifeq ($(TCONFIG_L7PAT),y)
454 @cd layer7 && ./squish.sh
455 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
456 endif
458 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
459 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
460 @echo ---
462 @rm -f $(TARGETDIR)/lib/modules/*/build
464 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
465 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -nopad | tee target.info
467 # Package kernel and filesystem
468 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
469 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
470 # $(MAKE) -C $(LINUXDIR) zImage ; \
471 # else \
472 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
473 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
474 # fi
476 # Pad self-booting Linux to a 64 KB boundary
477 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
478 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
479 # Append filesystem to self-booting Linux
480 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
483 libc: $(LIBDIR)/ld-uClibc.so.0
484 # $(MAKE) -C ../../../tools-src/uClibc all
485 # $(MAKE) -C ../../../tools-src/uClibc install
489 # cleaners
492 clean: clean-build $(obj-clean)
493 rm -rf layer7/squished
494 rm -f .ipv6-y .ipv6-n
495 rm -f .fullssl-y .fullssl-n
496 make -C config clean
498 clean-build: dummy
499 rm -rf $(TARGETDIR)
500 rm -rf $(INSTALLDIR)
501 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
502 rm -rf $(PLATFORMDIR)/extras
504 distclean: clean
505 ifneq ($(INSIDE_MAK),1)
506 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
507 endif
508 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
511 # configuration
514 CONFIG_IN := config/config.in
516 config/conf config/mconf:
517 @$(MAKE) -C config
519 rconf: config/conf
520 @config/conf $(CONFIG_IN)
522 rmconf: config/mconf
523 @config/mconf $(CONFIG_IN)
525 roldconf: config/conf
526 @config/conf -o $(CONFIG_IN)
527 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean
529 kconf:
530 @$(MAKE) -C $(LINUXDIR) config
532 kmconf:
533 @$(MAKE) -C $(LINUXDIR) menuconfig
535 koldconf:
536 @$(MAKE) -C $(LINUXDIR) oldconfig
537 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
539 bboldconf:
540 @$(MAKE) -C busybox oldconfig
542 config conf: rconf kconf
544 menuconfig mconf: rmconf kmconf
546 .ipv6-y .ipv6-n:
547 @rm -f .ipv6-y .ipv6-n
548 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
549 @touch $@
551 .fullssl-y .fullssl-n:
552 @rm -f .fullssl-y .fullssl-n
553 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
554 @touch $@
556 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
558 oldconfig oldconf: koldconf roldconf dependconf bboldconf
562 # overrides and extra dependencies
565 busybox: dummy
566 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)"
568 # V=1
570 busybox-install:
571 rm -rf $(INSTALLDIR)/busybox
572 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
574 busybox-clean:
575 $(MAKE) -C busybox distclean
577 busybox-config:
578 $(MAKE) -C busybox menuconfig
581 httpd: shared nvram mssl
582 @$(SEP)
583 @$(MAKE) -C httpd
585 www-install:
586 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
588 matrixssl:
589 @$(SEP)
590 @$(MAKE) -C matrixssl/src
592 matrixssl-install:
593 @true
595 matrixssl-clean:
596 $(MAKE) -C matrixssl/src clean
598 cyassl/stamp-h1:
599 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
600 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections \
601 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
602 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
603 PTHREAD_LIBS="-lpthread" \
604 $(CONFIGURE)
605 @touch cyassl/stamp-h1
607 cyassl: cyassl/stamp-h1
608 @$(SEP)
609 @$(MAKE) -C cyassl
611 cyassl-clean:
612 -@$(MAKE) -C cyassl clean
613 @rm -f cyassl/stamp-h1
615 cyassl-install:
616 @true
618 ifeq ($(FULL_OPENSSL),y)
619 OPENSSL_CIPHERS:=enable-rc5
620 else
621 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-aes no-aes192 no-cast no-des no-modes no-tls1 no-tlsext
622 endif
624 openssl/stamp-h1:
625 cd openssl && \
626 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
627 -ffunction-sections -fdata-sections -Wl,--gc-sections \
628 shared $(OPENSSL_CIPHERS) \
629 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
630 no-seed no-capieng no-cms no-gms no-gmp no-rfc3779 \
631 no-ec no-ecdh no-ecdsa no-err no-hw no-jpake no-threads \
632 no-zlib no-engine no-engines no-sse2 no-perlasm \
633 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
635 @$(MAKE) -C openssl clean
636 @touch openssl/stamp-h1
638 openssl: openssl/stamp-h1
640 openssl-clean:
641 -@$(MAKE) -C openssl clean
642 @rm -f openssl/stamp-h1
644 openssl-install: openssl
645 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
646 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
647 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
649 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
650 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
651 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
653 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
655 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
656 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
658 ifeq ($(FULL_OPENSSL),y)
659 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
660 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
661 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
662 endif
664 mssl: $(if $(FULL_OPENSSL),openssl,cyassl)
666 mdu: shared mssl
668 rc: nvram shared
670 bridge/Makefile:
671 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
672 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
674 bridge: bridge/Makefile
675 @$(SEP)
676 @$(MAKE) -C bridge
678 bridge-clean:
679 -@$(MAKE) -C bridge clean
680 @rm -f bridge/Makefile
682 bridge-install:
683 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
684 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
686 dnsmasq:
687 @$(SEP)
688 @$(MAKE) -C dnsmasq \
689 COPTS="$(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6) $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
690 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC"
692 dnsmasq-install:
693 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
694 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
696 iptables:
697 @$(SEP)
698 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE"
700 iptables-install:
701 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
702 cd $(INSTALLDIR)/iptables/usr/sbin && \
703 ln -sf iptables iptables-restore
705 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
706 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
708 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
710 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
711 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
712 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
714 ifeq ($(TCONFIG_IPV6),y)
715 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
716 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
717 cd $(INSTALLDIR)/iptables/usr/sbin && \
718 ln -sf ip6tables ip6tables-restore
719 endif
721 iptables-clean:
722 -$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
724 ppp:
725 @$(SEP)
726 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
727 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
729 ppp-%:
730 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
732 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
733 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
734 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
735 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
736 @touch rp-pppoe/src/stamp-h1
738 rp-pppoe: pppd rp-pppoe/src/stamp-h1
739 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so
741 rp-pppoe-clean:
742 -$(MAKE) -C rp-pppoe/src clean
743 @rm -f rp-pppoe/src/pppoe-relay
744 @rm -f rp-pppoe/src/stamp-h1
746 rp-pppoe-install: rp-pppoe
747 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
748 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
749 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
750 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
753 upnp: nvram shared iptables
755 miniupnpd-config:
756 @cd miniupnpd && ./genconfig.sh
758 miniupnpd: iptables miniupnpd-config
759 @$(SEP)
760 $(MAKE) -C miniupnpd miniupnpd -f Makefile.linux \
761 TARGET_OPENWRT="not really" CC=$(CC) \
762 CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/iptables/include" \
763 LDFLAGS="-L$(TOP)/iptables -liptc" LIBS=""
765 miniupnpd-clean:
766 -$(MAKE) -C miniupnpd -f Makefile.linux clean
767 @rm -f miniupnpd/config.h
769 miniupnpd-install:
770 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
771 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
773 # !!TB
774 shared: busybox
776 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
777 @$(SEP)
778 $(MAKE) -C vsftpd
780 vsftpd-install: vsftpd
781 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
782 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
784 ntfs-3g/Makefile:
785 cd ntfs-3g && \
786 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
787 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
788 $(CONFIGURE) --enable-shared=no --enable-static=no \
789 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
790 --disable-ntfsprogs --disable-crypto --without-uuid \
791 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
793 ntfs-3g: ntfs-3g/Makefile
794 @$(MAKE) -C ntfs-3g
796 ntfs-3g-clean:
797 -@$(MAKE) -C ntfs-3g clean
798 @rm -f ntfs-3g/Makefile
800 ntfs-3g-install: ntfs-3g
801 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
802 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
803 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
804 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
805 ln -sf ../bin/ntfs-3g mount.ntfs
807 libusb10/Makefile: libusb10/Makefile.in
808 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
809 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
811 libusb10: libusb10/Makefile
812 $(MAKE) -C $@
814 libusb10-install: libusb10
815 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
816 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
818 libusb10-clean:
819 -@$(MAKE) -C $@ clean
820 @rm -rf libusb10/Makefile
822 libusb/Makefile: libusb/Makefile.in
823 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
824 $(CONFIGURE) --prefix=/usr \
825 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
826 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
827 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
829 libusb: libusb10 libusb/Makefile
830 $(MAKE) -C $@
832 libusb-install: libusb
833 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
834 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
836 libusb-clean:
837 -@$(MAKE) -C $@ clean
838 @rm -rf libusb/Makefile
840 usbmodeswitch: libusb10
841 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
842 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
843 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
845 usbmodeswitchdb-install:
846 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
847 # compress whitespace
848 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
849 F=`basename $$D`; \
850 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
851 done
853 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
854 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
855 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
856 @mkdir -p $(TARGETDIR)/rom/etc
857 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
860 radvd/stamp-h1:
861 cd radvd && CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
862 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
863 $(CONFIGURE) --prefix=""
864 @$(MAKE) -C radvd clean
865 @touch radvd/stamp-h1
867 radvd: radvd/stamp-h1
869 radvd-clean:
870 -@$(MAKE) -C radvd distclean
871 @rm -f radvd/stamp-h1
873 radvd-install: radvd
874 install -D radvd/radvd $(INSTALLDIR)/radvd/usr/sbin/radvd
875 $(STRIP) $(INSTALLDIR)/radvd/usr/sbin/radvd
877 dhcpv6/stamp-h1:
878 @cd dhcpv6 && \
879 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
880 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
881 ac_cv_func_setpgrp_void=yes \
882 $(CONFIGURE) --prefix= --with-localdbdir=/var
883 @$(MAKE) -C dhcpv6 clean
884 @touch dhcpv6/stamp-h1
886 dhcpv6: dhcpv6/stamp-h1
887 @$(SEP)
888 @$(MAKE) -C dhcpv6 dhcp6c
890 dhcpv6-install: dhcpv6
891 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
892 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
894 dhcpv6-clean:
895 -@$(MAKE) -C dhcpv6 clean
896 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
899 p910nd:
900 samba:
901 samba3:
903 nvram: shared
905 prebuilt: shared
907 vlan:
908 @$(SEP)
909 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
911 vlan-install:
912 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
913 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
916 pptp-client-install:
917 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
918 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
921 accel-pptp: pppd accel-pptp/Makefile
922 @$(MAKE) -C accel-pptp
924 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
925 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
926 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
928 accel-pptp-clean:
929 -@$(MAKE) -C accel-pptp clean
930 @rm -f accel-pptp/Makefile
932 accel-pptp-install: accel-pptp
933 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
934 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
937 pppd/Makefile: pppd/linux/Makefile.top
938 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
940 pppd: pppd/Makefile
941 @$(SEP)
942 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
944 pppd-clean:
945 -$(MAKE) -C pppd clean
946 @rm -f pppd/Makefile
948 pppd-install: pppd
949 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
950 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
951 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
952 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
953 ifeq ($(TCONFIG_L2TP),y)
954 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
955 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
956 endif
958 # ipupdate-install:
959 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
960 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
962 zebra/stamp-h1:
963 @cd zebra && rm -f config.cache && \
964 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
965 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
966 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
967 $(CONFIGURE) --sysconfdir=/etc \
968 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
969 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
970 @touch zebra/stamp-h1
972 zebra: zebra/stamp-h1
973 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
975 zebra-clean:
976 -@$(MAKE) -C zebra clean
977 @rm -f zebra/stamp-h1
979 zebra-install: zebra
980 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
981 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
982 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
983 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
984 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
985 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
988 rp-l2tp-install:
989 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
990 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
991 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
992 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
993 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
994 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
995 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
997 xl2tpd: pppd
998 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
1000 xl2tpd-install: xl2tpd
1001 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1002 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1005 bpalogin-install:
1006 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1007 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1010 # libnet:
1011 # @$(SEP)
1012 # @-mkdir -p libnet/lib
1013 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1015 # libpcap:
1016 # @$(SEP)
1017 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1019 libbcm:
1020 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
1022 libbcm-install:
1023 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1024 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1027 iproute2:
1028 @$(SEP)
1029 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1031 iproute2-install: iproute2
1032 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1033 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1034 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1035 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1038 ntpc: nvram shared
1041 dropbear: dropbear/config.h
1042 @$(SEP)
1043 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1
1045 dropbear-install:
1046 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1047 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1048 cd $(INSTALLDIR)/dropbear/usr/bin && \
1049 ln -sf dropbearmulti dropbear && \
1050 ln -sf dropbearmulti dropbearconvert && \
1051 ln -sf dropbearmulti dropbearkey && \
1052 ln -sf dropbearmulti dbclient && \
1053 ln -sf dropbearmulti ssh && \
1054 ln -sf dropbearmulti scp
1056 dropbear-clean:
1057 -@$(MAKE) -C dropbear clean
1058 @rm -f dropbear/config.h
1060 dropbear/config.h:
1061 cd dropbear && \
1062 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1063 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1064 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1065 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1066 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1067 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty --enable-bundled-libtom
1068 @$(MAKE) -C dropbear clean
1070 # Media libraries
1072 sqlite/stamp-h1:
1073 cd sqlite && \
1074 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1075 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1076 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1077 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1078 touch sqlite/stamp-h1
1080 sqlite: sqlite/stamp-h1
1081 @$(MAKE) -C sqlite all
1083 sqlite-clean:
1084 -@$(MAKE) -C sqlite clean
1085 @rm -f sqlite/stamp-h1
1087 sqlite-install: sqlite
1088 @$(SEP)
1089 ifneq ($(MEDIA_SERVER_STATIC),y)
1090 install -D sqlite/.libs/libsqlite3.so.0 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1091 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1092 endif
1094 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1096 FFMPEG_DECODERS:=aac ac3 atrac3 flac h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1097 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1099 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1100 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1102 FFMPEG_PROTOCOLS:=file
1103 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1105 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
1106 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1108 ffmpeg/stamp-h1: zlib
1109 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1110 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1111 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1112 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1113 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1114 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1115 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1116 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1117 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1118 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1119 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1120 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1121 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1122 --extra-libs="-L$(TOP)/zlib -lz" \
1123 --enable-zlib --disable-debug --prefix=''
1124 touch ffmpeg/stamp-h1
1126 ffmpeg: ffmpeg/stamp-h1 zlib
1127 @$(MAKE) -C ffmpeg all
1129 ffmpeg-clean:
1130 -@$(MAKE) -C ffmpeg clean
1131 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1133 ffmpeg-install: ffmpeg
1134 @$(SEP)
1135 ifneq ($(MEDIA_SERVER_STATIC),y)
1136 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1137 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1138 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1139 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1140 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1141 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1142 endif
1144 libogg/stamp-h1:
1145 cd libogg && \
1146 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1147 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1148 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1149 touch libogg/stamp-h1
1151 libogg: libogg/stamp-h1
1152 @$(MAKE) -C libogg all
1154 libogg-clean:
1155 -@$(MAKE) -C libogg clean
1156 @rm -f libogg/stamp-h1
1158 libogg-install: libogg
1159 @$(SEP)
1160 ifneq ($(MEDIA_SERVER_STATIC),y)
1161 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1162 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1163 endif
1165 flac/stamp-h1: libogg
1166 cd flac && \
1167 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1168 CPPFLAGS="-I$(TOP)/libogg/include" \
1169 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1170 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1171 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1172 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1173 touch flac/stamp-h1
1175 flac: flac/stamp-h1 libogg
1176 @$(MAKE) -C flac/src/libFLAC all
1178 flac-clean:
1179 -@$(MAKE) -C flac clean
1180 @rm -f flac/stamp-h1
1182 flac-install: flac
1183 @$(SEP)
1184 ifneq ($(MEDIA_SERVER_STATIC),y)
1185 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1186 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1187 endif
1189 jpeg/stamp-h1:
1190 cd jpeg && \
1191 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1192 touch jpeg/stamp-h1
1194 jpeg: jpeg/stamp-h1
1195 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so
1197 jpeg-clean:
1198 -@$(MAKE) -C jpeg clean
1199 @rm -f jpeg/stamp-h1 jpeg/Makefile
1201 jpeg-install: jpeg
1202 @$(SEP)
1203 ifneq ($(MEDIA_SERVER_STATIC),y)
1204 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1205 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1206 endif
1208 libexif/stamp-h1:
1209 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1210 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1211 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1212 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1213 touch libexif/stamp-h1
1215 libexif: libexif/stamp-h1
1216 @$(MAKE) -C libexif all
1218 libexif-clean:
1219 -@$(MAKE) -C libexif clean
1220 @rm -f libexif/stamp-h1
1222 libexif-install: libexif
1223 @$(SEP)
1224 ifneq ($(MEDIA_SERVER_STATIC),y)
1225 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1226 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1227 endif
1229 zlib/stamp-h1:
1230 cd zlib && \
1231 CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1232 ./configure --shared --prefix=''
1233 touch zlib/stamp-h1
1235 zlib: zlib/stamp-h1
1236 @$(MAKE) -C zlib CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) all
1238 zlib-clean:
1239 -@$(MAKE) -C zlib clean
1240 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1242 zlib-install: zlib
1243 @$(SEP)
1244 ifneq ($(MEDIA_SERVER_STATIC),y)
1245 install -d $(INSTALLDIR)/zlib/usr/lib
1246 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1247 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1248 endif
1249 ifeq ($(TCONFIG_BT),y)
1250 install -d $(INSTALLDIR)/zlib/usr/lib
1251 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1252 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1253 endif
1255 libid3tag/stamp-h1: zlib
1256 cd libid3tag && \
1257 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1258 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1259 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1260 --disable-debugging --disable-profiling
1261 touch libid3tag/stamp-h1
1263 libid3tag: libid3tag/stamp-h1 zlib
1264 @$(MAKE) -C libid3tag all
1266 libid3tag-clean:
1267 -@$(MAKE) -C libid3tag clean
1268 @rm -f libid3tag/stamp-h1
1270 libid3tag-install: libid3tag
1271 @$(SEP)
1272 ifneq ($(MEDIA_SERVER_STATIC),y)
1273 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1274 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1275 endif
1277 libvorbis/stamp-h1: libogg
1278 cd libvorbis && \
1279 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1280 CPPFLAGS="-I$(TOP)/libogg/include" \
1281 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1282 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1283 --with-ogg-includes="$(TOP)/libogg/include" \
1284 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1285 touch libvorbis/stamp-h1
1287 libvorbis: libvorbis/stamp-h1
1288 @$(MAKE) -C libvorbis/lib all
1290 libvorbis-clean:
1291 -@$(MAKE) -C libvorbis clean
1292 @rm -f libvorbis/stamp-h1
1294 libvorbis-install: libvorbis
1295 @$(SEP)
1296 ifneq ($(MEDIA_SERVER_STATIC),y)
1297 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1298 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1299 endif
1301 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1302 @$(SEP)
1303 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna
1306 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1307 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1308 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1309 $(CONFIGURE) --prefix=/usr
1311 igmpproxy: igmpproxy/src/Makefile
1312 @$(SEP)
1313 @$(MAKE) -C igmpproxy/src
1315 igmpproxy-install: igmpproxy
1316 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1317 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1319 igmpproxy-clean:
1320 -$(MAKE) -C igmpproxy/src clean
1321 @rm -f igmpproxy/src/Makefile
1323 udev:
1324 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1325 PROGRAMS=udevtrigger
1327 udev-install: udev
1328 install -d $(INSTALLDIR)
1329 install -d $(TARGETDIR)
1330 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1332 hotplug2:
1333 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1335 hotplug2-install: hotplug2
1336 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1337 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1339 emf:
1340 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1342 emf-install: emf
1343 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1345 igs:
1346 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1348 igs-install: igs
1349 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1352 ebtables: dummy
1353 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1354 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1355 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1357 ebtables-install: ebtables
1358 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1360 @mkdir -p $(TARGETDIR)/rom/etc
1361 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1362 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1364 install -d $(INSTALLDIR)/ebtables/usr/lib
1365 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1366 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1367 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1369 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1370 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1371 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1373 ebtables-clean:
1374 make -C ebtables clean
1376 #Roadkill
1377 glib:
1378 @$(SEP)
1379 @cd glib && $(CONFIGURE) --prefix=/usr glib_cv_prog_cc_ansi_proto=no glib_cv_has__inline=yes glib_cv_has__inline__=yes glib_cv_hasinline=yes \
1380 glib_cv_sane_realloc=yes glib_cv_va_copy=no glib_cv___va_copy=yes glib_cv_va_val_copy=yes glib_cv_rtldglobal_broken=no \
1381 glib_cv_uscore=no glib_cv_func_pthread_mutex_trylock_posix=yes glib_cv_func_pthread_cond_timedwait_posix=yes glib_cv_sizeof_gmutex=24 \
1382 glib_cv_byte_contents_gmutex="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0" glib_cv_sys_pthread_getspecific_posix=yes \
1383 glib_cv_sys_pthread_mutex_trylock_posix=yes glib_cv_sys_pthread_cond_timedwait_posix=yes ac_cv_func_getpwuid_r=yes ac_cv_func_getpwuid_r_posix=yes
1384 @$(MAKE) -C glib
1386 glib-clean:
1387 $(MAKE) -C glib clean
1389 glib-install:
1390 @$(MAKE) -C glib DESTDIR=$(INSTALLDIR)/glib install
1392 #Roadkill
1393 nocat: glib glib-install
1394 @$(SEP)
1395 @cd nocat && \
1396 NC_CONF_PATH="/" \
1397 $(CONFIGURE) --with-firewall=iptables --with-glib-prefix="$(INSTALLDIR)/glib/usr" --localstatedir=/var --sysconfdir=/etc
1398 @$(MAKE) -C nocat
1400 echo *** cleaning up glib staging after compile
1401 rm -rfv $(INSTALLDIR)/glib/usr
1402 echo *** integrate glib to nocat installdir
1403 install -d $(INSTALLDIR)/nocat/usr/lib
1404 install -D glib/.libs/libglib-1.2.so.0.0.10 $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1405 cd $(INSTALLDIR)/nocat/usr/lib && ln -s libglib-1.2.so.0.0.10 libglib-1.2.so.0
1406 $(STRIP) $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1408 nocat-clean:
1409 $(MAKE) -C nocat clean
1411 nocat-install:
1412 install -D nocat/src/splashd $(INSTALLDIR)/nocat/usr/sbin/splashd
1413 $(STRIP) $(INSTALLDIR)/nocat/usr/sbin/splashd
1414 mkdir -p $(INSTALLDIR)/nocat/usr/libexec/nocat
1415 install -D nocat/libexec/iptables/* $(INSTALLDIR)/nocat/usr/libexec/nocat
1417 lzo/stamp-h1:
1418 cd lzo && \
1419 CFLAGS="-Os -Wall $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
1420 touch lzo/stamp-h1
1422 lzo: lzo/stamp-h1
1424 lzo-clean:
1425 -$(MAKE) -C lzo clean
1426 @rm -f lzo/stamp-h1
1428 lzo-install: lzo
1429 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1430 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1431 cd $(INSTALLDIR)/lzo/usr/lib && ln -sf liblzo2.so.2 liblzo2.so
1434 openvpn: openvpn/.conf openssl lzo
1436 openvpn/.conf:
1437 cd openvpn && CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1438 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1439 $(CONFIGURE) --prefix= \
1440 --with-lzo-headers="$(TOP)/lzo/include" \
1441 --with-ssl-headers="$(TOP)/openssl/include/" \
1442 --with-iproute-path="/usr/sbin/ip" \
1443 --disable-debug --disable-plugins --enable-management --enable-small \
1444 --disable-selinux --disable-socks --enable-password-save
1445 touch openvpn/.conf
1447 openvpn-clean:
1448 -$(MAKE) -C openvpn clean
1449 @rm -f openvpn/.conf
1451 openvpn-install: openvpn
1452 install -D openvpn/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1453 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1454 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1456 #shibby
1457 libcurl/stamp-h1: zlib openssl
1458 cd libcurl && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1459 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1460 CPPFLAGS="-I$(TOP)/zlib" \
1461 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1462 $(CONFIGURE) --prefix=/usr --disable-thread --enable-shared --enable-static \
1463 --enable-ares --enable-cookies --enable-crypto-auth --enable-nonblocking \
1464 --enable-file --enable-ftp --enable-http --enable-ipv6 --enable-tftp \
1465 --disable-nls --disable-ares --disable-dict --disable-debug --disable-gopher \
1466 --disable-ldap --disable-manual --disable-telnet --disable-verbose \
1467 --with-random="/dev/urandom" --with-ssl="$(TOP)/openssl" \
1468 --without-gnutls --without-krb4 --without-libidn \
1469 --with-linux-headers=$(LINUXDIR)/include \
1470 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
1471 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
1472 touch libcurl/stamp-h1
1474 libcurl: libcurl/stamp-h1
1475 @$(MAKE) -C libcurl
1477 libcurl-clean:
1478 -@$(MAKE) -C libcurl clean
1479 @rm -f libcurl/stamp-h1 libcurl/Makefile
1481 libcurl-install: libcurl
1482 install -d $(INSTALLDIR)/libcurl/usr/lib
1483 install -D libcurl/lib/.libs/libcurl.so.4.2.0 $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.2.0
1484 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.2.0
1485 cd $(INSTALLDIR)/libcurl/usr/lib/ && \
1486 ln -sf libcurl.so.4.2.0 libcurl.so.4 && \
1487 ln -sf libcurl.so.4.2.0 libcurl.so
1489 libevent/stamp-h1:
1490 cd libevent && \
1491 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1492 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1493 $(CONFIGURE)
1494 touch libevent/stamp-h1
1496 libevent: libevent/stamp-h1
1497 @$(SEP)
1498 $(MAKE) -C libevent
1500 libevent-clean:
1501 -@$(MAKE) -C libevent clean
1502 @rm -f libevent/stamp-h1 libevent/Makefile
1503 @rm -rf libevent/staged
1505 libevent-install: libevent
1506 install -d $(INSTALLDIR)/libevent/usr/lib
1507 install libevent/.libs/libevent-2.0.so.5.0.1 $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
1508 $(STRIP) -s $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
1509 install -d $(TOP)/libevent/staged
1510 $(MAKE) -C libevent DESTDIR=$(TOP)/libevent/staged install
1512 transmission/stamp-h1: openssl libcurl libevent zlib
1513 cd transmission && CC=$(CC) AR=$(AR) LD=$(LD) STRIP='mipsel-uclibc-strip' \
1514 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
1515 --param large-function-growth=800 --param max-inline-insns-single=3000 \
1516 -ffunction-sections -fdata-sections" \
1517 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1518 CPPFLAGS="-I$(TOP)/zlib" \
1519 $(CONFIGURE) --target=mipsel-linux --prefix=/usr --disable-gtk --disable-nls \
1520 --enable-lightweight --enable-largefile \
1521 --with-ssl="$(TOP)/openssl" \
1522 --with-ssl-headers="$(TOP)/openssl/include/" \
1523 LIBCURL_CFLAGS="-I$(TOP)/libcurl/include" \
1524 LIBCURL_LIBS="-L$(TOP)/libcurl/lib/.libs/ -lcurl" \
1525 LIBEVENT_CFLAGS="-I$(TOP)/libevent/include" \
1526 LIBEVENT_LIBS="-L$(TOP)/libevent/.libs -levent" \
1527 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
1528 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
1529 touch transmission/stamp-h1
1531 transmission: transmission/stamp-h1
1532 @$(SEP)
1533 $(MAKE) -C transmission
1535 transmission-clean:
1536 -@$(MAKE) -C transmission clean
1537 @rm -f transmission/stamp-h1 transmission/Makefile
1539 transmission-install: transmission
1540 $(MAKE) -C transmission DESTDIR=$(INSTALLDIR)/transmission install-strip
1541 @rm -rf $(INSTALLDIR)/transmission/usr/share/man
1542 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-cli
1543 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-show
1544 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-edit
1545 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-daemon
1546 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-remote
1547 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-create
1548 install -D transmission/btcheck $(INSTALLDIR)/transmission/usr/bin/btcheck
1549 install -D transmission/btqueue $(INSTALLDIR)/transmission/usr/bin/btqueue
1551 libnfsidmap/stamp-h1:
1552 cd libnfsidmap && \
1553 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1554 ac_cv_func_malloc_0_nonnull=yes \
1555 ac_cv_func_realloc_0_nonnull=yes \
1556 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
1557 touch libnfsidmap/stamp-h1
1559 libnfsidmap: libnfsidmap/stamp-h1
1560 @$(SEP)
1561 $(MAKE) -C libnfsidmap
1563 libnfsidmap-clean:
1564 -$(MAKE) -C libnfsidmap clean
1565 @rm -f libnfsidmap/stamp-h1
1566 @rm -rf libnfsidmap/staged
1568 libnfsidmap-install: libnfsidmap
1569 install -d $(TOP)/libnfsidmap/staged
1570 $(MAKE) -C libnfsidmap DESTDIR=$(TOP)/libnfsidmap/staged install
1572 portmap/stamp-h1:
1573 cd portmap \
1574 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1575 $(MAKE) -C portmap CC=$(CC) AR=$(AR) LD=$(LD) RANLIB=$(RANLIB) RPCUSER="nobody"
1576 touch portmap/stamp-h1
1578 portmap: portmap/stamp-h1
1579 @$(SEP)
1580 $(MAKE) -C portmap
1582 portmap-clean:
1583 -$(MAKE) -C portmap clean
1584 @rm -f portmap/stamp-h1
1586 portmap-install: portmap
1587 install -d $(INSTALLDIR)/portmap/usr/sbin
1588 install -D portmap/portmap $(INSTALLDIR)/portmap/usr/sbin/portmap
1589 $(STRIP) -s $(INSTALLDIR)/portmap/usr/sbin/portmap
1591 e2fsprogs/stamp-h1:
1592 cd e2fsprogs && \
1593 CFLAGS="-Os -Wall $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
1594 touch e2fsprogs/stamp-h1
1596 e2fsprogs: e2fsprogs/stamp-h1
1598 e2fsprogs-clean:
1599 -$(MAKE) -C e2fsprogs clean
1600 @rm -f e2fsprogs/stamp-h1
1602 e2fsprogs-install: e2fsprogs
1604 nfs-utils/stamp-h1: libevent-install e2fsprogs portmap libnfsidmap-install
1605 cd nfs-utils && STRIP='mipsel-uclibc-strip' \
1606 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
1607 -I$(TOP)/libevent/staged/usr/local/include -I$(TOP)/e2fsprogs/lib \
1608 -I$(TOP)/libnfsidmap/staged/usr/include -ffunction-sections -fdata-sections" \
1609 LDFLAGS="-L$(TOP)/libevent/staged/usr/local/lib -L$(TOP)/e2fsprogs/lib \
1610 -L$(TOP)/libnfsidmap/staged/usr/lib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1611 ac_cv_func_malloc_0_nonnull=yes \
1612 ac_cv_func_realloc_0_nonnull=yes \
1613 $(CONFIGURE) --disable-gss --without-tcp-wrappers --enable-static --enable-shared \
1614 --enable-nfsv4 --enable-nfsv3
1615 touch nfs-utils/stamp-h1
1617 nfs-utils: nfs-utils/stamp-h1
1619 nfs-utils-clean:
1620 -$(MAKE) -C nfs-utils clean
1621 @rm -f nfs-utils/stamp-h1
1623 nfs-utils-install: nfs-utils
1624 install -d $(INSTALLDIR)/nfs-utils/usr/sbin
1625 install -D nfs-utils/utils/mount/mount.nfs $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
1626 install -D nfs-utils/utils/nfsd/nfsd $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
1627 install -D nfs-utils/utils/showmount/showmount $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
1628 install -D nfs-utils/utils/exportfs/exportfs $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
1629 install -D nfs-utils/utils/statd/statd $(INSTALLDIR)/nfs-utils/usr/sbin/statd
1630 install -D nfs-utils/utils/mountd/mountd $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
1631 install -D nfs-utils/nfs.rc $(INSTALLDIR)/nfs-utils/usr/sbin/nfs.rc
1632 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
1633 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
1634 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
1635 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
1636 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/statd
1637 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
1640 # Generic rules
1644 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
1647 %-clean:
1648 @-[ ! -d $* ] || $(MAKE) -C $* clean
1650 %-distclean:
1651 @-[ ! -d $* ] || $(MAKE) -C $* distclean
1653 %-install: %
1654 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
1656 %-build:
1657 $(MAKE) $*-clean $*
1659 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
1661 .PHONY: all clean distclean mrproper install package
1662 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
1663 .PHONY: dummy libnet libpcap