forked from thegrandpoobah/voronoi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (26 loc) · 904 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
32
33
34
35
36
37
38
39
40
# make sure to uncomment the right OS before compiling
# TARGET_OS = macos
TARGET_OS = linux
# TARGET_OS = win
CXXFLAGS = -Wall -fpermissive -fopenmp -O2
LNKFLAGS = -fopenmp -O2
INCLUDES = -I./picopng -I./stippler -I./voronoi
LIBS = -lboost_program_options
OBJS = picopng/picopng.o stippler/bitmap.o stippler/stippler_api.o stippler/stippler.o stippler/VoronoiDiagramGenerator.o voronoi/parse_arguments.o voronoi/voronoi.o
VPATH = %.cpp
ifeq ($(TARGET_OS),macos)
# reset compiler, default compiler is clang now, which does not support OpenMP
CXX = g++
CXXFLAGS += -I/opt/local/include -I/opt/local/include/boost
LNKFLAGS += -L/opt/local/lib/
endif
all: voronoi_stippler
.SUFFIXES: .cpp .o
voronoi_stippler: $(OBJS)
$(CXX) $(LNKFLAGS) -o voronoi_stippler $(OBJS) $(LIBS)
clean:
rm -f $(OBJS)
cleanall: clean
rm -f voronoi_stippler
.cpp.o:
$(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@