-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
35 lines (24 loc) · 713 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
-include conf.mk
T = target/params.fth target/asm.fth target/x1.fth target/x2.fth \
target/nucleus.fth
STAMP = $(TARGET)-stamp
TDIR = target/$(TARGET)
all: check
$(STAMP): $(wildcard conf.mk)
rm -f *-stamp
touch $@
check: test-$(TARGET)-asm test-image
image: test/test-kernel.fth src/compile src/compiler.fth $(T)
./src/compile $< image
image.hex: image
objcopy -I binary -O ihex --change-section-address .data=$(START) $< $@
target/%.fth: $(TDIR)/%.fth $(STAMP)
cp $< $@
test-%-asm: test/test-%-asm.fth target/%/asm.fth
echo include $< | forth > $@
grep "Assembler test: PASS" $@
.gdbinit: $(TDIR)/gdbinit
cp $< $@
clean:
rm -f test-* image target/*.fth *-stamp
include $(TDIR)/target.mk