diff --git a/Makefile b/Makefile index e2a54cd..acefa8c 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ heads_cc := $(INSTALL)/bin/musl-gcc \ -fdebug-prefix-map=$(pwd)=heads \ -gno-record-gcc-switches \ -CROSS := $(pwd)/crossgcc/x86_64-linux-musl/bin/x86_64-musl-linux- +CROSS := $(build)/$(musl-cross_dir)/../../crossgcc/x86_64-linux-musl/bin/x86_64-musl-linux- #heads_cc := $(HOME)/install/x86_64-linux-musl/x86_64-linux-musl/bin/gcc @@ -136,7 +136,7 @@ define define_module = $(VERBOSE_REDIRECT) touch "$$@" - # Build the target after any dependencies + # All of the outputs should result from building the intermediate target $(call outputs,$1): $1.intermediate # Short hand target for the module @@ -144,8 +144,8 @@ define define_module = # Target for all of the outputs, which depend on their dependent modules $1.intermediate: \ - $(foreach d,$($1_depends),$(call outputs,$d)) \ $(foreach d,$($1_depends),$d.intermediate) \ + $(foreach d,$($1_depends),$(call outputs,$d)) \ $(build)/$($1_dir)/.configured @echo "$(DATE) Building $1" @( $(MAKE) \ @@ -301,7 +301,7 @@ $(build)/$(coreboot_dir)/initrd.cpio.xz: initrd.cpio > "$@" # hack for the coreboot to find the linux kernel -$(build)/$(coreboot_dir)/bzImage: $(call outputs,linux) +$(build)/$(coreboot_dir)/bzImage: linux.intermediate @echo "$(DATE) Copying $@" @cp -a "$^" "$@" coreboot.intermediate: $(build)/$(coreboot_dir)/bzImage @@ -315,10 +315,12 @@ coreboot.intermediate: $(build)/$(coreboot_dir)/bzImage x230.rom: $(build)/$(coreboot_dir)/x230/coreboot.rom "$(build)/$(coreboot_dir)/$(BOARD)/cbfstool" "$<" print dd if="$<" of="$@" bs=1M skip=8 + $(RM) "$<" qemu.rom: $(build)/$(coreboot_dir)/qemu/coreboot.rom "$(build)/$(coreboot_dir)/$(BOARD)/cbfstool" "$<" print - cp -a "$<" "$@" + mv "$<" "$@" + clean-modules: for dir in \ diff --git a/modules/musl b/modules/musl index 6f77cc4..cc94d30 100644 --- a/modules/musl +++ b/modules/musl @@ -6,7 +6,7 @@ musl_tar := musl-$(musl_version).tar.gz musl_url := https://www.musl-libc.org/releases/$(musl_tar) musl_hash := 97e447c7ee2a7f613186ec54a93054fe15469fe34d7d323080f7ef38f5ecb0fa -musl_output := $(INSTALL)/bin/musl-gcc +musl_output := ../../install/bin/musl-gcc # # Note that for syslibdir to be /lib the install will fail. diff --git a/modules/musl-cross b/modules/musl-cross index be64f7f..30375f0 100644 --- a/modules/musl-cross +++ b/modules/musl-cross @@ -4,7 +4,7 @@ musl-cross_version := git musl-cross_dir := musl-cross-$(musl-cross_version) musl-cross_repo := https://github.com/GregorR/musl-cross -musl-cross_output := $(pwd)/crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-gcc +musl-cross_output := ../../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-gcc musl-cross_configure := \ /bin/echo -e > Makefile \