039326069bd237e466996314a4a8e0d814935fe0
[openwrt/staging/florian.git] / package / base-files / Makefile
1 #
2 # Copyright (C) 2007-2010 OpenWrt.org
3 # Copyright (C) 2010 Vertical Communications
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=base-files
13 PKG_RELEASE:=52
14
15 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
16
17 include $(INCLUDE_DIR)/package.mk
18
19 ifneq ($(DUMP),1)
20 TARGET:=-$(BOARD)
21 ifneq ($(wildcard $(PLATFORM_DIR)/base-files-$(PROFILE) $(PLATFORM_SUBDIR)/base-files-$(PROFILE)),)
22 TARGET:=$(TARGET)-$(PROFILE)
23 endif
24 LIBGCC_VERSION:=$(GCC_VERSION)
25 ifneq ($(findstring $(ARCH) , mips64 x86_64 ),)
26 LIB_SUFFIX:=64
27 endif
28 else
29 LIBC_VERSION:=<LIBC_VERSION>
30 LIBGCC_VERSION:=<LIBGCC_VERSION>
31 endif
32
33 define Package/base-files
34 SECTION:=base
35 CATEGORY:=Base system
36 TITLE:=Base filesystem for OpenWrt
37 URL:=http://openwrt.org/
38 VERSION:=$(PKG_RELEASE)-$(REVISION)
39 $(call Config,network.lan.proto,string,static,LAN Protocol)
40 $(call Config,network.lan.ipaddr,ip,192.168.1.1,LAN IP Address)
41 $(call Config,network.lan.netmask,netmask,255.255.255.0,LAN Network Mask)
42 $(call Config,network.lan.gateway,ip,,LAN Gateway)
43 $(call Config,network.lan.dns,ip,,LAN DNS server)
44 endef
45
46 define Package/base-files/conffiles
47 /etc/banner
48 /etc/hosts
49 /etc/inittab
50 /etc/group
51 /etc/passwd
52 /etc/profile
53 /etc/shells
54 /etc/sysctl.conf
55 $(call $(TARGET)/conffiles)
56 endef
57
58 define Package/base-files/description
59 This package contains a base filesystem and system scripts for OpenWrt.
60 endef
61
62
63 define Package/gcc/Default
64 SECTION:=libs
65 CATEGORY:=Base system
66 URL:=http://gcc.gnu.org/
67 VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE)
68 endef
69
70
71 define Package/libgcc
72 $(call Package/gcc/Default)
73 TITLE:=GCC support library
74 DEPENDS+=@!(TARGET_avr32||TARGET_coldfire)
75 endef
76
77 define Package/libgcc/config
78 menu "Configuration"
79 depends EXTERNAL_TOOLCHAIN && PACKAGE_libgcc
80
81 config LIBGCC_ROOT_DIR
82 string
83 prompt "libgcc shared library base directory"
84 depends EXTERNAL_TOOLCHAIN && PACKAGE_libgcc
85 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
86 default "/" if NATIVE_TOOLCHAIN
87
88 config LIBGCC_FILE_SPEC
89 string
90 prompt "libgcc shared library files (use wildcards)"
91 depends EXTERNAL_TOOLCHAIN && PACKAGE_libgcc
92 default "./lib/libgcc_s.so.*"
93
94 endmenu
95 endef
96
97
98 define Package/libssp
99 $(call Package/gcc/Default)
100 DEPENDS+=@SSP_SUPPORT
101 TITLE:=GCC support library
102 endef
103
104 define Package/libssp/config
105 menu "Configuration"
106 depends EXTERNAL_TOOLCHAIN && PACKAGE_libssp
107
108 config LIBSPP_ROOT_DIR
109 string
110 prompt "libssp shared library base directory"
111 depends EXTERNAL_TOOLCHAIN && PACKAGE_libssp
112 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
113 default "/" if NATIVE_TOOLCHAIN
114
115 config LIBSSP_FILE_SPEC
116 string
117 prompt "libssp shared library files (use wildcards)"
118 depends EXTERNAL_TOOLCHAIN && PACKAGE_libssp
119 default "./lib/libssp.so.*"
120
121 endmenu
122 endef
123
124
125 define Package/libstdcpp
126 $(call Package/gcc/Default)
127 NAME:=libstdc++
128 TITLE:=GNU Standard C++ Library v3
129 DEPENDS+=@INSTALL_LIBSTDCPP
130 endef
131
132 define Package/libstdcpp/config
133 menu "Configuration"
134 depends EXTERNAL_TOOLCHAIN && PACKAGE_libstdcpp
135
136 config LIBSTDCPP_ROOT_DIR
137 string
138 prompt "libstdcpp shared library base directory"
139 depends EXTERNAL_TOOLCHAIN && PACKAGE_libstdcpp
140 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
141 default "/" if NATIVE_TOOLCHAIN
142
143 config LIBSTDCPP_FILE_SPEC
144 string
145 prompt "libstdc++ shared library files (use wildcards)"
146 depends EXTERNAL_TOOLCHAIN && PACKAGE_libstdcpp
147 default "./lib/libstdc++.so.*"
148
149 endmenu
150 endef
151
152
153 define Package/libc/Default
154 SECTION:=libs
155 CATEGORY:=Base system
156 VERSION:=$(LIBC_VERSION)-$(PKG_RELEASE)
157 ifneq ($(TARGET_avr32)$(TARGET_coldfire),)
158 DEPENDS:=+libgcc
159 endif
160 URL:=$(LIBC_URL)
161 endef
162
163
164 define Package/libc
165 $(call Package/libc/Default)
166 TITLE:=C library
167 endef
168
169 define Package/libc/config
170 menu "Configuration"
171 depends EXTERNAL_TOOLCHAIN && PACKAGE_libc
172
173 config LIBC_ROOT_DIR
174 string
175 prompt "libc shared library base directory"
176 depends EXTERNAL_TOOLCHAIN && PACKAGE_libc
177 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
178 default "/" if NATIVE_TOOLCHAIN
179
180 config LIBC_FILE_SPEC
181 string
182 prompt "libc shared library files (use wildcards)"
183 depends EXTERNAL_TOOLCHAIN && PACKAGE_libc
184 default "./lib/ld{-*.so,-linux*.so.*} ./lib/lib{anl,c,cidn,crypt,dl,m,nsl,nss_dns,nss_files,resolv,util}{-*.so,.so.*}"
185
186 endmenu
187 endef
188
189
190 define Package/libpthread
191 $(call Package/libc/Default)
192 TITLE:=POSIX thread library
193 DEPENDS:= +librt
194 endef
195
196 define Package/libpthread/config
197 menu "Configuration"
198 depends EXTERNAL_TOOLCHAIN && PACKAGE_libpthread
199
200 config LIBPTHREAD_ROOT_DIR
201 string
202 prompt "libpthread shared library base directory"
203 depends EXTERNAL_TOOLCHAIN && PACKAGE_libpthread
204 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
205 default "/" if NATIVE_TOOLCHAIN
206
207 config LIBPTHREAD_FILE_SPEC
208 string
209 prompt "libpthread shared library files (use wildcards)"
210 depends EXTERNAL_TOOLCHAIN && PACKAGE_libpthread
211 default "./lib/libpthread{-*.so,.so.*}"
212
213 endmenu
214 endef
215
216
217 define Package/librt
218 $(call Package/libc/Default)
219 TITLE:=POSIX.1b RealTime extension library
220 endef
221
222 define Package/librt/config
223 menu "Configuration"
224 depends EXTERNAL_TOOLCHAIN && PACKAGE_librt
225
226 config LIBRT_ROOT_DIR
227 string
228 prompt "librt shared library base directory"
229 depends EXTERNAL_TOOLCHAIN && PACKAGE_librt
230 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
231 default "/" if NATIVE_TOOLCHAIN
232
233 config LIBRT_FILE_SPEC
234 string
235 prompt "librt shared library files (use wildcards)"
236 depends EXTERNAL_TOOLCHAIN && PACKAGE_librt
237 default "./lib/librt{-*.so,.so.*}"
238
239 endmenu
240 endef
241
242
243 define Package/ldd
244 $(call Package/libc/Default)
245 SECTION:=utils
246 CATEGORY:=Utilities
247 TITLE:=LDD trace utility
248 endef
249
250 define Package/ldd/config
251 menu "Configuration"
252 depends EXTERNAL_TOOLCHAIN && PACKAGE_ldd
253
254 config LDD_ROOT_DIR
255 string
256 prompt "ldd trace utility base directory"
257 depends EXTERNAL_TOOLCHAIN && PACKAGE_ldd
258 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
259 default "/" if NATIVE_TOOLCHAIN
260
261 config LDD_FILE_SPEC
262 string
263 prompt "ldd trace utility file"
264 depends EXTERNAL_TOOLCHAIN && PACKAGE_ldd
265 default "./usr/bin/ldd"
266
267 endmenu
268 endef
269
270
271 define Package/ldconfig
272 $(call Package/libc/Default)
273 SECTION:=utils
274 CATEGORY:=Utilities
275 TITLE:=Shared library path configuration
276 endef
277
278 define Package/ldconfig/config
279 menu "Configuration"
280 depends EXTERNAL_TOOLCHAIN && PACKAGE_ldconfig
281
282 config LDCONFIG_ROOT_DIR
283 string
284 prompt "ldconfig base directory"
285 depends EXTERNAL_TOOLCHAIN && PACKAGE_ldconfig
286 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
287 default "/" if NATIVE_TOOLCHAIN
288
289 config LDCONFIG_FILE_SPEC
290 string
291 prompt "ldconfig file"
292 depends EXTERNAL_TOOLCHAIN && PACKAGE_ldconfig
293 default "./sbin/ldconfig"
294
295 endmenu
296 endef
297
298
299 ifneq ($(CONFIG_PREINITOPT),)
300 define ImageConfigOptions
301 mkdir -p $(1)/lib/preinit
302 echo 'pi_suppress_stderr="$(CONFIG_TARGET_PREINIT_SUPPRESS_STDERR)"' >$(1)/lib/preinit/00_preinit.conf
303 echo 'fs_failsafe_wait_timeout=$(if $(CONFIG_TARGET_PREINIT_TIMEOUT),$(CONFIG_TARGET_PREINIT_TIMEOUT),2)' >>$(1)/lib/preinit/00_preinit.conf
304 echo 'pi_init_path=$(if $(CONFIG_TARGET_INIT_PATH),$(CONFIG_TARGET_INIT_PATH),"/bin:/sbin:/usr/bin:/usr/sbin")' >>$(1)/lib/preinit/00_preinit.conf
305 echo 'pi_init_env=$(if $(CONFIG_TARGET_INIT_ENV),$(CONFIG_TARGET_INIT_ENV),"")' >>$(1)/lib/preinit/00_preinit.conf
306 echo 'pi_init_cmd=$(if $(CONFIG_TARGET_INIT_CMD),$(CONFIG_TARGET_INIT_CMD),"/sbin/init")' >>$(1)/lib/preinit/00_preinit.conf
307 echo 'pi_init_suppress_stderr="$(CONFIG_TARGET_INIT_SUPPRESS_STDERR)"' >>$(1)/lib/preinit/00_preinit.conf
308 echo 'pi_ifname=$(if $(CONFIG_TARGET_PREINIT_IFNAME),$(CONFIG_TARGET_PREINIT_IFNAME),"")' >>$(1)/lib/preinit/00_preinit.conf
309 echo 'pi_ip=$(if $(CONFIG_TARGET_PREINIT_IP),$(CONFIG_TARGET_PREINIT_IP),"192.168.1.1")' >>$(1)/lib/preinit/00_preinit.conf
310 echo 'pi_netmask=$(if $(CONFIG_TARGET_PREINIT_NETMASK),$(CONFIG_TARGET_PREINIT_NETMASK),"255.255.255.0")' >>$(1)/lib/preinit/00_preinit.conf
311 echo 'pi_broadcast=$(if $(CONFIG_TARGET_PREINIT_BROADCAST),$(CONFIG_TARGET_PREINIT_BROADCAST),"192.168.1.255")' >>$(1)/lib/preinit/00_preinit.conf
312 echo 'pi_preinit_net_messages="$(CONFIG_TARGET_PREINIT_SHOW_NETMSG)"' >>$(1)/lib/preinit/00_preinit.conf
313 echo 'pi_preinit_no_failsafe_netmsg="$(CONFIG_TARGET_SUPPRESS_FAILSAFE_NETMSG)"' >>$(1)/lib/preinit/00_preinit.conf
314 endef
315 endif
316
317 define Build/Prepare
318 mkdir -p $(PKG_BUILD_DIR)
319 endef
320
321 define Build/Compile/Default
322 endef
323
324 define Build/Compile
325 $(call Build/Compile/Default)
326 endef
327
328 define Package/base-files/install
329 $(CP) ./files/* $(1)/
330 if [ -d $(GENERIC_PLATFORM_DIR)/base-files/. ]; then \
331 $(CP) $(GENERIC_PLATFORM_DIR)/base-files/* $(1)/; \
332 fi
333 if [ -d $(PLATFORM_DIR)/base-files/. ]; then \
334 $(CP) $(PLATFORM_DIR)/base-files/* $(1)/; \
335 fi
336 if [ -d $(PLATFORM_DIR)/base-files-$(PROFILE)/. ]; then \
337 $(CP) $(PLATFORM_DIR)/base-files-$(PROFILE)/* $(1)/; \
338 fi
339 if [ -d $(PLATFORM_DIR)/$(PROFILE)/base-files/. ]; then \
340 $(CP) $(PLATFORM_DIR)/$(PROFILE)/base-files/* $(1)/; \
341 fi
342 $(if $(filter-out $(PLATFORM_DIR),$(PLATFORM_SUBDIR)), \
343 if [ -d $(PLATFORM_SUBDIR)/base-files/. ]; then \
344 $(CP) $(PLATFORM_SUBDIR)/base-files/* $(1)/; \
345 fi; \
346 if [ -d $(PLATFORM_SUBDIR)/base-files-$(PROFILE)/. ]; then \
347 $(CP) $(PLATFORM_SUBDIR)/base-files-$(PROFILE)/* $(1)/; \
348 fi; \
349 if [ -d $(PLATFORM_SUBDIR)/$(PROFILE)/base-files/. ]; then \
350 $(CP) $(PLATFORM_SUBDIR)/$(PROFILE)/base-files/* $(1)/; \
351 fi \
352 )
353 # Form valid /etc/shadow entries, by copying the user:pw pairs
354 # from /etc/passwd, and adding on pw change data
355 $(if $(CONFIG_BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS), \
356 cut -d ':' -f 1-2 $(1)/etc/passwd > $(1)/etc/shadow; \
357 $(SED) 's/$$$$/:13848:0:99999:7:::/' $(1)/etc/shadow \
358 )
359 $(SED) 's,$$$$R,$(REVISION),g' $(1)/etc/banner
360 mkdir -p $(1)/CONTROL
361 mkdir -p $(1)/dev
362 mkdir -p $(1)/etc/crontabs
363 mkdir -p $(1)/etc/rc.d
364 mkdir -p $(1)/overlay
365 mkdir -p $(1)/lib/firmware
366 $(if $(LIB_SUFFIX),-ln -s lib $(1)/lib$(LIB_SUFFIX))
367 mkdir -p $(1)/mnt
368 mkdir -p $(1)/proc
369 mkdir -p $(1)/tmp
370 mkdir -p $(1)/usr/lib
371 $(if $(LIB_SUFFIX),-ln -s lib $(1)/usr/lib$(LIB_SUFFIX))
372 mkdir -p $(1)/usr/bin
373 mkdir -p $(1)/sys
374 mkdir -p $(1)/www
375 mkdir -p $(1)/root
376 ln -sf /proc/mounts $(1)/etc/mtab
377 rm -f $(1)/var
378 ln -sf /tmp $(1)/var
379 mkdir -p $(1)/etc
380 ln -sf /tmp/resolv.conf /tmp/fstab /tmp/TZ $(1)/etc/
381 $(call ImageConfigOptions,$(1))
382 $(call Package/base-files/install-target,$(1))
383 for conffile in $(1)/etc/config/*; do \
384 if [ -f "$$$$conffile" ]; then \
385 grep "$$$${conffile##$(1)}" $(1)/CONTROL/conffiles || \
386 echo "$$$${conffile##$(1)}" >> $(1)/CONTROL/conffiles; \
387 fi \
388 done
389 endef
390
391 ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
392
393 define Package/libgcc/install
394 $(INSTALL_DIR) $(1)/lib
395 $(CP) $(TOOLCHAIN_DIR)/lib/libgcc_s.so.* $(1)/lib/
396 endef
397
398 define Package/libssp/install
399 $(INSTALL_DIR) $(1)/lib
400 $(CP) $(TOOLCHAIN_DIR)/lib/libssp.so.* $(1)/lib/
401 endef
402
403 define Package/libstdcpp/install
404 $(INSTALL_DIR) $(1)/usr/lib
405 $(CP) $(TOOLCHAIN_DIR)/usr/lib/libstdc++.so.* $(1)/usr/lib/
406 endef
407
408 use_libutil=$(if $(CONFIG_USE_GLIBC)$(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),libutil)
409 use_libnsl=$(if $(CONFIG_USE_GLIBC)$(CONFIG_EGLIBC_OPTION_EGLIBC_NIS),libnsl)
410 use_nsswitch=$(if $(CONFIG_USE_GLIBC)$(CONFIG_EGLIBC_OPTION_EGLIBC_NSSWITCH),libnss_dns libnss_files)
411
412 define Package/glibc/install
413 $(INSTALL_DIR) $(1)/lib
414 $(CP) \
415 $(TOOLCHAIN_DIR)/lib/ld*.so.* \
416 $(TOOLCHAIN_DIR)/lib/ld-$(LIBC_SO_VERSION).so \
417 $(1)/lib/
418 for file in libanl libc libcidn libcrypt libdl libm $(use_libnsl) $(use_nsswitch) libresolv $(use_libutil); do \
419 $(CP) \
420 $(TOOLCHAIN_DIR)/lib/$$$$file.so.* \
421 $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so \
422 $(1)/lib/; \
423 done
424 endef
425
426 define Package/eglibc/install
427 $(call Package/glibc/install,$1)
428 endef
429
430 define Package/uClibc/install
431 $(INSTALL_DIR) $(1)/lib
432 $(CP) \
433 $(TOOLCHAIN_DIR)/lib/ld*-uClibc.so.* \
434 $(TOOLCHAIN_DIR)/lib/ld*-uClibc-$(LIBC_SO_VERSION).so \
435 $(1)/lib/
436 $(CP) \
437 $(TOOLCHAIN_DIR)/lib/libc.so.* \
438 $(TOOLCHAIN_DIR)/lib/libuClibc-$(LIBC_SO_VERSION).so \
439 $(1)/lib/
440 for file in libcrypt libdl libm libnsl libresolv libutil; do \
441 $(CP) \
442 $(TOOLCHAIN_DIR)/lib/$$$$file.so.* \
443 $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so \
444 $(1)/lib/; \
445 done
446 endef
447
448 define Package/libc/install
449 $(call Package/$(LIBC)/install,$1)
450 endef
451
452 define Package/libc/install_lib
453 $(CP) $(filter-out %/libdl_pic.a %/libpthread_pic.a %/libresolv_pic.a,$(wildcard $(TOOLCHAIN_DIR)/usr/lib/lib*.a)) $(1)/lib/
454 $(if $(wildcard $(TOOLCHAIN_DIR)/usr/lib/libc_so.a),$(CP) $(TOOLCHAIN_DIR)/usr/lib/libc_so.a $(1)/lib/libc_pic.a)
455 $(if $(wildcard $(TOOLCHAIN_DIR)/usr/lib/gcc/*/*/libgcc.map), \
456 $(CP) $(TOOLCHAIN_DIR)/usr/lib/gcc/*/*/libgcc_pic.a $(1)/lib/libgcc_s_pic.a; \
457 $(CP) $(TOOLCHAIN_DIR)/usr/lib/gcc/*/*/libgcc.map $(1)/lib/libgcc_s_pic.map \
458 )
459 endef
460
461 define Package/libpthread/install
462 $(INSTALL_DIR) $(1)/lib
463 $(CP) \
464 $(TOOLCHAIN_DIR)/lib/libpthread.so.* \
465 $(TOOLCHAIN_DIR)/lib/libpthread-$(LIBC_SO_VERSION).so \
466 $(1)/lib/
467 endef
468
469 define Package/libpthread/install_lib
470 $(if $(wildcard $(TOOLCHAIN_DIR)/usr/lib/libpthread_so.a),$(CP) $(TOOLCHAIN_DIR)/usr/lib/libpthread_so.a $(1)/lib/libpthread_pic.a)
471 endef
472
473 define Package/librt/install
474 $(INSTALL_DIR) $(1)/lib
475 $(CP) \
476 $(TOOLCHAIN_DIR)/lib/librt.so.* \
477 $(TOOLCHAIN_DIR)/lib/librt-$(LIBC_SO_VERSION).so \
478 $(1)/lib/
479 endef
480
481 define Package/ldd/install
482 $(INSTALL_DIR) $(1)/usr/bin/
483 $(CP) $(TOOLCHAIN_DIR)/usr/bin/ldd $(1)/usr/bin/
484 endef
485
486 define Package/ldconfig/install
487 $(INSTALL_DIR) $(1)/sbin/
488 $(CP) $(TOOLCHAIN_DIR)/sbin/ldconfig $(1)/sbin/
489 endef
490
491 else
492
493 define Package/libgcc/install
494 for file in $(call qstrip,$(CONFIG_LIBGCC_FILE_SPEC)); do \
495 dir=`dirname $$$$file` ; \
496 $(INSTALL_DIR) $(1)/$$$$dir ; \
497 $(CP) $(call qstrip,$(CONFIG_LIBGCC_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
498 done
499 endef
500
501 define Package/libssp/install
502 for file in $(call qstrip,$(CONFIG_LIBSSP_FILE_SPEC)); do \
503 dir=`dirname $$$$file` ; \
504 $(INSTALL_DIR) $(1)/$$$$dir ; \
505 $(CP) $(call qstrip,$(CONFIG_LIBSSP_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
506 done
507 endef
508
509 define Package/libstdcpp/install
510 for file in $(call qstrip,$(CONFIG_LIBSTDCPP_FILE_SPEC)); do \
511 dir=`dirname $$$$file` ; \
512 $(INSTALL_DIR) $(1)/$$$$dir ; \
513 $(CP) $(call qstrip,$(CONFIG_LIBSTDCPP_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
514 done
515 endef
516
517 define Package/libc/install
518 for file in $(call qstrip,$(CONFIG_LIBC_FILE_SPEC)); do \
519 dir=`dirname $$$$file` ; \
520 $(INSTALL_DIR) $(1)/$$$$dir ; \
521 $(CP) $(call qstrip,$(CONFIG_LIBC_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
522 done
523 endef
524
525 define Package/libpthread/install
526 for file in $(call qstrip,$(CONFIG_LIBPTHREAD_FILE_SPEC)); do \
527 dir=`dirname $$$$file` ; \
528 $(INSTALL_DIR) $(1)/$$$$dir ; \
529 $(CP) $(call qstrip,$(CONFIG_LIBPTHREAD_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
530 done
531 endef
532
533 define Package/librt/install
534 for file in $(call qstrip,$(CONFIG_LIBRT_FILE_SPEC)); do \
535 dir=`dirname $$$$file` ; \
536 $(INSTALL_DIR) $(1)/$$$$dir ; \
537 $(CP) $(call qstrip,$(CONFIG_LIBRT_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
538 done
539 endef
540
541 define Package/ldd/install
542 for file in $(call qstrip,$(CONFIG_LDD_FILE_SPEC)); do \
543 dir=`dirname $$$$file` ; \
544 $(INSTALL_DIR) $(1)/$$$$dir ; \
545 $(CP) $(call qstrip,$(CONFIG_LDD_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
546 done
547 endef
548
549 define Package/ldconfig/install
550 for file in $(call qstrip,$(CONFIG_LDCONFIG_FILE_SPEC)); do \
551 dir=`dirname $$$$file` ; \
552 $(INSTALL_DIR) $(1)/$$$$dir ; \
553 $(CP) $(call qstrip,$(CONFIG_LDCONFIG_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
554 done
555 endef
556
557 endif
558
559 ifneq ($(DUMP),1)
560 -include $(PLATFORM_DIR)/base-files.mk
561 endif
562
563 $(eval $(call BuildPackage,base-files))
564 $(eval $(call BuildPackage,libc))
565 $(eval $(call BuildPackage,libgcc))
566 $(eval $(call BuildPackage,libssp))
567 $(eval $(call BuildPackage,libstdcpp))
568 $(eval $(call BuildPackage,libpthread))
569 $(eval $(call BuildPackage,librt))
570 $(eval $(call BuildPackage,ldd))
571 $(eval $(call BuildPackage,ldconfig))