Makefile 16 KB

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