-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (26 loc) · 850 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
.PHONY: lintcheck
SRCS = src/text.cpp
OBJS = $(subst .cpp,.o, $(SRCS))
MODULE_big = stringtheory
PG_CXXFLAGS = -O3 -std=c++17 -I src/sse
UNAME_S := $(shell uname -m)
ifeq ($(UNAME_S),arm64)
PG_CXXFLAGS += -stdlib=libc++ -DHAVE_NEON_INSTRUCTIONS=1
endif
ifeq ($(UNAME_S),aarch64)
PG_CPPFLAGS += -DHAVE_NEON_INSTRUCTIONS=1
endif
ifeq ($(UNAME_S),x86_64)
SHLIB_LINK += -lrt -std=c++17 -msse4.2
PG_CXXFLAGS += -msse4.2
endif
EXTENSION = stringtheory
DATA = stringtheory--1.0.2.sql
PGFILEDESC = "stringtheory - tools for testing equality"
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
REGRESS = equality strstr memory
COMPILE.cxx.bc = $(CLANG) -xc++ $(BITCODE_CXXFLAGS) $(PG_CXXFLAGS) $(CPPFLAGS) -emit-llvm -c
include $(PGXS)
lintcheck:
clang-tidy $(SRCS) -- -I$(INCLUDEDIR) -I$(INCLUDEDIR_SERVER) -I$(PWD)/include -std=c++17