began support for DAT assembler directive
[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
10
11 CFLAGS = -g -Wall -Wextra -pedantic -std=c99
12 LDFLAGS = -lreadline
13
14
15 all: $(PROGRAMS)
16
17 depend: .depend
18
19 .depend: $(SOURCES)
20 @rm -f ./.depend
21 $(CC) $(CFLAGS) -MM $^ >> ./.depend
22
23 include .depend
24
25
26 vm-dcpu16: vm-dcpu16.o dcpu16.o common.o
27
28 as-dcpu16: as-dcpu16.o common.o
29
30 clean:
31 @rm -rf $(PROGRAMS) *.o *.dSYM .depend
32
33 check: $(PROGRAMS)