-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (35 loc) · 975 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
NAME1 = philoThread
FILE1 = src/Display.cpp \
src/Handler.cpp \
src/main.cpp \
src/Philosophe.cpp
OBJ1 = $(FILE1:.cpp=.o)
NAME2 = launcher
FILE2 = srcFork/Abstraction/Semaphore.cpp \
srcFork/Abstraction/Fork.cpp \
srcFork/Abstraction/Execve.cpp \
srcFork/mainTable.cpp
OBJ2 = $(FILE2:.cpp=.o)
NAME3 = philo
FILE3 = srcFork/Abstraction/Semaphore.cpp \
srcFork/Philosophe.cpp \
srcFork/main.cpp
OBJ3 = $(FILE3:.cpp=.o)
GCC = g++
CPPFLAGS += -W -Wall -Wextra -std=c++11 -lncurses -pthread -I ./srcFork/Abstraction/ -g3
RM = rm -f
all: thread fork
thread: $(NAME1)
fork: $(NAME2) $(NAME3)
$(NAME1): $(OBJ1)
$(GCC) -o $(NAME1) $(OBJ1) $(CPPFLAGS)
$(NAME2): $(OBJ2)
$(GCC) -o $(NAME2) $(OBJ2) $(CPPFLAGS)
$(NAME3): $(OBJ3)
$(GCC) -o $(NAME3) $(OBJ3) $(CPPFLAGS)
fclean:
$(RM) $(OBJ1) $(OBJ2) $(OBJ3)
clean: fclean
$(RM) $(NAME1) $(NAME2) $(NAME3)
re: clean all
.PHONY: fclean clean all re base plus