-
Notifications
You must be signed in to change notification settings - Fork 7
/
makefile
41 lines (30 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
# 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 -lrt
# Turn on optimisations
CPPFLAGS += -O2
# TODO : Where are the TBB headers?
TBB_INC_DIR ?= /usr/local/include
# TODO: Where are the TBB compile time libraries?
# e.g. libtbb.so, tbb.lib, or tbb.dll.a
TBB_LIB_DIR ?= /usr/local/lib
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_tbb : src/test_tbb.cpp
-mkdir -p bin
$(CXX) $(CPPFLAGS) $^ -o $@ $(LDFLAGS) $(LDLIBS)
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