-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (32 loc) · 1.2 KB
/
Copy pathMakefile
File metadata and controls
39 lines (32 loc) · 1.2 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
CXX = g++
CXXFLAGS = -std=c++17 -g -Iinclude -I/opt/homebrew/opt/openssl@3/include
ifeq ($(OS),Windows_NT)
OPENSSL_DIR = /usr/include/openssl
INCLUDES = -I$(OPENSSL_DIR)
LDFLAGS = -L/usr/lib -L"$(shell pwd)/index/stemmer/utf8proc"
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
# macOS specific settings
OPENSSL_DIR = /opt/homebrew/opt/openssl@3
INCLUDES = -I$(OPENSSL_DIR)/include
LDFLAGS = -L$(OPENSSL_DIR)/lib -L"$(shell pwd)/index/stemmer/utf8proc"
RPATH_FLAG = -Wl,-rpath,"@executable_path/index/stemmer/utf8proc"
else
# Linux specific settings
OPENSSL_DIR = /usr/include/openssl
INCLUDES = -I$(OPENSSL_DIR)
LDFLAGS = -L/usr/lib -L"$(shell pwd)/index/stemmer/utf8proc"
RPATH_FLAG = -Wl,-rpath,"$(shell pwd)/index/stemmer/utf8proc"
endif
endif
SRC_FILES := $(shell find ./ ! -name "rank.cpp" ! -name "test.cpp" ! -name "constructDataset.cpp" ! -name "indexserver.cpp" ! -name "server.cpp" ! -name "testQueryCompiler.cpp" -name "*.cpp")
all: search
search: $(SRC_FILES)
$(CXX) $(CXXFLAGS) $(INCLUDES) $^ $(LDFLAGS) $(RPATH_FLAG) -lutf8proc -lssl -lcrypto -lz -o search -g
ifeq ($(UNAME_S),Darwin)
endif
.PHONY: clean
clean:
rm -f search
find ./log/chunks -size 0 -delete