summaryrefslogtreecommitdiffstats
path: root/contrib/pgcrypto/Makefile
blob: 7fb59f51b729f53aaf05c2f182b8288794eb85d3 (plain)
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
# contrib/pgcrypto/Makefile

ZLIB_TST = pgp-compression
ZLIB_OFF_TST = pgp-zlib-DISABLED

CF_PGP_TESTS = $(if $(subst no,,$(with_zlib)), $(ZLIB_TST), $(ZLIB_OFF_TST))

OBJS = \
	$(WIN32RES) \
	crypt-blowfish.o \
	crypt-des.o \
	crypt-gensalt.o \
	crypt-md5.o \
	mbuf.o \
	openssl.o \
	pgcrypto.o \
	pgp-armor.o \
	pgp-cfb.o \
	pgp-compress.o \
	pgp-decrypt.o \
	pgp-encrypt.o \
	pgp-info.o \
	pgp-mpi.o \
	pgp-mpi-openssl.o \
	pgp-pgsql.o \
	pgp-pubdec.o \
	pgp-pubenc.o \
	pgp-pubkey.o \
	pgp-s2k.o \
	pgp.o \
	px-crypt.o \
	px-hmac.o \
	px.o

MODULE_big	= pgcrypto

EXTENSION = pgcrypto
DATA = pgcrypto--1.3.sql pgcrypto--1.2--1.3.sql pgcrypto--1.1--1.2.sql \
	pgcrypto--1.0--1.1.sql
PGFILEDESC = "pgcrypto - cryptographic functions"

REGRESS = init md5 sha1 hmac-md5 hmac-sha1 blowfish rijndael \
	sha2 des 3des cast5 \
	crypt-des crypt-md5 crypt-blowfish crypt-xdes \
	pgp-armor pgp-decrypt pgp-encrypt $(CF_PGP_TESTS) \
	pgp-pubkey-decrypt pgp-pubkey-encrypt pgp-info

EXTRA_CLEAN = gen-rtab

ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/pgcrypto
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif

# Add libraries that pgcrypto depends (or might depend) on into the
# shared library link.  (The order in which you list them here doesn't
# matter.)
SHLIB_LINK += $(filter -lcrypto -lz, $(LIBS))
ifeq ($(PORTNAME), win32)
SHLIB_LINK += $(filter -leay32, $(LIBS))
# those must be at the end
SHLIB_LINK += -lws2_32
endif