-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
41 lines (29 loc) · 868 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
# change application name here (executable output name)
TARGET=app
# compiler
CC=gcc
# debug
DEBUG=-g
# optimisation
OPT=-O0
# warnings
WARN=-Wall
PTHREAD=-pthread
RAYLIB_DIR=raylib/src
RAYLIB_FLAGS=-I$(RAYLIB_DIR) -L$(RAYLIB_DIR) -lraylib -lGL -lm -lpthread -ldl
CCFLAGS=$(DEBUG) $(OPT) $(WARN) $(PTHREAD) $(RAYLIB_FLAGS) -pipe
GTKLIB=`pkg-config --cflags --libs gtk+-3.0`
# linker
LD=gcc
LDFLAGS=$(PTHREAD) $(GTKLIB) $(RAYLIB_FLAGS) -Wl,-rpath=$(RAYLIB_DIR) -export-dynamic
OBJS= main.o arvore.o renderer.o
all: $(OBJS)
$(LD) $(CCFLAGS) -o $(TARGET) $(OBJS) $(LDFLAGS)
main.o: src/main.c
$(CC) $(CCFLAGS) -c src/main.c $(GTKLIB) -o main.o
renderer.o: src/renderer.c
$(CC) $(CCFLAGS) -c src/renderer.c $(GTKLIB) -o renderer.o
arvore.o: src/arvore.c
$(CC) $(CCFLAGS) -c src/arvore.c $(GTKLIB) -o arvore.o
clean:
rm -f *.o $(TARGET)