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