-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
46 lines (30 loc) · 1.19 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
APPLICATION=application
SOURCES_APPLICATION=application.c
SLAVE=slave
SOURCES_SLAVE=slave.c
SOURCES_APPLICATIONTEST=applicationTest.c
QUEUE=queue.o
SOURCES_QUEUE=queue.c
SEMAPHORE=mySemaphore.o
SOURCES_SEMAPHORE=mySemaphore.c
SHARED_MEMORY=mySharedMemory.o
SOURCES_SHARED_MEMORY=mySharedMemory.c
VIEW=view
SOURCES_VIEW=view.c
GCC=gcc
all: $(APPLICATION) $(SLAVE) $(VIEW) $(SLAVETEST)
$(SLAVE): $(SOURCES_SLAVE) $(QUEUE)
$(GCC) $(SOURCES_SLAVE) $(QUEUE) -o $(SLAVE) -pedantic -Wall
$(APPLICATION): $(SOURCES_APPLICATION) $(SOURCES_APPLICATIONTEST) $(QUEUE) $(SEMAPHORE) $(SHARED_MEMORY)
$(GCC) $(SOURCES_APPLICATION) $(SOURCES_APPLICATIONTEST) $(QUEUE) $(SEMAPHORE) $(SHARED_MEMORY) -o $(APPLICATION) -pedantic -Wall
$(QUEUE): $(SOURCES_QUEUE)
$(GCC) -c $(SOURCES_QUEUE) -pedantic -Wall
$(SEMAPHORE): $(SOURCES_SEMAPHORE)
$(GCC) -c $(SOURCES_SEMAPHORE) -pedantic -Wall
$(SHARED_MEMORY): $(SOURCES_SHARED_MEMORY)
$(GCC) -c $(SOURCES_SHARED_MEMORY) -pedantic -Wall
$(VIEW): $(SOURCES_VIEW) $(SEMAPHORE) $(SHARED_MEMORY)
$(GCC) $(SOURCES_VIEW) $(SEMAPHORE) $(SHARED_MEMORY) -o $(VIEW) -pedantic -Wall
clean:
rm -rf *.o $(APPLICATION) $(SLAVE) $(VIEW) $(SLAVETEST)
.PHONY: all clean print debug