-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
31 lines (23 loc) · 805 Bytes
/
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
EXECUTABLE = epsilon
INCLUDE = -Iinclude/
CXX = g++
# The OpenCL C++ wrapper isn't fully 1.2 yet
CXXFLAGS = -DCL_USE_DEPRECATED_OPENCL_1_1_APIS -Wno-cpp \
-O3 -std=c++11 -march=native \
-Wall -Wextra -pedantic -pipe \
# -DLOW_RES_TIMER # Low-resolution timer
HEADERS = $(shell find include/ -name '*.hpp')
OBJECTS = $(subst cpp,o,$(subst src/,obj/,$(shell find src/ -name '*.cpp')))
LDLIBS = -lOpenCL -lncurses
$(EXECUTABLE): $(OBJECTS)
@mkdir -p bin/
@$(CXX) $(OBJECTS) -o $(addprefix bin/, $(EXECUTABLE)) $(LDLIBS)
$(OBJECTS): obj/%.o : src/%.cpp $(HEADERS)
@mkdir -p $(@D)
@$(CXX) $(CXXFLAGS) $(INCLUDE) -c $< -o $@
document:
@doxygen > /dev/null
clean:
@rm -f $(addprefix bin/, $(EXECUTABLE))
@rm -f obj/ --recursive
@rm -f bin/ --recursive