aboutsummaryrefslogtreecommitdiff
path: root/test/hello_world/Makefile.check
blob: f9e0e9510f6041edb22d07f30f8b0817cf574dea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
HELLO_WORLD_TEST := test/hello_world/hello_kernel/hello_kernel

check: $(HELLO_WORLD_TEST:%=%-check)

$(HELLO_WORLD_TEST:%=%-check) : %-check: %
	./test/hello_world/run_hello_world.sh

CFLAGS=-I.
ASFLAGS=-I.

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 $@ $^ ,$@)

hello_kernel_LDFLAGS=-m64 -Wl,--build-id=none -T test/hello_world/hello_kernel/hello_kernel.ld -ffreestanding -nostdlib -Ttext=0x0 -lgcc

test/hello_world/hello_kernel/hello_kernel: test/hello_world/hello_kernel/hello_kernel.o
	$(call Q,LD, $(CC) $(hello_kernel_LDFLAGS) -o $@ $^ , $@)

clean: hello_world-test-clean

hello_world-test-clean:
	$(RM) -f test/hello_world/hello_kernel/hello_kernel
	$(RM) -f test/hello_world/hello_kernel/hello_kernel.o