-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (22 loc) · 711 Bytes
/
Makefile
File metadata and controls
32 lines (22 loc) · 711 Bytes
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
CC = gcc
LEX = flex
CFLAGS += -g -Wall -O0
.PHONY: all clean
all: dasm16 dcpu16 example.d16
# TODO clean should be platform independent
# http://stackoverflow.com/questions/10024486/portable-make-clean-rule
clean:
rm dasm16.exe dcpu16.exe *.o
dasm16: dasm16.o scan.o parse.o variant.o cpu.o generate.o
$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
dcpu16: dcpu16.o cpu.c
$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
dasm16.o: dasm16.c parse.h generate.h
scan.o: scan.l scan.h variant.h
parse.o: parse.c parse.h scan.h variant.h cpu.h
variant.o: variant.c variant.h
generate.o: generate.c generate.h
dcpu16.o: dcpu16.c cpu.h
cpu.o: cpu.c cpu.h
example.d16: example.a16
./dasm16 example.a16 example.d16