-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (46 loc) · 1.38 KB
/
Makefile
File metadata and controls
66 lines (46 loc) · 1.38 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
CFILES=asm/asm.c out/6809.yy.c out/6809.tab.c out/6809asm.c
CFLAGS=-Wall -g -I lib -I out -I asm
all: bin/6809asm bin/6809emu tests
clean:
rm -fr bin out
distclean: clean
rm -fr *~ */*~
.PHONY: all tests clean distclean
bin/6809asm: $(CFILES) asm/asm.h out/6809asm.h Makefile
mkdir -p bin
gcc -o $@ $(CFILES) $(CFLAGS)
tests: bin/test.o68 bin/test.o69
bin/6809emu: emu/6809emu.c bin/lib6809.so
mkdir -p bin
gcc -o $@ emu/6809emu.c $(CFLAGS) -L bin -l6809
bin/lib6809.so: out/6809lib.c
mkdir -p bin
gcc -fPIC -shared -o $@ $^ $(CFLAGS)
bin/test.o68: test/test.s68 bin/6809asm
mkdir -p bin
bin/6809asm -f cmd $< -o $@
bin/test.o69: test/test.s69 bin/6809asm
mkdir -p bin
bin/6809asm -f cmd $< -o $@
out/6809.def: lib/6809.py lib/6809.dat
mkdir -p out
python3 $< -o $@ lib/6809.dat
out/6809.lex: weave.py out/6809.def asm/6809.lex.t
mkdir -p out
python3 weave.py -d out/6809.def asm/6809.lex.t -o $@
out/6809lib.c: weave.py out/6809.def lib/6809lib.c.t
mkdir -p out
python3 weave.py -d out/6809.def lib/6809lib.c.t -o $@
out/6809asm.c: weave.py out/6809.def asm/6809asm.c.t
mkdir -p out
python3 weave.py -d out/6809.def asm/6809asm.c.t -o $@
out/6809asm.h: weave.py out/6809.def asm/6809asm.h.t
mkdir -p out
python3 weave.py -d out/6809.def asm/6809asm.h.t -o $@
out/%.yy.c: out/%.lex
mkdir -p out
flex -o $@ $^
out/%.tab.c: asm/%.y
mkdir -p out
bison -d $^ -o $@
.SUFFIXES: