-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
60 lines (44 loc) · 1.24 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
SHELL=/bin/bash
CC = g++
SRCDIR := src
BUILDDIR := build
TARGET := bin
CPPFLAGS = -std=c++11
CPPFLAGS += -W -Wall
CPPFLAGS += -O3
CPPFLAGS += -I include
CPPFLAGS += -Wno-unused-parameter
CPPFLAGS += -Wno-deprecated-declarations
CPPFLAGS += -Wno-deprecated-declarations
CPPFLAGS += -Wno-ignored-qualifiers
CPPFLAGS += -Wno-unused-command-line-argument
CPPFLAGS += -Wno-inconsistent-missing-override
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
CPPFLAGS += -lOpenCL
endif
ifeq ($(UNAME_S),Darwin)
CPPFLAGS += -framework OpenCL
endif
LDLIBS = -ltbb
LDLIBS +=-lboost_timer
LDLIBS +=-lboost_system
SRCEXT := cpp
SUBDIRS := $(wildcard */)
SOURCES := src/optionPricer.cpp src/pricerRegistrar.cpp
SOURCES+= $(wildcard $(SRCDIR)/**/*.cpp)
SOURCES:=$(SOURCES:$(SRCDIR)/%=%)
#$(info SOURCES found: $(SOURCES))
OBJECTS=$(patsubst %, build/%, ${SOURCES:.cpp=.o})
EXECUTABLES=simplisticTest specificSimulation
all: $(EXECUTABLES)
$(EXECUTABLES): $(OBJECTS)
@mkdir -p $(TARGET)
$(CC) $(CPPFLAGS) $(LDLIBS) $(OBJECTS) -o $(TARGET)/$@ $(SRCDIR)/$@.$(SRCEXT)
$(BUILDDIR)/%.o: $(SRCDIR)/%.$(SRCEXT)
@mkdir -p $(BUILDDIR)
@mkdir -p $(BUILDDIR)/engines
$(CC) $(CPPFLAGS) -c -o $@ $<
clean:
@echo "Cleaning...";
rm -f $(OBJECTS) $(TARGET)/*