aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 37303d1d00697264bd2a99328c0081e0ed5198ad (plain) (blame)
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
CFLAGS = -std=c99 -Wall -Wextra -pedantic -Wno-deprecated-declarations -D_XOPEN_SOURCE=700L
LDFLAGS = -lSDL2 -lSDL2_ttf

SRC = main.c microui.c renderer.c widget.c ui.c unit.c engine.c
OBJ = ${SRC:.c=.o}

all: volute

clean:
	rm -f volute *.o

test: test_unit
	for t in $^; do \
		./$$t; \
	done

test_unit: test_unit.o unit.o
	${CC} -o $@ $^ ${LDFLAGS}

volute: ${OBJ}
	${CC} -o $@ $^ ${LDFLAGS}

%.o: %.c
	${CC} -c ${CFLAGS} $<

${OBJ}: microui.h renderer.h widget.h ui.h unit.h engine.h