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