build.mk 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. TOPDIR=$(shell pwd)
  4. export TOPDIR
  5. ifneq ($(shell umask 2>/dev/null | sed 's/0*022/OK/'),OK)
  6. $(error your umask is not 022)
  7. endif
  8. CONFIG_CONFIG_IN = Config.in
  9. CONFIG = config
  10. DEFCONFIG= ADK_DEVELSYSTEM=n \
  11. ADK_DEBUG=n \
  12. ADK_STATIC=n \
  13. ADK_MAKE_PARALLEL=n \
  14. ADK_FORCE_PARALLEL=n \
  15. ADK_PACKAGE_GRUB=n \
  16. ADK_PACKAGE_GCC=n \
  17. ADK_PACKAGE_BASE_FILES=y \
  18. ADK_COMPILE_HEIMDAL=n \
  19. ADK_PACKAGE_HEIMDAL_PKINIT=n \
  20. ADK_PACKAGE_HEIMDAL_SERVER=n \
  21. ADK_PACKAGE_HEIMDAL_LIBS=n \
  22. ADK_PACKAGE_HEIMDAL_CLIENT_LIBS=n \
  23. BUSYBOX_SELINUX=n \
  24. BUSYBOX_MODPROBE_SMALL=n \
  25. BUSYBOX_EJECT=n \
  26. BUSYBOX_BUILD_LIBBUSYBOX=n \
  27. BUSYBOX_FEATURE_2_4_MODULES=n \
  28. BUSYBOX_LOCALE_SUPPORT=n \
  29. BUSYBOX_FEATURE_PREFER_APPLETS=n \
  30. BUSYBOX_FEATURE_SUID=n \
  31. BUSYBOX_SELINUXENABLED=n \
  32. BUSYBOX_FEATURE_INSTALLER=n \
  33. BUSYBOX_PAM=n \
  34. BUSYBOX_FLASH_LOCK=n \
  35. BUSYBOX_FLASH_UNLOCK=n \
  36. BUSYBOX_FLASH_ERASEALL=n \
  37. BUSYBOX_PIE=n \
  38. BUSYBOX_TASKSET=n \
  39. BUSYBOX_DEBUG=n \
  40. BUSYBOX_NOMMU=n \
  41. BUSYBOX_WERROR=n \
  42. BUSYBOX_STATIC=n \
  43. BUSYBOX_FEATURE_AIX_LABEL=n \
  44. BUSYBOX_FEATURE_SUN_LABEL=n \
  45. BUSYBOX_FEATURE_OSF_LABEL=n \
  46. BUSYBOX_FEATURE_SGI_LABEL=n \
  47. ADK_KERNEL_RT2X00_DEBUG=n \
  48. ADK_KERNEL_ATH5K_DEBUG=n \
  49. ADK_KERNEL_DEBUG_WITH_KGDB=n
  50. noconfig_targets:= menuconfig \
  51. _config \
  52. _mconfig \
  53. distclean \
  54. defconfig \
  55. tags
  56. MAKECLEANDIR_SYMBOLS= ADK_DEBUG
  57. MAKECLEAN_SYMBOLS= ADK_TARGET_PACKAGE_IPKG \
  58. ADK_TARGET_PACKAGE_RPM \
  59. ADK_TARGET_PACKAGE_TGZ
  60. POSTCONFIG= -@ \
  61. if [ -f .config.old ];then \
  62. if [ -d .cfg ];then \
  63. what=cleantarget; \
  64. for symbol in ${MAKECLEANDIR_SYMBOLS}; do \
  65. newval=$$(grep -e "^$$symbol=" -e "^\# $$symbol " .config); \
  66. oldval=$$(cat .cfg/"$$symbol" 2>&-); \
  67. [[ $$newval = $$oldval ]] && continue; \
  68. echo; \
  69. echo >&2 "WARNING: Toolchain related options have changed, 'make" \
  70. "$$what' might be required!"; \
  71. break; \
  72. done; \
  73. what=clean; \
  74. for symbol in ${MAKECLEAN_SYMBOLS}; do \
  75. newval=$$(grep -e "^$$symbol=" -e "^\# $$symbol " .config); \
  76. oldval=$$(cat .cfg/"$$symbol" 2>&-); \
  77. [[ $$newval = $$oldval ]] && continue; \
  78. echo; \
  79. echo >&2 "WARNING: Package backend related options have changed, 'make" \
  80. "$$what' might be required!"; \
  81. break; \
  82. done; \
  83. if [ -f .busyboxcfg ];then rm .busyboxcfg;fi; \
  84. fi; \
  85. fi
  86. # Pull in the user's configuration file
  87. ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
  88. -include $(TOPDIR)/.config
  89. endif
  90. ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y)
  91. include $(TOPDIR)/rules.mk
  92. include ${TOPDIR}/mk/split-cfg.mk
  93. all: world
  94. ${TOPDIR}/package/Depends.mk: ${TOPDIR}/.config $(wildcard ${TOPDIR}/package/*/Makefile)
  95. mksh ${TOPDIR}/package/depmaker
  96. .NOTPARALLEL:
  97. .PHONY: all world clean cleantarget cleandir distclean image_clean
  98. world: $(DISTDIR) $(BUILD_DIR) $(TARGET_DIR) $(PACKAGE_DIR) ${TOPDIR}/.cfg_${ADK_TARGET}_${ADK_LIBC}/ADK_HAVE_DOT_CONFIG
  99. ${BASH} ${TOPDIR}/scripts/scan-pkgs.sh
  100. ifeq ($(ADK_NATIVE),y)
  101. $(MAKE) -f mk/build.mk toolchain/kernel-headers-prepare target/config-prepare target/compile package/compile root_clean package/install package_index target/install
  102. else
  103. ifeq ($(ADK_TOOLCHAIN_ONLY),y)
  104. $(MAKE) -f mk/build.mk toolchain/install package/compile
  105. else
  106. $(MAKE) -f mk/build.mk toolchain/install target/config-prepare target/compile package/compile root_clean package/install package_index target/install
  107. endif
  108. endif
  109. package_index:
  110. ifeq ($(ADK_TARGET_PACKAGE_IPKG),y)
  111. -cd ${PACKAGE_DIR} && \
  112. ${BASH} ${TOPDIR}/scripts/ipkg-make-index.sh . >Packages
  113. endif
  114. $(DISTDIR):
  115. mkdir -p $(DISTDIR)
  116. $(BUILD_DIR):
  117. mkdir -p $(BUILD_DIR)
  118. $(TARGET_DIR):
  119. mkdir -p $(TARGET_DIR)
  120. $(PACKAGE_DIR):
  121. mkdir -p ${PACKAGE_DIR}/.stamps
  122. ${STAGING_DIR} ${STAGING_DIR}/etc ${STAGING_TOOLS}:
  123. mkdir -p ${STAGING_DIR}/{bin,etc,lib,usr/include} \
  124. ${STAGING_TOOLS}/{bin,lib}
  125. ${STAGING_DIR}/etc/ipkg.conf: ${STAGING_DIR}/etc
  126. ifeq ($(ADK_TARGET_PACKAGE_IPKG),y)
  127. echo "dest root /" >${STAGING_DIR}/etc/ipkg.conf
  128. echo "option offline_root ${TARGET_DIR}" >>$(STAGING_DIR)/etc/ipkg.conf
  129. endif
  130. package/%: ${TOPDIR}/.cfg_${ADK_TARGET}_${ADK_LIBC}/ADK_HAVE_DOT_CONFIG ${STAGING_DIR}/etc/ipkg.conf ${TOPDIR}/package/Depends.mk
  131. $(MAKE) -C package $(patsubst package/%,%,$@)
  132. target/%: ${TOPDIR}/.cfg_${ADK_TARGET}_${ADK_LIBC}/ADK_HAVE_DOT_CONFIG
  133. $(MAKE) -C target $(patsubst target/%,%,$@)
  134. toolchain/%: ${STAGING_DIR}
  135. $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@)
  136. image:
  137. $(MAKE) -C target image
  138. switch:
  139. echo "Saving configuration for target: ${ADK_TARGET}"
  140. cp -p .config .config.${ADK_TARGET}
  141. if [ -f .config.old ];then cp -p .config.old .config.old.${ADK_TARGET};fi
  142. mv .cfg .cfg.${ADK_TARGET}
  143. if [ -f .config.${TARGET} ];then cp -p .config.${TARGET} .config; \
  144. cp -p .config.old.${TARGET} .config.old; \
  145. mv .cfg.${TARGET} .cfg; \
  146. echo "Setting configuration to target: ${TARGET}"; \
  147. else echo "No old target config found";mv .config .config.bak; make TARGET=${TARGET};fi
  148. kernelconfig:
  149. cp $(TOPDIR)/target/$(ADK_TARGET)/kernel.config $(BUILD_DIR)/linux/.config
  150. $(MAKE) -C $(BUILD_DIR)/linux/ ARCH=$(ARCH) menuconfig
  151. cp $(BUILD_DIR)/linux/.config $(TOPDIR)/target/$(ADK_TARGET)/kernel.config
  152. # create a new package from package/.template
  153. newpackage:
  154. @echo "Creating new package $(PKG)"
  155. $(CP) $(TOPDIR)/package/.template $(TOPDIR)/package/$(PKG)
  156. pkg=$$(echo $(PKG)|tr '[:lower:]-' '[:upper:]_'); \
  157. $(SED) "s#@UPKG@#$$pkg#" $(TOPDIR)/package/$(PKG)/Makefile
  158. $(SED) 's#@PKG@#$(PKG)#' $(TOPDIR)/package/$(PKG)/Makefile
  159. $(SED) 's#@VER@#$(VER)#' $(TOPDIR)/package/$(PKG)/Makefile
  160. @echo "Edit package/$(PKG)/Makefile to complete"
  161. @echo "Do not forget to add package to package/Config.in"
  162. #############################################################
  163. #
  164. # Cleanup and misc junk
  165. #
  166. #############################################################
  167. root_clean:
  168. @$(TRACE) root_clean
  169. rm -rf $(TARGET_DIR)
  170. mkdir -p $(TARGET_DIR)
  171. # Do a per-package clean here, too. This way stale headers and
  172. # libraries from cross_*/target/ get wiped away, which keeps
  173. # future package build's configure scripts from returning false
  174. # dependencies information.
  175. clean:
  176. @$(TRACE) clean
  177. $(MAKE) -C $(CONFIG) clean
  178. for d in ${STAGING_PARENT}; do \
  179. for f in $$(ls $$d/pkg/[a-z]* 2>/dev/null); do \
  180. while read file ; do \
  181. rm $$d/target/$$file 2>/dev/null; \
  182. done < $$f ; \
  183. rm $$f ; \
  184. done \
  185. done
  186. rm -rf $(BUILD_DIR) $(BIN_DIR) $(TARGET_DIR) \
  187. ${TOPDIR}/.cfg_${ADK_TARGET}_${ADK_LIBC} \
  188. ${TOPDIR}/package/pkglist.d
  189. rm -f ${TOPDIR}/package/*/info.mk ${TOPDIR}/package/Depends.mk
  190. cleankernel:
  191. @$(TRACE) cleankernel
  192. rm -rf $(TOOLCHAIN_BUILD_DIR)/linux* $(BUILD_DIR)/linux
  193. cleandir:
  194. @$(TRACE) cleandir
  195. @$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE)
  196. rm -rf $(BUILD_DIR_PFX) $(BIN_DIR_PFX) $(TARGET_DIR_PFX) \
  197. ${TOPDIR}/.cfg* ${TOPDIR}/package/pkglist.d
  198. rm -rf $(TOOLCHAIN_BUILD_DIR_PFX) $(STAGING_PARENT_PFX) \
  199. $(TOOLS_BUILD_DIR)
  200. rm -f .menu .tmpconfig.h ${TOPDIR}/package/*/info.mk \
  201. ${TOPDIR}/package/Depends.mk ${TOPDIR}/prereq.mk \
  202. .busyboxcfg
  203. cleantarget:
  204. @$(TRACE) cleantarget
  205. @$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE)
  206. rm -rf $(BUILD_DIR) $(BIN_DIR) $(TARGET_DIR) \
  207. ${TOPDIR}/.cfg_${ADK_TARGET}_${ADK_LIBC}
  208. rm -rf $(TOOLCHAIN_BUILD_DIR) $(STAGING_PARENT)
  209. rm -f .tmpconfig.h ${TOPDIR}/package/*/info.mk \
  210. .busyboxcfg all.config .defconfig
  211. distclean:
  212. @$(TRACE) distclean
  213. @$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE)
  214. @rm -rf $(BUILD_DIR_PFX) $(BIN_DIR_PFX) $(TARGET_DIR_PFX) $(DISTDIR) \
  215. ${TOPDIR}/.cfg* ${TOPDIR}/package/pkglist.d
  216. @rm -rf $(TOOLCHAIN_BUILD_DIR_PFX) $(STAGING_PARENT_PFX) \
  217. $(TOOLS_BUILD_DIR)
  218. @rm -f .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \
  219. .menu ${TOPDIR}/package/*/info.mk ${TOPDIR}/package/Depends.mk \
  220. .busyboxcfg
  221. else # ! ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y)
  222. ifeq ($(filter-out distclean,${MAKECMDGOALS}),)
  223. include ${TOPDIR}/mk/vars.mk
  224. else
  225. include $(TOPDIR)/prereq.mk
  226. export BASH HOSTCC HOSTCFLAGS MAKE LANGUAGE LC_ALL OStype PATH
  227. endif
  228. all: menuconfig
  229. @echo "Start the build with \"make\" or with \"make v\" to be verbose"
  230. # configuration
  231. # ---------------------------------------------------------------------------
  232. # force entering the subdir, as dependency checking is done there
  233. .PHONY: $(CONFIG)/conf $(CONFIG)/mconf
  234. $(CONFIG)/conf:
  235. @$(MAKE) -C $(CONFIG) conf
  236. $(CONFIG)/mconf:
  237. @$(MAKE) -C $(CONFIG)
  238. defconfig: .menu $(CONFIG)/conf
  239. ifeq (${OStype},Linux)
  240. @echo ADK_HOST_LINUX=y > $(TOPDIR)/.defconfig
  241. endif
  242. ifeq (${OStype},FreeBSD)
  243. @echo ADK_HOST_FREEBSD=y > $(TOPDIR)/.defconfig
  244. endif
  245. ifeq (${OStype},MirBSD)
  246. @echo ADK_HOST_MIRBSD=y > $(TOPDIR)/.defconfig
  247. endif
  248. ifeq (${OStype},OpenBSD)
  249. @echo ADK_HOST_OPENBSD=y > $(TOPDIR)/.defconfig
  250. endif
  251. ifeq (${OStype},NetBSD)
  252. @echo ADK_HOST_NETBSD=y > $(TOPDIR)/.defconfig
  253. endif
  254. ifneq (,$(filter CYGWIN%,${OStype}))
  255. @echo ADK_HOST_CYGWIN=y > $(TOPDIR)/.defconfig
  256. endif
  257. @if [ ! -z "$(TARGET)" ];then \
  258. grep "^config" target/Config.in \
  259. |grep -i "$(TARGET)" \
  260. |sed -e "s#^config \(.*\)#\1=y#" \
  261. >> $(TOPDIR)/.defconfig; \
  262. for symbol in ${DEFCONFIG}; do \
  263. echo $$symbol >> $(TOPDIR)/.defconfig; \
  264. done; \
  265. fi
  266. @if [ ! -z "$(FS)" ];then \
  267. grep "^config" target/Config.in \
  268. |grep -i "$(FS)" \
  269. |sed -e "s#^config \(.*\)#\1=y#" \
  270. >> $(TOPDIR)/.defconfig; \
  271. fi
  272. @if [ ! -z "$(PKG)" ];then \
  273. grep "^config" target/Config.in \
  274. |grep -i "$(PKG)" \
  275. |sed -e "s#^config \(.*\)#\1=y#" \
  276. >> $(TOPDIR)/.defconfig; \
  277. fi
  278. @if [ ! -z "$(LIBC)" ];then \
  279. grep "^config" target/Config.in \
  280. |grep -i "$(LIBC)" \
  281. |sed -e "s#^config \(.*\)#\1=y#" \
  282. >> $(TOPDIR)/.defconfig; \
  283. fi
  284. ifneq (,$(filter %_qemu,${TARGET}))
  285. @echo ADK_LINUX_QEMU=y >> $(TOPDIR)/.defconfig
  286. endif
  287. ifneq (,$(filter rescue%,${TARGET}))
  288. @echo ADK_LINUX_RESCUE=y >> $(TOPDIR)/.defconfig
  289. endif
  290. ifneq (,$(filter rb%,${TARGET}))
  291. @echo ADK_LINUX_MIKROTIK=y >> $(TOPDIR)/.defconfig
  292. endif
  293. ifneq (,$(filter alix%,${TARGET}))
  294. @echo ADK_LINUX_ALIX=y >> $(TOPDIR)/.defconfig
  295. endif
  296. ifneq (,$(filter wrap%,${TARGET}))
  297. @echo ADK_LINUX_ALIX=y >> $(TOPDIR)/.defconfig
  298. endif
  299. @if [ ! -z "$(TARGET)" ];then \
  300. $(CONFIG)/conf -D .defconfig $(CONFIG_CONFIG_IN); \
  301. fi
  302. modconfig:
  303. ifeq (${OStype},Linux)
  304. @echo ADK_HOST_LINUX=y > $(TOPDIR)/all.config
  305. endif
  306. ifeq (${OStype},FreeBSD)
  307. @echo ADK_HOST_FREEBSD=y > $(TOPDIR)/all.config
  308. endif
  309. ifeq (${OStype},MirBSD)
  310. @echo ADK_HOST_MIRBSD=y > $(TOPDIR)/all.config
  311. endif
  312. ifeq (${OStype},OpenBSD)
  313. @echo ADK_HOST_OPENBSD=y > $(TOPDIR)/all.config
  314. endif
  315. ifeq (${OStype},NetBSD)
  316. @echo ADK_HOST_NETBSD=y > $(TOPDIR)/all.config
  317. endif
  318. ifneq (,$(filter CYGWIN%,${OStype}))
  319. @echo ADK_HOST_CYGWIN=y > $(TOPDIR)/all.config
  320. endif
  321. @if [ ! -z "$(TARGET)" ];then \
  322. grep "^config" target/Config.in \
  323. |grep -i "$(TARGET)" \
  324. |sed -e "s#^config \(.*\)#\1=y#" \
  325. >> $(TOPDIR)/all.config; \
  326. for symbol in ${DEFCONFIG}; do \
  327. echo $$symbol >> $(TOPDIR)/all.config; \
  328. done; \
  329. fi
  330. @if [ ! -z "$(FS)" ];then \
  331. grep "^config" target/Config.in \
  332. |grep -i "$(FS)" \
  333. |sed -e "s#^config \(.*\)#\1=y#" \
  334. >> $(TOPDIR)/all.config; \
  335. fi
  336. @if [ ! -z "$(PKG)" ];then \
  337. grep "^config" target/Config.in \
  338. |grep -i "$(PKG)" \
  339. |sed -e "s#^config \(.*\)#\1=y#" \
  340. >> $(TOPDIR)/all.config; \
  341. fi
  342. @if [ ! -z "$(LIBC)" ];then \
  343. grep "^config" target/Config.in \
  344. |grep -i "$(LIBC)" \
  345. |sed -e "s#^config \(.*\)#\1=y#" \
  346. >> $(TOPDIR)/all.config; \
  347. fi
  348. ifneq (,$(filter %_qemu,${TARGET}))
  349. @echo ADK_LINUX_QEMU=y >> $(TOPDIR)/all.config
  350. endif
  351. ifneq (,$(filter %_rescue,${TARGET}))
  352. @echo ADK_LINUX_RESCUE=y >> $(TOPDIR)/all.config
  353. endif
  354. ifneq (,$(filter rb%,${TARGET}))
  355. @echo ADK_LINUX_MIKROTIK=y >> $(TOPDIR)/all.config
  356. endif
  357. ifneq (,$(filter alix%,${TARGET}))
  358. @echo ADK_LINUX_ALIX=y >> $(TOPDIR)/all.config
  359. endif
  360. ifneq (,$(filter wrap%,${TARGET}))
  361. @echo ADK_LINUX_ALIX=y >> $(TOPDIR)/all.config
  362. endif
  363. menuconfig: $(CONFIG)/mconf defconfig .menu
  364. @if [ ! -f .config ];then \
  365. $(CONFIG)/conf -D .defconfig $(CONFIG_CONFIG_IN); \
  366. fi
  367. @$(CONFIG)/mconf $(CONFIG_CONFIG_IN)
  368. ${POSTCONFIG}
  369. _config: $(CONFIG)/conf .menu
  370. -@touch .config
  371. @$(CONFIG)/conf ${W} $(CONFIG_CONFIG_IN) >/dev/null
  372. ${POSTCONFIG}
  373. .NOTPARALLEL: _mconfig
  374. _mconfig: ${CONFIG}/conf _mconfig2 _config
  375. _mconfig2: ${CONFIG}/conf modconfig .menu
  376. @${CONFIG}/conf -m ${RCONFIG} >/dev/null
  377. distclean:
  378. @$(MAKE) -C $(CONFIG) clean
  379. @rm -rf $(BUILD_DIR_PFX) $(BIN_DIR_PFX) $(TARGET_DIR_PFX) $(DISTDIR) \
  380. ${TOPDIR}/.cfg* ${TOPDIR}/package/pkglist.d
  381. @rm -rf $(TOOLCHAIN_BUILD_DIR_PFX) $(STAGING_PARENT_PFX) $(TOOLS_BUILD_DIR)
  382. @rm -f .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \
  383. .menu ${TOPDIR}/package/*/info.mk ${TOPDIR}/package/Depends.mk
  384. endif # ! ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y)
  385. # build all targets and combinations
  386. bulk:
  387. while read target libc fs; do \
  388. mkdir -p $(TOPDIR)/bin/$$target_$$libc; \
  389. ( \
  390. echo === building $$target $$libc $$fs on $$(date); \
  391. $(GMAKE) prereq && \
  392. $(GMAKE) TARGET=$$target LIBC=$$libc FS=$$fs defconfig; \
  393. $(GMAKE) VERBOSE=1 all; \
  394. rm .config; \
  395. ) 2>&1 | tee $(TOPDIR)/bin/$$target_$$libc/$$target-$$libc-$$fs.log; \
  396. done <${TOPDIR}/target/bulk.lst
  397. bulkall:
  398. while read target libc fs; do \
  399. mkdir -p $(TOPDIR)/bin/$$target_$$libc; \
  400. ( \
  401. echo === building $$target $$libc $$fs on $$(date); \
  402. $(GMAKE) prereq && \
  403. $(GMAKE) TARGET=$$target LIBC=$$libc FS=$$fs allconfig; \
  404. $(GMAKE) VERBOSE=1 all; \
  405. rm .config; \
  406. ) 2>&1 | tee $(TOPDIR)/bin/$$target_$$libc/$$target-$$libc-$$fs.log; \
  407. done <${TOPDIR}/target/bulk.lst
  408. bulkallmod:
  409. while read target libc fs; do \
  410. mkdir -p $(TOPDIR)/bin/$$target_$$libc; \
  411. ( \
  412. echo === building $$target $$libc $$fs on $$(date); \
  413. $(GMAKE) prereq && \
  414. $(GMAKE) TARGET=$$target LIBC=$$libc FS=$$fs allmodconfig; \
  415. $(GMAKE) VERBOSE=1 all; \
  416. rm .config; \
  417. ) 2>&1 | tee $(TOPDIR)/bin/$$target_$$libc/$$target-$$libc-$$fs.log; \
  418. done <${TOPDIR}/target/bulk.lst
  419. menu .menu: $(wildcard ${TOPDIR}/package/*/Makefile)
  420. mksh $(TOPDIR)/package/pkgmaker
  421. @:>.menu
  422. dep:
  423. mksh $(TOPDIR)/package/depmaker
  424. .PHONY: menu dep