build.mk 15 KB

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