-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (32 loc) · 747 Bytes
/
Makefile
File metadata and controls
34 lines (32 loc) · 747 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
CXX=icpc
BIN_PATH=/media/qianrui/work/LQR/code/bin
TEST=OFF
#-----------------------------------------------
OBJ=obj/main.o\
obj/convert.o\
obj/function.o\
obj/mdpara.o\
obj/molecule.o\
obj/elements.o\
obj/conductivity.o\
obj/chemical_potential.o\
obj/capacity.o\
obj/tool.o
ifeq ($(TEST), ON)
OPTION += -fsanitize=address -fno-omit-frame-pointer
CXX = g++
else
OPTION += -D__COLOR -O3
endif
tool.exe:$(OBJ)
$(CXX) $(OPTION) -o tool.exe $(OBJ)
install:
@$(MAKE) tool.exe
@if [ $(TEST) == OFF ]; then cp tool.exe $(BIN_PATH); fi
@if [ $(TEST) == ON ]; then cd test;./Autotest.sh ;cd ..; fi
obj/%.o:%.cpp
@mkdir -p obj
$(CXX) $(OPTION) -c $< -o $@
clean:
@ rm -rf obj
@ if [ ! -d tool.exe ]; then rm -rf tool.exe; fi