-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
executable file
·38 lines (29 loc) · 755 Bytes
/
makefile
File metadata and controls
executable file
·38 lines (29 loc) · 755 Bytes
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
OS := $(shell uname)
ifeq ($(OS),Darwin)
CC = /usr/local/bin/g++-9
CFLAGS = -O3 -mavx -std=c++14 -w -march=native -D $(distFunc)
LDFLAGS =
else
CC = g++
CFLAGS = -O3 -mavx -std=c++14 -w -march=native -D $(distFunc)
LDFLAGS =
endif
ifeq ($(distFunc), L2)
SOURCES = tree/AVtree.cpp
else
SOURCES = tree/AVtreeString.cpp
endif
OBJECTS = $(SOURCES:.cpp=.o)
all: main_range main_knn
main_knn: $(OBJECTS)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) main_knn.cpp -o knn $(LDADD)
main_range: $(OBJECTS)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) main_range.cpp -o range $(LDADD)
.cpp.o:
$(CC) $(CFLAGS) -c $< -o $@
.cc.o:
$(CC) $(CFLAGS) -c $< -o $@
clean:
@rm -rf tree/*.o
@rm -rf knn
@rm -rf range