2 # Copyright (C) 2007-2011 OpenWrt.org
3 # Copyright (C) 2010 Vertical Communications
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
10 include $(INCLUDE_DIR
)/kernel.mk
15 PKG_FILE_DEPENDS
:=$(PLATFORM_DIR
)/ $(GENERIC_PLATFORM_DIR
)/base-files
/
16 PKG_BUILD_DEPENDS
:=opkg
/host
18 include $(INCLUDE_DIR
)/package.mk
22 ifneq ($(wildcard $(PLATFORM_DIR
)/base-files-
$(PROFILE
) $(PLATFORM_SUBDIR
)/base-files-
$(PROFILE
)),)
23 TARGET
:=$(TARGET
)-$(PROFILE
)
25 LIBGCC_VERSION
:=$(GCC_VERSION
)
26 ifneq ($(findstring $(ARCH
) , mips64 x86_64
),)
30 LIBC_VERSION
:=<LIBC_VERSION
>
31 LIBGCC_VERSION
:=<LIBGCC_VERSION
>
34 define Package
/base-files
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
)
47 define Package
/base-files
/conffiles
61 $(call
$(TARGET
)/conffiles
)
64 define Package
/base-files
/description
65 This package contains a base filesystem and system scripts for OpenWrt.
69 define Package
/gcc
/Default
72 URL
:=http
://gcc.gnu.org
/
73 VERSION
:=$(LIBGCC_VERSION
)-$(PKG_RELEASE
)
78 $(call Package
/gcc
/Default
)
79 TITLE
:=GCC support library
80 DEPENDS
+=@
!(TARGET_avr32||TARGET_coldfire
)
83 define Package
/libgcc
/config
85 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_libgcc
87 config LIBGCC_ROOT_DIR
89 prompt
"libgcc shared library base directory"
90 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_libgcc
91 default TOOLCHAIN_ROOT if
!NATIVE_TOOLCHAIN
92 default
"/" if NATIVE_TOOLCHAIN
94 config LIBGCC_FILE_SPEC
96 prompt
"libgcc shared library files (use wildcards)"
97 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_libgcc
98 default
"./lib/libgcc_s.so.*"
104 define Package
/libssp
105 $(call Package
/gcc
/Default
)
106 DEPENDS
+=@SSP_SUPPORT
107 TITLE
:=GCC support library
110 define Package
/libssp
/config
112 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_libssp
114 config LIBSPP_ROOT_DIR
116 prompt
"libssp shared library base directory"
117 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_libssp
118 default TOOLCHAIN_ROOT if
!NATIVE_TOOLCHAIN
119 default
"/" if NATIVE_TOOLCHAIN
121 config LIBSSP_FILE_SPEC
123 prompt
"libssp shared library files (use wildcards)"
124 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_libssp
125 default
"./lib/libssp.so.*"
131 define Package
/libstdcpp
132 $(call Package
/gcc
/Default
)
134 TITLE
:=GNU Standard C
++ Library v3
135 DEPENDS
+=@INSTALL_LIBSTDCPP
138 define Package
/libstdcpp
/config
140 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_libstdcpp
142 config LIBSTDCPP_ROOT_DIR
144 prompt
"libstdcpp shared library base directory"
145 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_libstdcpp
146 default TOOLCHAIN_ROOT if
!NATIVE_TOOLCHAIN
147 default
"/" if NATIVE_TOOLCHAIN
149 config LIBSTDCPP_FILE_SPEC
151 prompt
"libstdc++ shared library files (use wildcards)"
152 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_libstdcpp
153 default
"./lib/libstdc++.so.*"
159 define Package
/libc
/Default
161 CATEGORY
:=Base system
162 VERSION
:=$(LIBC_VERSION
)-$(PKG_RELEASE
)
163 ifneq ($(TARGET_avr32
)$(TARGET_coldfire
),)
167 PKG_FLAGS
:=hold essential
172 $(call Package
/libc
/Default
)
176 define Package
/libc
/config
178 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_libc
182 prompt
"libc shared library base directory"
183 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_libc
184 default TOOLCHAIN_ROOT if
!NATIVE_TOOLCHAIN
185 default
"/" if NATIVE_TOOLCHAIN
187 config LIBC_FILE_SPEC
189 prompt
"libc shared library files (use wildcards)"
190 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_libc
191 default
"./lib/ld{-*.so,-linux*.so.*} ./lib/lib{anl,c,cidn,crypt,dl,m,nsl,nss_dns,nss_files,resolv,util}{-*.so,.so.*}"
197 define Package
/libpthread
198 $(call Package
/libc
/Default
)
199 TITLE
:=POSIX thread library
202 define Package
/libpthread
/config
204 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_libpthread
206 config LIBPTHREAD_ROOT_DIR
208 prompt
"libpthread shared library base directory"
209 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_libpthread
210 default TOOLCHAIN_ROOT if
!NATIVE_TOOLCHAIN
211 default
"/" if NATIVE_TOOLCHAIN
213 config LIBPTHREAD_FILE_SPEC
215 prompt
"libpthread shared library files (use wildcards)"
216 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_libpthread
217 default
"./lib/libpthread{-*.so,.so.*}"
224 $(call Package
/libc
/Default
)
225 TITLE
:=POSIX
.1b RealTime extension library
229 define Package
/librt
/config
231 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_librt
233 config LIBRT_ROOT_DIR
235 prompt
"librt shared library base directory"
236 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_librt
237 default TOOLCHAIN_ROOT if
!NATIVE_TOOLCHAIN
238 default
"/" if NATIVE_TOOLCHAIN
240 config LIBRT_FILE_SPEC
242 prompt
"librt shared library files (use wildcards)"
243 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_librt
244 default
"./lib/librt{-*.so,.so.*}"
250 define Package
/libgfortran
251 $(call Package
/gcc
/Default
)
252 TITLE
:=GFortran support library
253 DEPENDS
+=@
!(TARGET_avr32||TARGET_coldfire
) @INSTALL_GFORTRAN
256 define Package
/libgfortran
/config
258 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_libgfortran
260 config LIBGFORTRAN_ROOT_DIR
262 prompt
"libgfortran shared library base directory"
263 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_libgfortran
264 default TOOLCHAIN_ROOT if
!NATIVE_TOOLCHAIN
265 default
"/" if NATIVE_TOOLCHAIN
267 config LIBGFORTRAN_FILE_SPEC
269 prompt
"libgfortran shared library files (use wildcards)"
270 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_libgfortran
271 default
"./usr/lib/libgfortran.so.*"
277 $(call Package
/libc
/Default
)
280 TITLE
:=LDD trace utility
283 define Package
/ldd
/config
285 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_ldd
289 prompt
"ldd trace utility base directory"
290 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_ldd
291 default TOOLCHAIN_ROOT if
!NATIVE_TOOLCHAIN
292 default
"/" if NATIVE_TOOLCHAIN
296 prompt
"ldd trace utility file"
297 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_ldd
298 default
"./usr/bin/ldd"
304 define Package
/ldconfig
305 $(call Package
/libc
/Default
)
308 TITLE
:=Shared library path configuration
311 define Package
/ldconfig
/config
313 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_ldconfig
315 config LDCONFIG_ROOT_DIR
317 prompt
"ldconfig base directory"
318 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_ldconfig
319 default TOOLCHAIN_ROOT if
!NATIVE_TOOLCHAIN
320 default
"/" if NATIVE_TOOLCHAIN
322 config LDCONFIG_FILE_SPEC
324 prompt
"ldconfig file"
325 depends EXTERNAL_TOOLCHAIN
&& PACKAGE_ldconfig
326 default
"./sbin/ldconfig"
332 ifneq ($(CONFIG_PREINITOPT
),)
333 define ImageConfigOptions
334 mkdir
-p
$(1)/lib
/preinit
335 echo
'pi_suppress_stderr="$(CONFIG_TARGET_PREINIT_SUPPRESS_STDERR)"' >$(1)/lib
/preinit
/00_preinit.conf
336 echo
'fs_failsafe_wait_timeout=$(if $(CONFIG_TARGET_PREINIT_TIMEOUT),$(CONFIG_TARGET_PREINIT_TIMEOUT),2)' >>$(1)/lib
/preinit
/00_preinit.conf
337 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
338 echo
'pi_init_env=$(if $(CONFIG_TARGET_INIT_ENV),$(CONFIG_TARGET_INIT_ENV),"")' >>$(1)/lib
/preinit
/00_preinit.conf
339 echo
'pi_init_cmd=$(if $(CONFIG_TARGET_INIT_CMD),$(CONFIG_TARGET_INIT_CMD),"/sbin/init")' >>$(1)/lib
/preinit
/00_preinit.conf
340 echo
'pi_init_suppress_stderr="$(CONFIG_TARGET_INIT_SUPPRESS_STDERR)"' >>$(1)/lib
/preinit
/00_preinit.conf
341 echo
'pi_ifname=$(if $(CONFIG_TARGET_PREINIT_IFNAME),$(CONFIG_TARGET_PREINIT_IFNAME),"")' >>$(1)/lib
/preinit
/00_preinit.conf
342 echo
'pi_ip=$(if $(CONFIG_TARGET_PREINIT_IP),$(CONFIG_TARGET_PREINIT_IP),"192.168.1.1")' >>$(1)/lib
/preinit
/00_preinit.conf
343 echo
'pi_netmask=$(if $(CONFIG_TARGET_PREINIT_NETMASK),$(CONFIG_TARGET_PREINIT_NETMASK),"255.255.255.0")' >>$(1)/lib
/preinit
/00_preinit.conf
344 echo
'pi_broadcast=$(if $(CONFIG_TARGET_PREINIT_BROADCAST),$(CONFIG_TARGET_PREINIT_BROADCAST),"192.168.1.255")' >>$(1)/lib
/preinit
/00_preinit.conf
345 echo
'pi_preinit_net_messages="$(CONFIG_TARGET_PREINIT_SHOW_NETMSG)"' >>$(1)/lib
/preinit
/00_preinit.conf
346 echo
'pi_preinit_no_failsafe_netmsg="$(CONFIG_TARGET_PREINIT_SUPPRESS_FAILSAFE_NETMSG)"' >>$(1)/lib
/preinit
/00_preinit.conf
351 mkdir
-p
$(PKG_BUILD_DIR
)
354 LIBGCC_A
=$(wildcard $(TOOLCHAIN_DIR
)/lib
/gcc
/*/*/libgcc_pic.a
)
355 LIBGCC_MAP
=$(wildcard $(TOOLCHAIN_DIR
)/lib
/gcc
/*/*/libgcc.map
)
356 LIBGCC_SO
=$(wildcard $(TOOLCHAIN_DIR
)/lib
/libgcc_s.so.
*)
357 ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN
),)
358 ifneq ($(if
$(CONFIG_USE_UCLIBC
),$(CONFIG_GCC_VERSION_LINARO
)),)
359 BUILD_LIBGCC
:=$(if
$(CONFIG_avr32
)$(CONFIG_m68k
)$(CONFIG_powerpc
),,$(PKG_BUILD_DIR
)/libgcc_s.so.
*)
363 ifneq ($(BUILD_LIBGCC
),)
364 define Build
/Compile
/uClibc
365 $(SCRIPT_DIR
)/relink-lib.sh \
367 "$(wildcard $(TOOLCHAIN_DIR)/lib/libc_so.a)" \
368 "$(wildcard $(TOOLCHAIN_DIR)/lib/libc_so.a)" \
369 "$(patsubst $(TOOLCHAIN_DIR)/lib/%,$(PKG_BUILD_DIR)/%,$(wildcard $(TOOLCHAIN_DIR)/lib/libuClibc-*.so))" \
370 -Wl
,-init
,__uClibc_init
-Wl
,-soname
=libc.so
.0 \
372 $(SCRIPT_DIR
)/relink-lib.sh \
374 "$(wildcard $(TOOLCHAIN_DIR)/lib/libcrypt-*.so)" \
375 "$(wildcard $(TOOLCHAIN_DIR)/lib/libcrypt_pic.a)" \
376 "$(patsubst $(TOOLCHAIN_DIR)/lib/%,$(PKG_BUILD_DIR)/%,$(wildcard $(TOOLCHAIN_DIR)/lib/libcrypt-*.so))" \
378 -Wl
,-soname
=libcrypt.so
.0
379 $(SCRIPT_DIR
)/relink-lib.sh \
381 "$(wildcard $(TOOLCHAIN_DIR)/lib/libm-*.so)" \
382 "$(wildcard $(TOOLCHAIN_DIR)/lib/libm_pic.a)" \
383 "$(patsubst $(TOOLCHAIN_DIR)/lib/%,$(PKG_BUILD_DIR)/%,$(wildcard $(TOOLCHAIN_DIR)/lib/libm-*.so))" \
385 -Wl
,-soname
=libm.so
.0
386 $(SCRIPT_DIR
)/relink-lib.sh \
388 "$(wildcard $(TOOLCHAIN_DIR)/lib/libpthread-*.so)" \
389 "$(wildcard $(TOOLCHAIN_DIR)/lib/libpthread_so.a)" \
390 "$(patsubst $(TOOLCHAIN_DIR)/lib/%,$(PKG_BUILD_DIR)/%,$(wildcard $(TOOLCHAIN_DIR)/lib/libpthread-*.so))" \
391 -Wl
,-z
,nodelete
,-z
,initfirst
,-init
=__pthread_initialize_minimal_internal \
392 -ldl
-lc
$(BUILD_LIBGCC
) \
393 -Wl
,-soname
=libpthread.so
.0
395 define Build
/Compile
/libgcc
396 $(SCRIPT_DIR
)/relink-lib.sh \
400 "$(patsubst $(TOOLCHAIN_DIR)/lib/%,$(PKG_BUILD_DIR)/%,$(LIBGCC_SO))" \
401 -Wl
,--version-script
=$(LIBGCC_MAP
) -Wl
,-soname
=libgcc_s.so
.1
404 define Build
/Compile
/uClibc
406 $(TOOLCHAIN_DIR
)/lib
/libuClibc-
*.so \
407 $(TOOLCHAIN_DIR
)/lib
/libcrypt-
*.so \
408 $(TOOLCHAIN_DIR
)/lib
/libm-
*.so \
409 $(TOOLCHAIN_DIR
)/lib
/libpthread-
*.so \
412 ifneq ($(LIBGCC_SO
),)
413 define Build
/Compile
/libgcc
414 $(CP
) $(LIBGCC_SO
) $(PKG_BUILD_DIR
)/
419 define Build
/Compile
/Default
420 $(call Build
/Compile
/libgcc
)
421 $(call Build
/Compile
/$(LIBC
))
423 Build
/Compile
= $(Build
/Compile
/Default
)
425 define Package
/base-files
/install
426 $(CP
) .
/files
/* $(1)/
427 if
[ -d
$(GENERIC_PLATFORM_DIR
)/base-files
/.
]; then \
428 $(CP
) $(GENERIC_PLATFORM_DIR
)/base-files
/* $(1)/; \
430 if
[ -d
$(PLATFORM_DIR
)/base-files
/.
]; then \
431 $(CP
) $(PLATFORM_DIR
)/base-files
/* $(1)/; \
433 if
[ -d
$(PLATFORM_DIR
)/base-files-
$(PROFILE
)/.
]; then \
434 $(CP
) $(PLATFORM_DIR
)/base-files-
$(PROFILE
)/* $(1)/; \
436 if
[ -d
$(PLATFORM_DIR
)/$(PROFILE
)/base-files
/.
]; then \
437 $(CP
) $(PLATFORM_DIR
)/$(PROFILE
)/base-files
/* $(1)/; \
439 $(if
$(filter-out $(PLATFORM_DIR
),$(PLATFORM_SUBDIR
)), \
440 if
[ -d
$(PLATFORM_SUBDIR
)/base-files
/.
]; then \
441 $(CP
) $(PLATFORM_SUBDIR
)/base-files
/* $(1)/; \
443 if
[ -d
$(PLATFORM_SUBDIR
)/base-files-
$(PROFILE
)/.
]; then \
444 $(CP
) $(PLATFORM_SUBDIR
)/base-files-
$(PROFILE
)/* $(1)/; \
446 if
[ -d
$(PLATFORM_SUBDIR
)/$(PROFILE
)/base-files
/.
]; then \
447 $(CP
) $(PLATFORM_SUBDIR
)/$(PROFILE
)/base-files
/* $(1)/; \
450 # Form valid /etc/shadow entries, by copying the user:pw pairs
451 # from /etc/passwd, and adding on pw change data
452 $(if
$(CONFIG_BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS
), \
453 cut
-d
':' -f
1-2 $(1)/etc
/passwd
> $(1)/etc
/shadow
; \
454 $(SED
) 's/$$$$/:13848:0:99999:7:::/' $(1)/etc
/shadow \
456 $(SED
) 's,$$$$R,$(REVISION),g' $(1)/etc
/banner
457 mkdir
-p
$(1)/CONTROL
459 mkdir
-p
$(1)/etc
/crontabs
460 mkdir
-p
$(1)/etc
/rc.d
461 mkdir
-p
$(1)/overlay
462 mkdir
-p
$(1)/lib
/firmware
463 $(if
$(LIB_SUFFIX
),-ln
-s lib
$(1)/lib
$(LIB_SUFFIX
))
467 mkdir
-p
$(1)/usr
/lib
468 $(if
$(LIB_SUFFIX
),-ln
-s lib
$(1)/usr
/lib
$(LIB_SUFFIX
))
469 mkdir
-p
$(1)/usr
/bin
473 ln
-sf
/proc
/mounts
$(1)/etc
/mtab
477 ln
-sf
/tmp
/resolv.conf
/tmp
/fstab
/tmp
/TZ
$(1)/etc
/
478 $(call ImageConfigOptions
,$(1))
479 $(call Package
/base-files
/install-target
,$(1))
480 for conffile in
$(1)/etc
/config
/*; do \
481 if
[ -f
"$$$$conffile" ]; then \
482 grep
"$$$${conffile##$(1)}" $(1)/CONTROL
/conffiles || \
483 echo
"$$$${conffile##$(1)}" >> $(1)/CONTROL
/conffiles
; \
488 ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN
),)
490 define Package
/libgcc
/install
491 $(INSTALL_DIR
) $(1)/lib
492 $(CP
) $(TOOLCHAIN_DIR
)/lib
/libgcc_s.so.
* $(1)/lib
/
495 define Package
/libgfortran
/install
496 $(INSTALL_DIR
) $(1)/usr
/lib
497 $(CP
) $(TOOLCHAIN_DIR
)/lib
/libgfortran.so.
* $(1)/usr
/lib
/
500 define Package
/libssp
/install
501 $(INSTALL_DIR
) $(1)/lib
502 $(CP
) $(TOOLCHAIN_DIR
)/lib
/libssp.so.
* $(1)/lib
/
505 define Package
/libstdcpp
/install
506 $(INSTALL_DIR
) $(1)/usr
/lib
507 $(CP
) $(TOOLCHAIN_DIR
)/lib
/libstdc
++.so.
* $(1)/usr
/lib
/
510 use_libutil
=$(if
$(CONFIG_USE_GLIBC
)$(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP
),libutil
)
511 use_libnsl
=$(if
$(CONFIG_USE_GLIBC
)$(CONFIG_EGLIBC_OPTION_EGLIBC_NIS
),libnsl
)
512 use_nsswitch
=$(if
$(CONFIG_USE_GLIBC
)$(CONFIG_EGLIBC_OPTION_EGLIBC_NSSWITCH
),libnss_dns libnss_files
)
514 define Package
/glibc
/install
515 $(CP
) .
/glibc-files
/* $(1)/
516 $(INSTALL_DIR
) $(1)/lib
518 $(TOOLCHAIN_DIR
)/lib
/ld*.so.
* \
519 $(TOOLCHAIN_DIR
)/lib
/ld-
$(LIBC_SO_VERSION
).so \
521 for file in libanl libc libcidn libcrypt libdl libm
$(use_libnsl
) $(use_nsswitch
) libresolv
$(use_libutil
); do \
522 for file in
$(TOOLCHAIN_DIR
)/lib
/$$$$file.so.
* $(TOOLCHAIN_DIR
)/lib
/$$$$file-$(LIBC_SO_VERSION
).so
; do \
523 if
[ -e
"$$$$file" ]; then \
524 $(CP
) $$$$file $(1)/lib
/; \
530 define Package
/eglibc
/install
531 $(call Package
/glibc
/install,$1)
534 define Package
/uClibc
/install
535 $(INSTALL_DIR
) $(1)/lib
537 $(TOOLCHAIN_DIR
)/lib
/ld*-uClibc.so.
* \
538 $(TOOLCHAIN_DIR
)/lib
/ld*-uClibc-
$(LIBC_SO_VERSION
).so \
541 $(TOOLCHAIN_DIR
)/lib
/libc.so.
* \
542 $(TOOLCHAIN_DIR
)/lib
/libuClibc-
$(LIBC_SO_VERSION
).so \
544 for file in libcrypt libdl libm libutil
; do \
546 $(TOOLCHAIN_DIR
)/lib
/$$$$file.so.
* \
547 $(TOOLCHAIN_DIR
)/lib
/$$$$file-$(LIBC_SO_VERSION
).so \
552 $(PKG_BUILD_DIR
)/libuClibc-
* \
553 $(PKG_BUILD_DIR
)/libm-
* \
554 $(PKG_BUILD_DIR
)/libcrypt-
* \
558 define Package
/libc
/install
559 $(call Package
/$(LIBC
)/install,$1)
562 define Package
/libc
/install_lib
563 $(CP
) $(filter-out %/libdl_pic.a
%/libpthread_pic.a
%/libresolv_pic.a
,$(wildcard $(TOOLCHAIN_DIR
)/lib
/lib
*.a
)) $(1)/lib
/
564 $(if
$(wildcard $(TOOLCHAIN_DIR
)/lib
/libc_so.a
),$(CP
) $(TOOLCHAIN_DIR
)/lib
/libc_so.a
$(1)/lib
/libc_pic.a
)
565 $(if
$(LIBGCC_MAP
), \
566 $(CP
) $(LIBGCC_A
) $(1)/lib
/libgcc_s_pic.a
; \
567 $(CP
) $(LIBGCC_MAP
) $(1)/lib
/libgcc_s_pic.map \
571 define Package
/libpthread
/install
572 $(INSTALL_DIR
) $(1)/lib
574 $(TOOLCHAIN_DIR
)/lib
/libpthread.so.
* \
575 $(if
$(BUILD_LIBGCC
),\
576 $(PKG_BUILD_DIR
)/libpthread-
$(LIBC_SO_VERSION
).so
, \
577 $(TOOLCHAIN_DIR
)/lib
/libpthread-
$(LIBC_SO_VERSION
).so \
582 define Package
/libpthread
/install_lib
583 $(if
$(wildcard $(TOOLCHAIN_DIR
)/lib
/libpthread_so.a
),$(CP
) $(TOOLCHAIN_DIR
)/lib
/libpthread_so.a
$(1)/lib
/libpthread_pic.a
)
586 define Package
/librt
/install
587 $(INSTALL_DIR
) $(1)/lib
589 $(TOOLCHAIN_DIR
)/lib
/librt.so.
* \
590 $(TOOLCHAIN_DIR
)/lib
/librt-
$(LIBC_SO_VERSION
).so \
594 define Package
/ldd
/install
595 $(INSTALL_DIR
) $(1)/usr
/bin
/
596 $(CP
) $(TOOLCHAIN_DIR
)/bin
/ldd
$(1)/usr
/bin
/
599 define Package
/ldconfig
/install
600 $(INSTALL_DIR
) $(1)/sbin
/
601 $(CP
) $(TOOLCHAIN_DIR
)/sbin
/ldconfig
$(1)/sbin
/
606 define Package
/libgcc
/install
607 for file in
$(call qstrip
,$(CONFIG_LIBGCC_FILE_SPEC
)); do \
608 dir=`dirname $$$$file` ; \
609 $(INSTALL_DIR
) $(1)/$$$$dir ; \
610 $(CP
) $(call qstrip
,$(CONFIG_LIBGCC_ROOT_DIR
))/$$$$file $(1)/$$$$dir/ ; \
615 define Package
/libgfortran
/install
616 for file in
$(call qstrip
,$(CONFIG_LIBGFORTRAN_FILE_SPEC
)); do \
617 dir=`dirname $$$$file` ; \
618 $(INSTALL_DIR
) $(1)/$$$$dir ; \
619 $(CP
) $(call qstrip
,$(CONFIG_LIBGFORTRAN_ROOT_DIR
))/$$$$file $(1)/$$$$dir/ ; \
623 define Package
/libssp
/install
624 for file in
$(call qstrip
,$(CONFIG_LIBSSP_FILE_SPEC
)); do \
625 dir=`dirname $$$$file` ; \
626 $(INSTALL_DIR
) $(1)/$$$$dir ; \
627 $(CP
) $(call qstrip
,$(CONFIG_LIBSSP_ROOT_DIR
))/$$$$file $(1)/$$$$dir/ ; \
632 define Package
/libstdcpp
/install
633 for file in
$(call qstrip
,$(CONFIG_LIBSTDCPP_FILE_SPEC
)); do \
634 dir=`dirname $$$$file` ; \
635 $(INSTALL_DIR
) $(1)/$$$$dir ; \
636 $(CP
) $(call qstrip
,$(CONFIG_LIBSTDCPP_ROOT_DIR
))/$$$$file $(1)/$$$$dir/ ; \
641 define Package
/libc
/install
642 for file in
$(call qstrip
,$(CONFIG_LIBC_FILE_SPEC
)); do \
643 dir=`dirname $$$$file` ; \
644 $(INSTALL_DIR
) $(1)/$$$$dir ; \
645 $(CP
) $(call qstrip
,$(CONFIG_LIBC_ROOT_DIR
))/$$$$file $(1)/$$$$dir/ ; \
650 define Package
/libpthread
/install
651 for file in
$(call qstrip
,$(CONFIG_LIBPTHREAD_FILE_SPEC
)); do \
652 dir=`dirname $$$$file` ; \
653 $(INSTALL_DIR
) $(1)/$$$$dir ; \
654 $(CP
) $(call qstrip
,$(CONFIG_LIBPTHREAD_ROOT_DIR
))/$$$$file $(1)/$$$$dir/ ; \
659 define Package
/librt
/install
660 for file in
$(call qstrip
,$(CONFIG_LIBRT_FILE_SPEC
)); do \
661 dir=`dirname $$$$file` ; \
662 $(INSTALL_DIR
) $(1)/$$$$dir ; \
663 $(CP
) $(call qstrip
,$(CONFIG_LIBRT_ROOT_DIR
))/$$$$file $(1)/$$$$dir/ ; \
668 define Package
/ldd
/install
669 for file in
$(call qstrip
,$(CONFIG_LDD_FILE_SPEC
)); do \
670 dir=`dirname $$$$file` ; \
671 $(INSTALL_DIR
) $(1)/$$$$dir ; \
672 $(CP
) $(call qstrip
,$(CONFIG_LDD_ROOT_DIR
))/$$$$file $(1)/$$$$dir/ ; \
677 define Package
/ldconfig
/install
678 for file in
$(call qstrip
,$(CONFIG_LDCONFIG_FILE_SPEC
)); do \
679 dir=`dirname $$$$file` ; \
680 $(INSTALL_DIR
) $(1)/$$$$dir ; \
681 $(CP
) $(call qstrip
,$(CONFIG_LDCONFIG_ROOT_DIR
))/$$$$file $(1)/$$$$dir/ ; \
689 -include $(PLATFORM_DIR
)/base-files.mk
692 $(eval
$(call BuildPackage
,base-files
))
693 $(eval
$(call BuildPackage
,libc
))
694 $(eval
$(call BuildPackage
,libgcc
))
695 $(eval
$(call BuildPackage
,libssp
))
696 $(eval
$(call BuildPackage
,libstdcpp
))
697 $(eval
$(call BuildPackage
,libpthread
))
698 $(eval
$(call BuildPackage
,librt
))
699 $(eval
$(call BuildPackage
,libgfortran
))
700 $(eval
$(call BuildPackage
,ldd
))
701 $(eval
$(call BuildPackage
,ldconfig
))