Makefile 16 KB

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