build.mk 14 KB

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