aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: b3eccecc57d1a18fae2bfaec008fa0fbdd230507 (plain)
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
include config.mk

TOBJ = ui.o canvas.o user.o palette.o tools.o debug.o
OBJ = $(addprefix build/, ${TOBJ})

build: prep config.h ${OBJ} src/cdraw.c
	${CC} ${CFLAGS} ${LIBS} ${OBJ} src/cdraw.c -o build/cdraw

config.h:
	cp config.def.h config.h

prep:
	mkdir -p build

run:
	./build/cdraw

build/%.o: src/%.c
	${CC} ${CFLAGS} $< -c -o $@

clean:
	rm $(OBJ)
	rm build/cdraw

.PHONY: build clean run prep