-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (37 loc) · 1.5 KB
/
Copy pathMakefile
File metadata and controls
50 lines (37 loc) · 1.5 KB
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
#============================================================
#
# Makefile to compile this code
#
#============================================================
# Use bash since sh on datastar does not recognize ">&" used in dep: target
SHELL = /bin/bash
# Now let us add all code files
CPARAMS = define.h
CCLASSES = Classes/cellclass.h Classes/fluxclass.h Classes/internomials.h Classes/Splineclass.h
CPHYSICS = Physics/gasPhysics.cpp Physics/thermodynamics.cpp Physics/hydrodynamics.cpp
CSCHEMES = Schemes/timeEvolution.cpp Schemes/boundaries.cpp
CAMR = Schemes/AMR_aux.cpp Schemes/AMR_main.cpp
CIO = IO/read_input.cpp IO/set_ambient.cpp IO/writeFile.cpp
COTHER = IO/ConversorString.cpp Schemes/interpolations.cpp Schemes/refinement_criteria.cpp
CALL = $(CPARAMS) $(CCLASSES) $(CPHYSICS) $(CSCHEMES) $(CAMR) $(CIO) $(COTHER)
#-----------------------------------------------------------------------
# add C++ standard used
#-----------------------------------------------------------------------
LDFLAGS += -std=c++11
CXXFLAGS += -std=c++11
#=======================================================================
# Now the compilation
main: $(CALL) main.o
@echo "Compiling..."
-@$(CXX) -std=c++11 -fPIC $(LDFLAGS) -o main.exe main.o $(LIBS) $(GRACKLE_LIB)
@echo "Done!"
remove:
@echo "Removing text files..."
-@rm *.txt
@echo "Done!"
clean:
@echo "Removing all .o and .exe"
-@rm *.o *.exe *.txt
@echo "Done!"
# That's all
#=======================================================================