-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (33 loc) · 1.07 KB
/
Copy pathMakefile
File metadata and controls
43 lines (33 loc) · 1.07 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
# Makefile — plpgsql_wrap
#
# Build:
# make # key from wrap_key.h
# make WRAP_KEY_HEX=<64 hex chars> # compile-time key override
# make WRAP_KEY_HEX=$(openssl rand -hex 32) # random key, one-liner
#
# Install:
# sudo make install
#
# Tests:
# make installcheck
MODULE_big = plpgsql_wrap
OBJS = plpgsql_wrap.o
EXTENSION = plpgsql_wrap
DATA = $(wildcard updates/*--*.sql) $(wildcard sql/*.sql)
DOCS = README.md
TESTS = 01_basic 02_unwrap 03_replace 04_dump_restore
REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
REGRESS_OPTS = --inputdir=test
PG_CONFIG ?= pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
OSSL_CFLAGS := $(shell pkg-config --cflags openssl 2>/dev/null || echo "")
OSSL_LIBS := $(shell pkg-config --libs openssl 2>/dev/null || echo "-lssl -lcrypto")
PG_CFLAGS += $(OSSL_CFLAGS) -Wall -Wextra -Wno-unused-parameter
ifdef WRAP_KEY_HEX
PG_CFLAGS += -DWRAP_KEY_HEX='"$(WRAP_KEY_HEX)"'
endif
SHLIB_LINK += $(OSSL_LIBS)
include $(PGXS)
genkey:
@openssl rand -hex 32
.PHONY: genkey