forked from jblang/bbcbasic-z80
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (29 loc) · 980 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
36
37
38
39
SRCS = main.asmpp exec.asmpp eval.asmpp fpp.asm hardware.asm hardware-sound.asmpp hardware-time.asm cpm.asm ram.asm tokens.asmpp hardware-tms.asmpp utils.asmpp tracing.asmpp
INCS := $(shell find . -name '*.inc')
ASSEMBLER=apploader
ASSFLAGS=-b --page-align
#-DTRACING
bbcbasic.com: $(SRCS)
$(MAKE) version._inc
$(ASSEMBLER) -obbcbasic.com ${ASSFLAGS} $(SRCS)
%.asmpp: %.asm $(INCS)
@gpp --includemarker "; #include line: %, file:%" \
+ciii ";" "\n" \
-U "" "" "(" "," ")" "(" ")" "#" "!" \
-M "#" "\n" " " " " "\n" "(" ")" \
+n $(DEFINES) \
-o $@ $<
clean-lib:
rm -f *.o *.err *.lis *.map
clean:
rm -f *.o *.err *.lis *.map *.com *.bin *.reloc *._inc
TEST_FILES := $(shell find ./tests-fixtures -name '*.bas')
.PHONY: test
test:
@./test-all
VERSION ?= "0.0.0"
BUILDTIME := $(shell date --rfc-3339=seconds)
.PHONY: version._inc
version._inc:
@echo "#define VERSIONSTAMP \"${VERSION}\"\n" > $@ && \
echo "#define BUILDTIME \"${BUILDTIME}\"\n" >> $@