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