initial support for a display module, incomplete
[dcpu16] / Makefile
1 #!make
2 #
3
4 ifeq "$(origin CC)" "default"
5 CC = clang
6 endif
7
8 PROGRAMS = as-dcpu16 vm-dcpu16
9 SOURCES = common.c dcpu16.c as-dcpu16.c vm-dcpu16.c display.c
10
11 CPPFLAGS = -D_XOPEN_SOURCE=600
12 CFLAGS = -g -Wall -Wextra -pedantic -std=c99
13 LDFLAGS = -lreadline
14
15
16 all: $(PROGRAMS)
17
18 depend: .depend
19
20 .depend: $(SOURCES)
21 @rm -f ./.depend
22 $(CC) $(CFLAGS) -MM $^ >> ./.depend
23
24 include .depend
25
26
27 vm-dcpu16: vm-dcpu16.o dcpu16.o common.o display.o
28
29 as-dcpu16: as-dcpu16.o common.o
30
31 clean:
32 @rm -rf $(PROGRAMS) *.o *.dSYM .depend
33
34 check: $(PROGRAMS)