aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2014-12-15 18:33:26 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2014-12-15 18:33:26 +1100
commit123071788f97a6c1acefbf0841f7d07126ab99ef (patch)
tree5e609aa06682e17dfaa4d165c93b952c703f3269 /test
parent5c0cc57a31c826541f89884234fe566751fba99a (diff)
downloadskiboot-123071788f97a6c1acefbf0841f7d07126ab99ef.zip
skiboot-123071788f97a6c1acefbf0841f7d07126ab99ef.tar.gz
skiboot-123071788f97a6c1acefbf0841f7d07126ab99ef.tar.bz2
Fix makefile dependency generation, especially for HOSTCC
Instead of having individual rules to generate .d, add -MMD to HOSTCC parameters, and just include the generated .d files. This fixes a few weird dependency issues. Also, make the mambo hello_kernel test depend on skiboot.lid Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'test')
-rw-r--r--test/hello_world/Makefile.check6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/hello_world/Makefile.check b/test/hello_world/Makefile.check
index 6e94da7..a2a430c 100644
--- a/test/hello_world/Makefile.check
+++ b/test/hello_world/Makefile.check
@@ -2,14 +2,16 @@ HELLO_WORLD_TEST := test/hello_world/hello_kernel/hello_kernel
check: $(HELLO_WORLD_TEST:%=%-check)
-$(HELLO_WORLD_TEST:%=%-check) : %-check: %
+$(HELLO_WORLD_TEST:%=%-check) : %-check: % skiboot.lid
./test/hello_world/run_hello_world.sh
test/hello_world/hello_kernel/hello_kernel.o: test/hello_world/hello_kernel/hello_kernel.S
- $(call Q,CC, $(CC) -m64 -c -Itest/hello_world/hello_kernel/ -o $@ $^ ,$@)
+ $(call Q,CC, $(CC) -m64 -c -MMD -Itest/hello_world/hello_kernel/ -o $@ $^ ,$@)
hello_kernel_LDFLAGS=-m64 -Wl,--build-id=none -T test/hello_world/hello_kernel/hello_kernel.ld -ffreestanding -nostdlib -Ttext=0x0 -lgcc
+-include $(wildcard test/hello_world/hello_kernel/*.d)
+
test/hello_world/hello_kernel/hello_kernel: test/hello_world/hello_kernel/hello_kernel.o
$(call Q,LD, $(CC) $(hello_kernel_LDFLAGS) -o $@ $^ , $@)