Makefile 16 KB

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