diff options
Diffstat (limited to 'mk')
-rw-r--r-- | mk/build.mk | 67 | ||||
-rw-r--r-- | mk/buildhlp.mk | 8 | ||||
-rw-r--r-- | mk/fetch.mk | 1 | ||||
-rw-r--r-- | mk/host.mk | 2 | ||||
-rw-r--r-- | mk/image.mk | 6 | ||||
-rw-r--r-- | mk/pkg-bottom.mk | 2 | ||||
-rw-r--r-- | mk/vars.mk | 15 |
7 files changed, 48 insertions, 53 deletions
diff --git a/mk/build.mk b/mk/build.mk index 0b0694e62..c13ba95b4 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -9,7 +9,7 @@ $(error your umask is not 022) endif CONFIG_CONFIG_IN = Config.in -CONFIG = config +CONFIG = adk/config DEFCONFIG= ADK_DEBUG=n \ ADK_STATIC=n \ ADK_WGET_TIMEOUT=180 \ @@ -93,7 +93,7 @@ POSTCONFIG= -@\ if [ -f .adkinit ];then rm .adkinit;\ else \ if [ -f .config.old ];then \ - $(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgrebuild;\ + $(TOPDIR)/adk/tools/pkgrebuild;\ rebuild=0; \ if [ "$$(grep ^BUSYBOX .config|md5sum)" != "$$(grep ^BUSYBOX .config.old|md5sum)" ];then \ touch .rebuild.busybox;\ @@ -139,27 +139,26 @@ include $(TOPDIR)/rules.mk all: world -${TOPDIR}/package/Depends.mk: ${TOPDIR}/.config $(wildcard ${TOPDIR}/package/*/Makefile) - $(STAGING_HOST_DIR)/usr/bin/depmaker > ${TOPDIR}/package/Depends.mk +${TOPDIR}/package/Depends.mk: ${TOPDIR}/.config $(wildcard ${TOPDIR}/package/*/Makefile) $(TOPDIR)/adk/tools/depmaker + $(TOPDIR)/adk/tools/depmaker > ${TOPDIR}/package/Depends.mk .NOTPARALLEL: .PHONY: all world clean cleandir cleantoolchain distclean image_clean world: mkdir -p $(DL_DIR) $(BUILD_DIR) $(TARGET_DIR) $(FW_DIR) \ - $(TOOLS_BUILD_DIR) $(STAGING_HOST_DIR)/usr/bin \ - $(TOOLCHAIN_BUILD_DIR) $(STAGING_PKG_DIR)/stamps + $(STAGING_HOST_DIR) $(TOOLCHAIN_BUILD_DIR) $(STAGING_PKG_DIR)/stamps ${BASH} ${TOPDIR}/scripts/scan-pkgs.sh ${BASH} ${TOPDIR}/scripts/update-sys ${BASH} ${TOPDIR}/scripts/update-pkg ifeq ($(ADK_TOOLCHAIN),y) ifeq ($(ADK_TOOLCHAIN_ONLY),y) - $(MAKE) -f mk/build.mk tools/install toolchain/fixup package/compile + $(MAKE) -f mk/build.mk package/hostcompile toolchain/fixup package/compile else - $(MAKE) -f mk/build.mk tools/install toolchain/fixup package/compile root_clean package/install + $(MAKE) -f mk/build.mk package/hostcompile toolchain/fixup package/compile root_clean package/install endif else - $(MAKE) -f mk/build.mk tools/install toolchain/fixup target/config-prepare target/compile package/compile root_clean package/install target/install package_index + $(MAKE) -f mk/build.mk package/hostcompile toolchain/fixup target/config-prepare target/compile package/compile root_clean package/install target/install package_index endif package_index: @@ -191,9 +190,6 @@ target/%: toolchain/%: ${STAGING_TARGET_DIR} $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@) -tools/%: - $(MAKE) -C tools $(patsubst tools/%,%,$@) - image: $(MAKE) -C target image @@ -266,7 +262,7 @@ cleandir: @$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE) rm -rf $(BUILD_DIR_PFX) $(FW_DIR_PFX) $(TARGET_DIR_PFX) \ ${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d - rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX) $(TOOLS_BUILD_DIR) + rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX) rm -rf $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX) rm -f .menu .tmpconfig.h .rebuild* ${TOPDIR}/package/Depends.mk ${TOPDIR}/prereq.mk @@ -274,7 +270,7 @@ cleantoolchain: @$(TRACE) cleantoolchain @rm -rf $(BUILD_DIR_PFX) $(TARGET_DIR_PFX) \ ${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d - @rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX) $(TOOLS_BUILD_DIR) + @rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX) @rm -rf $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX) @rm -f .menu .tmpconfig.h .rebuild* ${TOPDIR}/package/Depends.mk @@ -283,7 +279,7 @@ distclean: @$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE) @rm -rf $(BUILD_DIR_PFX) $(FW_DIR_PFX) $(TARGET_DIR_PFX) $(DL_DIR) \ ${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d - @rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX) $(TOOLS_BUILD_DIR) + @rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX) @rm -rf $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX) @rm -f .adkinit .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \ .menu ${TOPDIR}/package/Depends.mk .ADK_HAVE_DOT_CONFIG .rebuild.* @@ -456,7 +452,7 @@ distclean: @$(MAKE) -C $(CONFIG) clean @rm -rf $(BUILD_DIR_PFX) $(FW_DIR_PFX) $(TARGET_DIR_PFX) $(DL_DIR) \ ${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d - @rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_TARGET_DIR_PFX) $(TOOLS_BUILD_DIR) + @rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_TARGET_DIR_PFX) @rm -rf $(STAGING_HOST_DIR_PFX) $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX) @rm -f .adkinit .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \ .menu .rebuild.* ${TOPDIR}/package/Depends.mk .ADK_HAVE_DOT_CONFIG @@ -600,45 +596,42 @@ bulkallmod: if [ -f .exit ];then echo "Bulk build failed!"; cat .exit;rm .exit; exit 1;fi \ done -$(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)/adk/tools/pkgmaker: $(TOPDIR)/adk/tools/pkgmaker.c $(TOPDIR)/adk/tools/sortfile.c $(TOPDIR)/adk/tools/strmap.c + @$(CC_FOR_BUILD) -g -o $@ adk/tools/pkgmaker.c adk/tools/sortfile.c adk/tools/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 +$(TOPDIR)/adk/tools/pkgrebuild: $(TOPDIR)/adk/tools/pkgrebuild.c $(TOPDIR)/adk/tools/strmap.c + @$(CC_FOR_BUILD) -g -o $@ adk/tools/pkgrebuild.c adk/tools/strmap.c -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 +package/Config.in.auto menu .menu: $(wildcard ${TOPDIR}/package/*/Makefile) $(TOPDIR)/adk/tools/pkgmaker $(TOPDIR)/adk/tools/pkgrebuild @echo "Generating menu structure ..." - @$(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/pkgmaker + @$(TOPDIR)/adk/tools/pkgmaker @:>.menu -$(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/depmaker: $(TOPDIR)/tools/adk/depmaker.c - @mkdir -p host_$(GNU_HOST_NAME)/usr/bin - $(CC_FOR_BUILD) -g -o $@ $(TOPDIR)/tools/adk/depmaker.c +$(TOPDIR)/adk/tools/depmaker: $(TOPDIR)/adk/tools/depmaker.c + $(CC_FOR_BUILD) -g -o $@ $(TOPDIR)/adk/tools/depmaker.c -dep: $(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/depmaker +dep: $(TOPDIR)/adk/tools/depmaker @echo "Generating dependencies ..." - @$(TOPDIR)/host_$(GNU_HOST_NAME)/usr/bin/depmaker > ${TOPDIR}/package/Depends.mk + @$(TOPDIR)/adk/tools/depmaker > ${TOPDIR}/package/Depends.mk .PHONY: menu dep include $(TOPDIR)/toolchain/gcc/Makefile.inc check-dejagnu: - @-rm tests/adk.exp tests/master.exp >/dev/null 2>&1 - @sed -e "s#@ADK_TARGET_IP@#$(ADK_TARGET_IP)#" tests/adk.exp.in > \ - tests/adk.exp.in.tmp - @sed -e "s#@ADK_TARGET_PORT@#$(ADK_TARGET_PORT)#" tests/adk.exp.in.tmp > \ - tests/adk.exp - @sed -e "s#@TOPDIR@#$(TOPDIR)#" tests/master.exp.in > \ - tests/master.exp + @-rm adk/tests/adk.exp adk/tests/master.exp >/dev/null 2>&1 + @sed -e "s#@ADK_TARGET_IP@#$(ADK_TARGET_IP)#" \ + -e "s#@ADK_TARGET_PORT@#$(ADK_TARGET_PORT)#" \ + adk/tests/adk.exp.in > adk/tests/adk.exp + @sed -e "s#@TOPDIR@#$(TOPDIR)#" adk/tests/master.exp.in > \ + adk/tests/master.exp check-gcc: check-dejagnu - env DEJAGNU=$(TOPDIR)/tests/master.exp \ + env DEJAGNU=$(TOPDIR)/adk/tests/master.exp \ $(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/$(PKG_NAME)-$(PKG_VERSION)-final/gcc check-gcc check-g++: check-dejagnu - env DEJAGNU=$(TOPDIR)/tests/master.exp \ + env DEJAGNU=$(TOPDIR)/adk/tests/master.exp \ $(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/$(PKG_NAME)-$(PKG_VERSION)-final/gcc check-g++ check: check-gcc check-g++ diff --git a/mk/buildhlp.mk b/mk/buildhlp.mk index 701f0f4a2..5b76fe5e1 100644 --- a/mk/buildhlp.mk +++ b/mk/buildhlp.mk @@ -46,7 +46,7 @@ endif ifeq ($(EXTRACT_OVERRIDE),1) ${MAKE} do-extract else - ${EXTRACT_CMD} + PATH='${HOST_PATH}' ${EXTRACT_CMD} endif @${MAKE} post-extract $(MAKE_TRACE) touch $@ @@ -62,7 +62,7 @@ endif ifeq ($(EXTRACT_OVERRIDE),1) ${MAKE} do-extract else - ${EXTRACT_CMD} + PATH='${HOST_PATH}' ${EXTRACT_CMD} endif @${MAKE} post-extract $(MAKE_TRACE) touch $@ @@ -81,7 +81,7 @@ ${WRKDIST}/.prepared: ${WRKDIST}/.extract_done touch $@ endif -update-patches: +update-patches host-update-patches: @test ! -d ${WRKDIR}.orig || rm -rf ${WRKDIR}.orig @test ! -d ${WRKDIR}.orig ifeq ($(strip ${_IN_PACKAGE})$(strip ${_IN_CVTC}),1) @@ -115,4 +115,4 @@ endif rm -rf ${WRKDIR}.orig; \ [[ $$toedit != FAIL ]] -.PHONY: update-patches +.PHONY: update-patches host-update-patches diff --git a/mk/fetch.mk b/mk/fetch.mk index 6382571b3..ee24f0b60 100644 --- a/mk/fetch.mk +++ b/mk/fetch.mk @@ -26,7 +26,6 @@ refetch: -rm -f ${FULLDISTFILES} ${MAKE} fetch -# XXX for now _CHECKSUM_COOKIE?= ${WRKDIR}/.checksum_done checksum: ${_CHECKSUM_COOKIE} ifeq ($(strip ${NO_CHECKSUM}),) diff --git a/mk/host.mk b/mk/host.mk index 5f9539aef..8d3e7d74e 100644 --- a/mk/host.mk +++ b/mk/host.mk @@ -10,6 +10,7 @@ HOST_CONFIGURE_ENV+= AUTOM4TE=${STAGING_HOST_DIR}/usr/bin/autom4te \ CONFIG_SHELL='$(strip ${SHELL})' \ PKG_CONFIG_LIBDIR='${STAGING_HOST_DIR}/usr/lib/pkgconfig' \ PATH='${HOST_PATH}' \ + CC='$(strip ${CC_FOR_BUILD})' \ CFLAGS='$(strip ${CFLAGS_FOR_BUILD})' \ CXXFLAGS='$(strip ${CXXFLAGS_FOR_BUILD})' \ CPPFLAGS='$(strip ${CPPFLAGS_FOR_BUILD})' \ @@ -28,6 +29,7 @@ HOST_INSTALL_TARGET?= install HOST_MAKE_ENV+= PATH='${HOST_PATH}' \ PKG_CONFIG_LIBDIR='${STAGING_HOST_DIR}/usr/lib/pkgconfig' \ + CC='$(strip ${CC_FOR_BUILD})' \ CFLAGS='$(strip ${CFLAGS_FOR_BUILD})' \ CXXFLAGS='$(strip ${CXXFLAGS_FOR_BUILD})' \ CPPFLAGS='$(strip ${CPPFLAGS_FOR_BUILD})' \ diff --git a/mk/image.mk b/mk/image.mk index 6a4d7863d..2ce1b3444 100644 --- a/mk/image.mk +++ b/mk/image.mk @@ -127,7 +127,7 @@ ROOTFSSQUASHFS= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-${ADK_TARGE ROOTFSJFFS2= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-jffs2.img ROOTFSTARBALL= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}+kernel.tar.gz ROOTFSUSERTARBALL= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.tar.gz -ROOTFSISO= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.iso +ROOTFSISO= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}.iso else TARGET_KERNEL= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_FS}-kernel INITRAMFS= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS} @@ -135,7 +135,7 @@ ROOTFSSQUASHFS= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.img ROOTFSJFFS2= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-jffs2.img ROOTFSTARBALL= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}+kernel.tar.gz ROOTFSUSERTARBALL= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.tar.gz -ROOTFSISO= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.iso +ROOTFSISO= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}.iso endif ${FW_DIR}/${ROOTFSTARBALL}: ${TARGET_DIR} kernel-package @@ -236,7 +236,7 @@ ${FW_DIR}/${ROOTFSISO}: ${TARGET_DIR} kernel-package mkdir -p ${TARGET_DIR}/boot/syslinux cp ${STAGING_HOST_DIR}/usr/share/syslinux/{isolinux.bin,ldlinux.c32} \ ${TARGET_DIR}/boot/syslinux - echo 'DEFAULT /boot/kernel root=/dev/sr0 init=/init' > \ + echo 'DEFAULT /boot/kernel root=/dev/sr0' > \ ${TARGET_DIR}/boot/syslinux/isolinux.cfg ${STAGING_HOST_DIR}/usr/bin/mkisofs -R -uid 0 -gid 0 -o $@ \ -b boot/syslinux/isolinux.bin \ diff --git a/mk/pkg-bottom.mk b/mk/pkg-bottom.mk index 3e454ee5a..2cec6ac2c 100644 --- a/mk/pkg-bottom.mk +++ b/mk/pkg-bottom.mk @@ -125,6 +125,8 @@ do-install: post-install: spkg-install: ${ALL_POSTINST} ${_FAKE_COOKIE}: ${_BUILD_COOKIE} + echo FOO + echo $(HOST_WRKDIR) @-rm -f ${_ALL_CONTROLS} @mkdir -p '${STAGING_PKG_DIR}/stamps' ${WRKINST} '${STAGING_TARGET_DIR}/scripts' @${MAKE} ${_ALL_CONTROLS} $(MAKE_TRACE) diff --git a/mk/vars.mk b/mk/vars.mk index 9da5f3ad3..3cf0a9344 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -17,7 +17,6 @@ DL_DIR?= $(BASE_DIR)/dl else DL_DIR?= $(ADK_DL_DIR) endif -TOOLS_BUILD_DIR= $(BASE_DIR)/tools_build SCRIPT_DIR:= $(BASE_DIR)/scripts STAGING_HOST_DIR:= ${BASE_DIR}/host_${GNU_HOST_NAME} TOOLCHAIN_DIR:= ${BASE_DIR}/toolchain_${GNU_HOST_NAME} @@ -71,7 +70,7 @@ CONFIGURE_TRIPLE:= --build=${GNU_HOST_NAME} \ --target=${GNU_TARGET_NAME} ifneq ($(strip ${ADK_USE_CCACHE}),) -TARGET_COMPILER_PREFIX=ccache ${TARGET_CROSS} +TARGET_COMPILER_PREFIX=$(STAGING_HOST_DIR)/usr/bin/ccache ${TARGET_CROSS} endif # target tools @@ -212,21 +211,21 @@ EXTRACT_CMD= mkdir -p ${WRKDIR}; \ cd ${WRKDIR} && \ for file in ${FULLDISTFILES}; do case $$file in \ *.cpio) \ - cat $$file | $(STAGING_HOST_DIR)/usr/bin/cpio -i -d ;; \ + cat $$file | cpio -i -d ;; \ *.tar) \ tar -xf $$file ;; \ *.cpio.Z | *.cpio.gz | *.cgz | *.mcz) \ - gzip -dc $$file | $(STAGING_HOST_DIR)/usr/bin/cpio -i -d ;; \ + gzip -dc $$file | cpio -i -d ;; \ *.tar.xz | *.txz) \ - $(STAGING_HOST_DIR)/usr/bin/xz -dc $$file | tar -xf - ;; \ + xz -dc $$file | tar -xf - ;; \ *.tar.Z | *.tar.gz | *.taz | *.tgz) \ gzip -dc $$file | tar -xf - ;; \ *.cpio.bz2 | *.cbz) \ - $(STAGING_HOST_DIR)/usr/bin/bzip2 -dc $$file | $(STAGING_HOST_DIR)/usr/bin/cpio -i -d ;; \ + bzip2 -dc $$file | cpio -i -d ;; \ *.tar.bz2 | *.tbz | *.tbz2) \ - $(STAGING_HOST_DIR)/usr/bin/bzip2 -dc $$file | tar -xf - ;; \ + bzip2 -dc $$file | tar -xf - ;; \ *.zip) \ - cat $$file | $(STAGING_HOST_DIR)/usr/bin/cpio -ivd -H zip ;; \ + cat $$file | cpio -ivd -H zip ;; \ *.arm) \ cp $$file ${WRKDIR} ;; \ *) \ |