-
Notifications
You must be signed in to change notification settings - Fork 2
/
makefile
37 lines (27 loc) · 1.15 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
# Makefile for posix and gcc
# Note on old compilers *cough* DoC *cough* you might need -std=c++0x instead
CPPFLAGS = -I include -Wall -std=c++11
LDFLAGS =
# -lm to bring in unix math library, -ltbb to bring in tbb
LDLIBS = -lm -ltbb
# Turn on optimisations
CPPFLAGS += -O2
# TODO : Indicate where you have put the TBB installer
TBB_DIR = <where-is-it?>
TBB_INC_DIR = $(TBB_DIR)/include
# TODO: Choose the correct librry for your build
TBB_LIB_DIR = $(TBB_DIR)/lib/intel64/gcc4.4
CPPFLAGS += -I $(TBB_INC_DIR)
LDFLAGS += -L $(TBB_LIB_DIR)
# The very basic parts
FOURIER_CORE_OBJS = src/fourier_transform.o src/fourier_transform_register_factories.o
# implementations
FOURIER_IMPLEMENTATION_OBJS = src/fast_fourier_transform.o src/direct_fourier_transform.o
FOURIER_OBJS = $(FOURIER_CORE_OBJS) $(FOURIER_IMPLEMENTATION_OBJS)
bin/test_fourier_transform : src/test_fourier_transform.cpp $(FOURIER_OBJS)
-mkdir -p bin
$(CXX) $(CPPFLAGS) $^ -o $@ $(LDFLAGS) $(LDLIBS)
bin/time_fourier_transform : src/time_fourier_transform.cpp $(FOURIER_OBJS)
-mkdir -p bin
$(CXX) $(CPPFLAGS) $^ -o $@ $(LDFLAGS) $(LDLIBS)
all : bin/test_fourier_transform bin/time_fourier_transform