forked from CRAWLER-T800/Robot_Crawling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
63 lines (51 loc) · 1.71 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
#---------------------------------------------
# Target file to be compiled by default
#---------------------------------------------
MAIN = crawler
#---------------------------------------------
# CC is the compiler to be used
#---------------------------------------------
CC = gcc
#---------------------------------------------
# CFLAGS are the options passed to the compiler
#---------------------------------------------
CFLAGS = -Wall
#---------------------------------------------
# OBJS are the object files to be linked
#---------------------------------------------
OBJ1 = crawler
OBJ2 = qlearn
OBJ3 = ptask
OBJ4 = model
OBJ5 = command_interface
OBJ6 = graphic
OBJ7 = matrices
OBJS = $(OBJ1).o $(OBJ2).o $(OBJ3).o $(OBJ4).o $(OBJ5).o $(OBJ6).o $(OBJ7).o
#---------------------------------------------
# LIBS are the external libraries to be used
#--------------------------------------------
LIBS = -pthread -lrt -lm `allegro-config --libs`
#---------------------------------------------
# Dependencies
#--------------------------------------------
$(MAIN): $(OBJS)
$(CC) $(CFLAGS) -o $(MAIN) $(OBJS) $(LIBS)
$(OBJ1).o: $(OBJ1).c qlearn.h ptask.h
$(CC) $(CFLAGS) -c $(OBJ1).c
$(OBJ2).o: $(OBJ2).c qlearn.h
$(CC) $(CFLAGS) -c $(OBJ2).c
$(OBJ3).o: $(OBJ3).c ptask.h
$(CC) $(CFLAGS) -c $(OBJ3).c
$(OBJ4).o: $(OBJ4).c $(OBJ7).c ptask.h matrices.h
$(CC) $(CFLAGS) -c $(OBJ4).c
$(OBJ5).o: $(OBJ5).c qlearn.h ptask.h
$(CC) $(CFLAGS) -c $(OBJ5).c
$(OBJ6).o: $(OBJ6).c ptask.h
$(CC) $(CFLAGS) -c $(OBJ6).c
$(OBJ7).o: $(OBJ7).c
$(CC) $(CFLAGS) -c $(OBJ7).c
#-------------------------------------------
# Command that can be specified inline: make clean
#-------------------------------------------
clean:
rm -rf *.o $(MAIN)