-
Notifications
You must be signed in to change notification settings - Fork 4
/
makefile
86 lines (66 loc) · 2.14 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
############################################################
# Makefile for Benchmarking Skyline Algorithms #
# Darius Sidlauskas ([email protected]) #
# Sean Chester ([email protected]) #
# Copyright (c) 2014 Aarhus University #
############################################################
RM = rm -rf
MV = mv
CP = cp -rf
CC = g++
TARGET = $(OUT)/SkyBench
SRC = $(wildcard src/util/*.cpp) \
$(wildcard src/common/*.cpp) \
$(wildcard src/bskytree/*.cpp) \
$(wildcard src/pskyline/*.cpp) \
$(wildcard src/qflow/*.cpp) \
$(wildcard src/hybrid/*.cpp) \
$(wildcard src/*.cpp)
OBJ = $(addprefix $(OUT)/,$(notdir $(SRC:.cpp=.o)))
OUT = bin
LIB_DIR = # used as -L$(LIB_DIR)
INCLUDES = -I ./src/
LIB =
# Forces make to look these directories
VPATH = src:src/util:src/bskytree:src/pskyline:src/qflow:src/hybrid:src/common
DIMS=6
V=VERBOSE
DT=0
PROFILER=0
# By default compiling for performance (optimal)
CXXFLAGS = -O3 -m64 -DNDEBUG\
-DNUM_DIMS=$(DIMS) -D$(V) -DCOUNT_DT=$(DT) -DPROFILER=$(PROFILER)\
-Wno-deprecated -Wno-write-strings -nostdlib -Wpointer-arith \
-Wcast-qual -Wcast-align \
-std=c++0x -fopenmp -mavx
LDFLAGS=-m64 -lrt -fopenmp
# Target-specific Variable values:
# Compile for debugging (works with valgrind)
dbg : CXXFLAGS = -O0 -g3 -m64\
-DNUM_DIMS=$(DIMS) -DVERBOSE -DCOUNT_DT=0 -DPROFILER=1\
-Wno-deprecated -Wno-write-strings -nostdlib -Wpointer-arith \
-Wcast-qual -Wcast-align -std=c++0x
dbg : all
# All Target
all: $(TARGET)
# Tool invocations
$(TARGET): $(OUT) $(OBJ) $(LIB_DIR)$(LIB)
@echo 'Building target: $@ (GCC C++ Linker)'
$(CC) -o $(TARGET) $(OBJ) $(LDFLAGS)
@echo 'Finished building target: $@'
@echo ' '
$(OUT):
@echo 'Making output directory $@'
@mkdir -p $(OUT)
$(OUT)/%.o: %.cpp
@echo 'Building file: $< (GCC C++ Compiler)'
$(CC) $(CXXFLAGS) $(INCLUDES) -c -o"$@" "$<"
@echo 'Finished building: $<'
@echo ' '
clean:
-$(RM) $(OBJ) $(TARGET) $(addprefix $(OUT)/,$(notdir $(SRC:.cpp=.d)))
-@echo ' '
deepclean:
-$(RM) bin/*
-@echo ' '
.PHONY: all clean deepclean dbg tests