summaryrefslogtreecommitdiff
path: root/procyon/GNUmakefile
blob: b54c12f2460223849a96259d3654da38bf82cce8 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# TOOLS

# TOOL FLAGS

CFLAGS := \
	-D_POSIX_C_SOURCE=200809L \
	-Iinclude \
	-O3 \
	-Wall \
	-Wextra \
	-Wpedantic \
	-g \
	-march=native \
	-std=c2x

ifeq "$(debug)" "true"
CFLAGS := \
	$(CFLAGS) \
	-Dacm_dbg
endif

LDLIBS := \
	-lGL \
	-lflux \
	-lglfw \
	-lzap

# HEADERS

HDRS := \
	include/acm/bs.h

# BINARIES

OBJS := \
	source/bs/cont.o \
	source/bs/dbglog.o \
	source/bs/exit.o \
	source/bs/init.o \
	source/bs/sav.o \
	source/bs/shipnm.o \
	source/gfx/initgfx.o \
	source/main.o

BIN := procyon.elf

# TARGETS

.PHONY: clean purge

$(BIN): $(OBJS)
	$(CC) $(CFLAGS) $(LDFLAGS) -o$(@) $(^) $(LDLIBS)

$(OBJS): $(HDRS)

clean:
	$(RM) $(OBJS)

purge: clean
	$(RM) $(LIB)