Change ALTER TABLE SET WITHOUT OIDS to rewrite the whole table to physically
[PostgreSQL.git] / contrib / pgcrypto / Makefile
blob1922152afdbfe79df123e25b42cad20205cc84b8
2 # $PostgreSQL$
5 INT_SRCS = md5.c sha1.c sha2.c internal.c internal-sha2.c blf.c rijndael.c \
6 fortuna.c random.c pgp-mpi-internal.c imath.c
7 INT_TESTS = sha2
9 OSSL_SRCS = openssl.c pgp-mpi-openssl.c
10 OSSL_TESTS = sha2 des 3des cast5
12 ZLIB_TST = pgp-compression
13 ZLIB_OFF_TST = pgp-zlib-DISABLED
15 CF_SRCS = $(if $(subst no,,$(with_openssl)), $(OSSL_SRCS), $(INT_SRCS))
16 CF_TESTS = $(if $(subst no,,$(with_openssl)), $(OSSL_TESTS), $(INT_TESTS))
17 CF_PGP_TESTS = $(if $(subst no,,$(with_zlib)), $(ZLIB_TST), $(ZLIB_OFF_TST))
19 SRCS = pgcrypto.c px.c px-hmac.c px-crypt.c \
20 crypt-gensalt.c crypt-blowfish.c crypt-des.c \
21 crypt-md5.c $(CF_SRCS) \
22 mbuf.c pgp.c pgp-armor.c pgp-cfb.c pgp-compress.c \
23 pgp-decrypt.c pgp-encrypt.c pgp-info.c pgp-mpi.c \
24 pgp-pubdec.c pgp-pubenc.c pgp-pubkey.c pgp-s2k.c \
25 pgp-pgsql.c
27 MODULE_big = pgcrypto
28 OBJS = $(SRCS:.c=.o)
29 DATA_built = pgcrypto.sql
30 DATA = uninstall_pgcrypto.sql
31 EXTRA_CLEAN = gen-rtab
33 REGRESS = init md5 sha1 hmac-md5 hmac-sha1 blowfish rijndael \
34 $(CF_TESTS) \
35 crypt-des crypt-md5 crypt-blowfish crypt-xdes \
36 pgp-armor pgp-decrypt pgp-encrypt $(CF_PGP_TESTS) \
37 pgp-pubkey-decrypt pgp-pubkey-encrypt pgp-info
40 ifdef USE_PGXS
41 PG_CONFIG = pg_config
42 PGXS := $(shell $(PG_CONFIG) --pgxs)
43 include $(PGXS)
44 else
45 subdir = contrib/pgcrypto
46 top_builddir = ../..
47 include $(top_builddir)/src/Makefile.global
48 include $(top_srcdir)/contrib/contrib-global.mk
49 endif
51 # Add libraries that pgcrypto depends (or might depend) on into the
52 # shared library link. (The order in which you list them here doesn't
53 # matter.)
54 SHLIB_LINK += $(filter -lcrypto -lz, $(LIBS))
55 ifeq ($(PORTNAME), win32)
56 SHLIB_LINK += $(filter -leay32, $(LIBS))
57 # those must be at the end
58 SHLIB_LINK += -lwsock32 -lws2_32
59 endif
61 rijndael.o: rijndael.tbl
63 rijndael.tbl:
64 $(CC) $(CPPFLAGS) $(CFLAGS) -DPRINT_TABS rijndael.c -o gen-rtab
65 ./gen-rtab > rijndael.tbl