-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (32 loc) · 850 Bytes
/
Makefile
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
.PHONY=default run
CFLAGS=-O3
LDFLAGS=-lSDL2 -lSDL2_image -lm -lGL -lGLEW -lfreetype -pthread
INCLUDE=-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6
SRC=$(wildcard src/*/*.c)
OBJ=$(patsubst src/%.c, bin/%.o, $(SRC))
SRC_H=$(wildcard src/*/*.h)
defualt: nui run
nui: $(OBJ)
gcc $(CFLAGS) $^ $(LDFLAGS) -o $@
bin/%.o: src/%.c $(SRC_H) | bin/common/ bin/game/ bin/client/ bin/renderer/ bin/pipeline/ bin/gl/ bin/ngui/
gcc $(INCLUDE) $(CFLAGS) -c -o $@ $<
bin/common/: | bin/
mkdir -p $@
bin/game/: | bin/
mkdir -p $@
bin/client/: | bin/
mkdir -p $@
bin/renderer/: | bin/
mkdir -p $@
bin/pipeline/: | bin/
mkdir -p $@
bin/gl/: | bin/
mkdir -p $@
bin/ngui/: | bin/
mkdir -p $@
bin/:
mkdir -p $@
clean:
rm -f $(OBJ)
run:
./nui