-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (24 loc) · 827 Bytes
/
Makefile
File metadata and controls
38 lines (24 loc) · 827 Bytes
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
#################################################################
######################## MakeVars ###########################
#################################################################
#CXX=g++
CXX_OPT= -std=c++0x -I "./include" -Wall -Wextra -O2
LD_LIB=
LD_OPT=
MKDIR=mkdir -p ./obj
TARGET=read_dcd
SRC=$(wildcard ./src/*.cpp)
OBJ=$(patsubst ./src/%.cpp,./obj/%.o,$(SRC))
#################################################################
######################## Makefile ###########################
#################################################################
all:$(TARGET)
@echo "Compilation Success"
$(TARGET):Makefile
./obj/%.o:./src/%.cpp
@$(MKDIR)
$(CXX) $(CXX_OPT) -c $< -o $@
$(TARGET):$(OBJ)
$(CXX) $(CXX_OPT) $(LD_LIB) $(OBJ) -o $@ $(LD_OPT)
clean:
rm -f $(TARGET) ./obj/*.o