-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
77 lines (52 loc) · 1.72 KB
/
Makefile
File metadata and controls
77 lines (52 loc) · 1.72 KB
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
# -*- Makefile -*-
# (C) Eugene Skepner 2016
# submodules and git: https://git-scm.com/book/en/v2/Git-Tools-Submodules
# ----------------------------------------------------------------------
MAKEFLAGS = -w
# ----------------------------------------------------------------------
CLANG = $(shell if g++ --version 2>&1 | grep -i llvm >/dev/null; then echo Y; else echo N; fi)
ifeq ($(CLANG),Y)
WEVERYTHING = -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-padded
WARNINGS = # -Wno-weak-vtables # -Wno-padded
STD = c++14
else
WEVERYTHING = -Wall -Wextra
WARNINGS =
STD = c++14
endif
# OPTIMIZATION = -O3
CXXFLAGS = -MMD -g $(OPTIMIZATION) -fPIC -std=$(STD) $(WEVERYTHING) $(WARNINGS) -Iaxe/include
LDFLAGS =
TEST_LDLIBS = # -L/usr/local/lib -lprofiler
# ----------------------------------------------------------------------
BUILD = build
DIST = dist
all: test-float
-include $(BUILD)/*.d
# ----------------------------------------------------------------------
test-small: $(DIST)/test-small
time $^
test-many-big-elements: $(DIST)/test-many-big-elements
time $^
test-partial-array-output: $(DIST)/test-partial-array-output
time $^
test-nan: $(DIST)/test-nan
time $^
test-float: $(DIST)/test-float
time $^
$(DIST)/%: $(BUILD)/%.o | $(DIST)
g++ $(LDFLAGS) -o $@ $^ $(TEST_LDLIBS)
clean:
rm -rf $(DIST) $(BUILD)/*.o $(BUILD)/*.d
distclean: clean
rm -rf $(BUILD)
# ----------------------------------------------------------------------
$(BUILD)/%.o: %.cc | $(BUILD)
@#echo $<
g++ $(CXXFLAGS) -c -o $@ $<
# ----------------------------------------------------------------------
$(DIST):
mkdir -p $(DIST)
$(BUILD):
mkdir -p $(BUILD)
# ======================================================================