-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (47 loc) · 1.5 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
# Makefile Written by:
# Santiago R Guiral - Emmanuel Gomez
# UdeA - RTS - Sep 2021
XENO_CONFIG := /bin/xeno-config
CC = gcc
RM = rm -rf
CCFLAGS = -O0 -Wall -ggdb3
THREADS = -lpthread
RTLIBS =-lrt
CFLAGS := $(shell $(XENO_CONFIG) --posix --alchemy --cflags)
LDFLAGS := $(shell $(XENO_CONFIG) --posix --alchemy --ldflags)
#FILES
COARSE = coarsemm
UTILS = utils
QUEUE =pt_queue
MARS = mars
PC= procons
PCTASK = task_definition
PCTIMES = periodic_settings
IMAGEN = image
RS = resource
PING = ping
$(MARS): $(MARS).o $(UTILS).o $(QUEUE).o $(COARSE).o $(PC).o $(PCTASK).o $(PCTIMES).o $(IMAGEN).o $(RS).o $(PING).o
$(CC) -o $@ $+ $(CFLAGS) $(LDFLAGS)
$(MARS).o: $(MARS).c $(UTILS).h $(QUEUE).h $(COARSE).h $(PC).h $(PCTASK).h $(PCTIMES).h $(IMAGEN).h $(RS).h $(PING).h
$(CC) $(CCFLAGS) -c $(MARS).c $(CFLAGS) $(LDFLAGS)
$(UTILS).o: $(UTILS).c $(UTILS).h
$(CC) $(CCFLAGS) -c $(UTILS).c
$(QUEUE).o: $(QUEUE).c $(QUEUE).h
$(CC) $(CCFLAGS) -c $(QUEUE).c
$(COARSE).o: $(COARSE).c $(COARSE).h
$(CC) $(CCFLAGS) -c $(COARSE).c $(THREADS)
$(PCTASK).o: $(PCTASK).c $(PCTASK).h
$(CC) $(CCFLAGS) -c $(PCTASK).c $(RTLIBS) $(THREADS)
$(PCTIMES).o: $(PCTIMES).c $(PCTIMES).h
$(CC) $(CCFLAGS) -c $(PCTIMES).c $(RTLIBS) $(THREADS)
$(PC).o: $(PC).c $(PC).h
$(CC) $(CCFLAGS) -c $(PC).c $(RTLIBS) $(THREADS)
$(IMAGEN).o: $(IMAGEN).c $(IMAGEN).h
$(CC) $(CCFLAGS) -c $(IMAGEN).c
$(RS).o: $(RS).c $(RS).h
$(CC) $(CCFLAGS) -c $(RS).c
$(PING).o: $(PING).c $(PING).h
$(CC) $(CCFLAGS) -c $(PING).c
clean:
$(RM) *.o
$(RM) $(MARS)