summaryrefslogtreecommitdiff
path: root/procyon/GNUmakefile
blob: a9379b749b0b392b56716823baab402491ce6cd7 (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
61
62
63
# 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/dbglog.o \
	source/bs/exit.o \
	source/bs/init.o \
	source/bs/shipnm.o \
	source/evt/jmp.o \
	source/gfx/initgfx.o \
	source/info/jmplen.o \
	source/info/sysdist.o \
	source/sav/cont.o \
	source/sav/sav.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)