-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (46 loc) · 1.48 KB
/
Makefile
File metadata and controls
68 lines (46 loc) · 1.48 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# ENTER THE PACS (pacs-examples) DIRECTORY:
PACS-EXAMPLES_DIR=/home/p2/PACS/
include $(PACS-EXAMPLES_DIR)pacs-examples/Examples/Makefile.inc
-include Makefile.inc
# get all files *.cpp
SRCS=$(wildcard *.cpp)
# get the corresponding object file
OBJS = $(SRCS:.cpp=.o)
# get all headers in the working directory
HEADERS=$(wildcard *.hpp)
#
exe_sources=$(filter main%.cpp,$(SRCS))
EXEC=$(exe_sources:.cpp=)
CXXFLAGS+=-fPIC
LDFLAGS= $(OPTFLAGS) -Wl,-rpath,.
LDLIBS=-L. -lFactory -ldl
PLUGINDIR = ./SolverPlugins
#========================== ORA LA DEFINIZIONE DEGLI OBIETTIVI
.phony= all clean distclean doc
.DEFAULT_GOAL = all
all: $(DEPEND) library $(EXEC)
library: libFactory.so libSecant.so libBisection.so libBroyden.so
libFactory.so: FactoryTraits.o
$(CXX) $(OPTFLAGS) -shared FactoryTraits.o -o libFactory.so
libSecant.so: SecantPlugin.o
$(CXX) $(OPTFLAGS) -shared SecantPlugin.o -L. -lFactory -o libSecant.so
libBisection.so: BisectionPlugin.o
$(CXX) $(OPTFLAGS) -shared BisectionPlugin.o -L. -lFactory -o libBisection.so
libBroyden.so: BroydenPlugin.o
$(CXX) $(OPTFLAGS) -shared BroydenPlugin.o -L. -lFactory -o libBroyden.so
clean:
$(RM) -f $(EXEC) $(OBJS)
distclean:
$(MAKE) clean
$(RM) -f ./doc $(DEPEND)
$(RM) *.out *.bak *~ *.so
doc:
doxygen $(DOXYFILE)
$(EXEC): main.o LoadSolverFactory.o FunctionRtoR.o SolverBase.o
$(OBJS): $(SRCS)
$(DEPEND): $(SRCS)
$(RM) $(DEPEND)
for f in $(SRCS); do \
$(CXX) $(STDFLAGS) $(CPPFLAGS) -MM $$f >> $(DEPEND); \
done
-include $(DEPEND)