-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
39 lines (27 loc) · 1.03 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
# The location of your CXSC directory
# THIS NEEDS TO BE CHANGED TO MATCH YOUR SYSTEM
CXSCDIR=/home/urathai/cxsc
LINK_TARGETS = build/generateZeros build/integrate build/bisection
OBJS = build/generateZeros.o build/integrate.o build/bisection.o build/citaylor.o \
build/function.o
REBUILDABLES = $(OBJS) $(LINK_TARGETS)
# Optional flags to give to the C++ compiler
CXXOPTS=-O3 -fopenmp
# Additional include path
CXSCINC=-I$(CXSCDIR)/include -L$(CXSCDIR)/lib
# Flags to give to the C++ compiler
CXSCFLAGS=$(CXXOPTS) $(CXSCINC)
RPATH=-Wl,-R$(CXSCDIR)/lib
all: $(LINK_TARGETS)
clean:
rm -f $(REBUILDABLES)
build/generateZeros: build/generateZeros.o build/citaylor.o build/function.o
g++ -o $@ $(CXSCFLAGS) $(RPATH) $^ -lcxsc
build/integrate: build/integrate.o build/citaylor.o build/function.o
g++ -o $@ $(CXSCFLAGS) $(RPATH) $^ -lcxsc
build/bisection: build/bisection.o build/citaylor.o build/function.o
g++ -o $@ $(CXSCFLAGS) $(RPATH) $^ -lcxsc
build/%.o: src/%.cpp | build
g++ -o $@ $(CXSCFLAGS) $(RPATH) -c $< -lcxsc
build:
mkdir build