-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (37 loc) · 1 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
# Makefile
# Nom du compilateur
CC = g++
# Options de compilation: optimisation, debug etc...
OPT = -O3
Linking =
INC = -I src/
EXE = Lab1
DIR_OBJ = ./obj
DIR_BIN = ./bin
OBJS = \
demo_example.o \
# Linking object files
exe : $(OBJS)
$(CC) -o $(EXE) \
$(OBJS) \
$(OPT) $(Linking)
# echo something
@echo " ***************** successful ***************** "
@echo " | Author: Luca Wei "
@echo " | Version: 0.0.1 "
# Defining the flags of objects
%.o: examples/%.cpp
@$(CC) $< $(OPT) $(INC) -c
# Removing object files
clean :
@/bin/rm -f *.dat
@/bin/rm -f *.x
@/bin/rm -f *.q
cleanall :
@/bin/rm -f $(OBJS) $(EXE)
@/bin/rm -f *.dat
@/bin/rm -f *.x
@/bin/rm -f *.q
config :
if [ ! -d obj ] ; then mkdir obj ; fi
if [ ! -d run ] ; then mkdir bin ; fi