summaryrefslogtreecommitdiff
path: root/mk/build.mk
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-03-01 09:32:10 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2014-03-01 09:32:10 +0100
commitb700bbdede249dd290dc67ff2ebdaf730e3ffa6a (patch)
tree53c9e6bbdee8b73c4061d0132776791a8ab46787 /mk/build.mk
parent9e358d94cc283c8022091e67fe3ca0580301a62a (diff)
move target/tools to tools, use ADK_HOST_NEED variable to build a tool, when required. Add archivers to tools, remove prereq checks for them. Rename host_ dir in preparation for shared openadk source via nfs/smb from different host systems. Make some abi cleanup
Diffstat (limited to 'mk/build.mk')
-rw-r--r--mk/build.mk42
1 files changed, 21 insertions, 21 deletions
diff --git a/mk/build.mk b/mk/build.mk
index eadccdcb3..d6fd9b20c 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -91,7 +91,7 @@ POSTCONFIG= -@\
if [ -f .adkinit ];then rm .adkinit;\
else \
if [ -f .config.old ];then \
- $(TOPDIR)/bin/pkgrebuild;\
+ $(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgrebuild;\
rebuild=0; \
if [ "$$(grep ^BUSYBOX .config|md5sum)" != "$$(grep ^BUSYBOX .config.old|md5sum)" ];then \
touch .rebuild.busybox;\
@@ -138,7 +138,7 @@ include $(TOPDIR)/rules.mk
all: world
${TOPDIR}/package/Depends.mk: ${TOPDIR}/.config $(wildcard ${TOPDIR}/package/*/Makefile)
- $(BIN_DIR)/depmaker > ${TOPDIR}/package/Depends.mk
+ $(STAGING_HOST_DIR)/usr/bin/depmaker > ${TOPDIR}/package/Depends.mk
.NOTPARALLEL:
.PHONY: all world clean cleantarget cleandir distclean image_clean
@@ -155,12 +155,12 @@ ifeq ($(ADK_NATIVE),y)
else
ifeq ($(ADK_TOOLCHAIN),y)
ifeq ($(ADK_TOOLCHAIN_ONLY),y)
- $(MAKE) -f mk/build.mk toolchain/fixup tools/install package/compile
+ $(MAKE) -f mk/build.mk tools/install toolchain/fixup package/compile
else
- $(MAKE) -f mk/build.mk toolchain/fixup tools/install package/compile root_clean package/install
+ $(MAKE) -f mk/build.mk tools/install toolchain/fixup package/compile root_clean package/install
endif
else
- $(MAKE) -f mk/build.mk toolchain/fixup tools/install target/config-prepare target/compile package/compile root_clean package/install target/install package_index
+ $(MAKE) -f mk/build.mk tools/install toolchain/fixup target/config-prepare target/compile package/compile root_clean package/install target/install package_index
endif
endif
@@ -250,13 +250,13 @@ root_clean:
clean:
@$(TRACE) clean
$(MAKE) -C $(CONFIG) clean
- for d in ${STAGING_PKG_DIR}; do \
- for f in $$(ls $$d/[a-z]* 2>/dev/null |grep -v [A-Z] 2>/dev/null); do \
- while read file ; do \
- rm ${STAGING_DIR}/$$file 2>/dev/null;\
- done < $$f ; \
- rm $$f ; \
- done \
+ for f in $$(ls ${STAGING_PKG_DIR}/ 2>/dev/null |grep -v [A-Z]|grep -v stamps 2>/dev/null); do \
+ while read file ; do \
+ echo ${STAGING_DIR}/$$file ;\
+ rm ${STAGING_DIR}/$$file 2>/dev/null;\
+ done < $$f ; \
+ echo ${STAGING_PKG_DIR}/$$f ;\
+ rm ${STAGING_PKG_DIR}/$$f ; \
done
rm -rf $(BUILD_DIR) $(FW_DIR) $(TARGET_DIR) \
${TOPDIR}/package/pkglist.d
@@ -619,24 +619,24 @@ bulkallmod:
if [ -f .exit ];then echo "Bulk build failed!"; cat .exit;rm .exit; exit 1;fi \
done
-${TOPDIR}/bin/pkgmaker: $(TOPDIR)/tools/adk/pkgmaker.c $(TOPDIR)/tools/adk/sortfile.c $(TOPDIR)/tools/adk/strmap.c
- @mkdir -p ${TOPDIR}/bin
+$(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgmaker: $(TOPDIR)/tools/adk/pkgmaker.c $(TOPDIR)/tools/adk/sortfile.c $(TOPDIR)/tools/adk/strmap.c
+ @mkdir -p host_$(GNU_HOST_NAME)/usr/bin
@$(CC_FOR_BUILD) -g -o $@ tools/adk/pkgmaker.c tools/adk/sortfile.c tools/adk/strmap.c
-${TOPDIR}/bin/pkgrebuild: $(TOPDIR)/tools/adk/pkgrebuild.c $(TOPDIR)/tools/adk/strmap.c
+$(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgrebuild: $(TOPDIR)/tools/adk/pkgrebuild.c $(TOPDIR)/tools/adk/strmap.c
@$(CC_FOR_BUILD) -g -o $@ tools/adk/pkgrebuild.c tools/adk/strmap.c
-package/Config.in.auto menu .menu: $(wildcard ${TOPDIR}/package/*/Makefile) ${TOPDIR}/bin/pkgmaker ${TOPDIR}/bin/pkgrebuild
+package/Config.in.auto menu .menu: $(wildcard ${TOPDIR}/package/*/Makefile) $(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgmaker $(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgrebuild
@echo "Generating menu structure ..."
- @$(TOPDIR)/bin/pkgmaker
+ @$(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgmaker
@:>.menu
-${TOPDIR}/bin/depmaker: $(TOPDIR)/tools/adk/depmaker.c
- $(CC_FOR_BUILD) -g -o $(TOPDIR)/bin/depmaker $(TOPDIR)/tools/adk/depmaker.c
+$(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/depmaker: $(TOPDIR)/tools/adk/depmaker.c
+ $(CC_FOR_BUILD) -g -o $@ $(TOPDIR)/tools/adk/depmaker.c
-dep: $(TOPDIR)/bin/depmaker
+dep: $(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/depmaker
@echo "Generating dependencies ..."
- @$(TOPDIR)/bin/depmaker > ${TOPDIR}/package/Depends.mk
+ @$(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/depmaker > ${TOPDIR}/package/Depends.mk
.PHONY: menu dep