Makefile 16 KB

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