-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·67 lines (47 loc) · 1.46 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
##---------------------------------------
## Target file to be compiled by default
##---------------------------------------
MAIN=main
##---------------------------------------
## CC is the compiler to be used
##---------------------------------------
CC=gcc
##---------------------------------------
## CFLAGS are the options passed to the compiler
##---------------------------------------
CFLAGS= -Wall -std=c11 -lpthread -lrt -lm -ltoml
##---------------------------------------
## SRC relative path of source files
##---------------------------------------
SRC= src
##---------------------------------------
## OBJS are the object files to be linked
##---------------------------------------
#OBJ2= mylib2
#OBJS= $(MAIN).o $(OBJ1).o $(OBJ2).o
OBJ1= task
OBJ2= graphics
OBJ3= model
OBJ4= configure
OBJS= $(MAIN).o $(OBJ1).o $(OBJ2).o $(OBJ3).o $(OBJ4).o
##---------------------------------------
## LIBS are the external libraries to be used
##---------------------------------------
LIBS=`allegro-config --libs`
##---------------------------------------
##DEPENDENCIES
##---------------------------------------
$(MAIN): $(OBJS)
$(CC) -o $(MAIN) $(OBJS) $(LIBS) $(CFLAGS)
$(MAIN).o: $(SRC)/$(MAIN).c
$(CC) -c $(SRC)/$(MAIN).c
$(OBJ1).o: $(SRC)/$(OBJ1).c
$(CC) -c $(SRC)/$(OBJ1).c
$(OBJ2).o: $(SRC)/$(OBJ2).c
$(CC) -c $(SRC)/$(OBJ2).c
$(OBJ3).o: $(SRC)/$(OBJ3).c
$(CC) -c $(SRC)/$(OBJ3).c
$(OBJ4).o: $(SRC)/$(OBJ4).c
$(CC) -c $(SRC)/$(OBJ4).c
clean:
@rm -f $(MAIN) *.o