2000-10-31 21:11:28 +08:00
|
|
|
#
|
2005-07-10 11:55:28 +08:00
|
|
|
# $PostgreSQL: pgsql/contrib/pgcrypto/Makefile,v 1.19 2005/07/10 03:55:28 momjian Exp $
|
2000-10-31 21:11:28 +08:00
|
|
|
#
|
|
|
|
|
2005-07-10 11:55:28 +08:00
|
|
|
INT_SRCS = md5.c sha1.c sha2.c internal.c blf.c rijndael.c \
|
|
|
|
fortuna.c random.c
|
2005-07-10 11:52:56 +08:00
|
|
|
INT_TESTS = sha2
|
/contrib/pgcrypto:
* remove support for encode() as it is in main tree now
* remove krb5.c
* new 'PX library' architecture
* remove BSD license from my code to let the general
PostgreSQL one to apply
* md5, sha1: ANSIfy, use const where appropriate
* various other formatting and clarity changes
* hmac()
* UN*X-like crypt() - system or internal crypt
* Internal crypt: DES, Extended DES, MD5, Blowfish
crypt-des.c, crypt-md5.c from FreeBSD
crypt-blowfish.c from Solar Designer
* gen_salt() for crypt() - Blowfish, MD5, DES, Extended DES
* encrypt(), decrypt(), encrypt_iv(), decrypt_iv()
* Cipher support in mhash.c, openssl.c
* internal: Blowfish, Rijndael-128 ciphers
* blf.[ch], rijndael.[ch] from OpenBSD
* there will be generated file rijndael-tbl.inc.
Marko Kreen
2001-08-21 08:42:41 +08:00
|
|
|
|
2005-07-06 07:13:57 +08:00
|
|
|
OSSL_SRCS = openssl.c
|
|
|
|
OSSL_TESTS = des 3des cast5
|
2001-09-23 12:12:44 +08:00
|
|
|
|
2005-07-06 07:13:57 +08:00
|
|
|
CF_SRCS = $(if $(subst no,,$(with_openssl)), $(OSSL_SRCS), $(INT_SRCS))
|
2005-07-10 11:52:56 +08:00
|
|
|
CF_TESTS = $(if $(subst no,,$(with_openssl)), $(OSSL_TESTS), $(INT_TESTS))
|
2005-07-10 11:55:28 +08:00
|
|
|
CF_CFLAGS =
|
2000-10-31 21:11:28 +08:00
|
|
|
|
2005-07-07 00:14:42 +08:00
|
|
|
PG_CPPFLAGS = $(CF_CFLAGS)
|
2000-10-31 21:11:28 +08:00
|
|
|
|
2005-07-10 11:55:28 +08:00
|
|
|
SRCS = pgcrypto.c px.c px-hmac.c px-crypt.c misc.c \
|
2005-07-06 07:13:57 +08:00
|
|
|
crypt-gensalt.c crypt-blowfish.c crypt-des.c \
|
|
|
|
crypt-md5.c $(CF_SRCS)
|
2000-10-31 21:11:28 +08:00
|
|
|
|
2004-08-21 04:13:10 +08:00
|
|
|
MODULE_big = pgcrypto
|
|
|
|
OBJS = $(SRCS:.c=.o)
|
|
|
|
DOCS = README.pgcrypto
|
|
|
|
DATA_built = pgcrypto.sql
|
|
|
|
EXTRA_CLEAN = gen-rtab
|
2000-10-31 21:11:28 +08:00
|
|
|
|
2004-08-21 04:13:10 +08:00
|
|
|
REGRESS = init md5 sha1 hmac-md5 hmac-sha1 blowfish rijndael \
|
2005-07-06 07:13:57 +08:00
|
|
|
$(CF_TESTS) \
|
|
|
|
crypt-des crypt-md5 crypt-blowfish crypt-xdes
|
2001-10-01 06:18:29 +08:00
|
|
|
|
2004-08-21 04:13:10 +08:00
|
|
|
|
|
|
|
ifdef USE_PGXS
|
|
|
|
PGXS = $(shell pg_config --pgxs)
|
|
|
|
include $(PGXS)
|
|
|
|
else
|
|
|
|
subdir = contrib/pgcrypto
|
|
|
|
top_builddir = ../..
|
|
|
|
include $(top_builddir)/src/Makefile.global
|
2001-09-29 11:11:58 +08:00
|
|
|
include $(top_srcdir)/contrib/contrib-global.mk
|
2004-08-21 04:13:10 +08:00
|
|
|
endif
|
|
|
|
|
2005-07-06 07:13:57 +08:00
|
|
|
# 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 -lcrypt -ldes -lcrypto -lssl, $(LIBS))
|
|
|
|
ifeq ($(PORTNAME), win32)
|
|
|
|
SHLIB_LINK += $(filter -leay32 -lssleay32, $(LIBS))
|
|
|
|
endif
|
|
|
|
|
2004-09-14 11:39:55 +08:00
|
|
|
# to make ws2_32.lib the last library (must occur after definition of PORTNAME)
|
|
|
|
ifeq ($(PORTNAME),win32)
|
|
|
|
SHLIB_LINK += -lwsock32 -lws2_32
|
|
|
|
endif
|
|
|
|
|
2000-10-31 21:11:28 +08:00
|
|
|
|
/contrib/pgcrypto:
* remove support for encode() as it is in main tree now
* remove krb5.c
* new 'PX library' architecture
* remove BSD license from my code to let the general
PostgreSQL one to apply
* md5, sha1: ANSIfy, use const where appropriate
* various other formatting and clarity changes
* hmac()
* UN*X-like crypt() - system or internal crypt
* Internal crypt: DES, Extended DES, MD5, Blowfish
crypt-des.c, crypt-md5.c from FreeBSD
crypt-blowfish.c from Solar Designer
* gen_salt() for crypt() - Blowfish, MD5, DES, Extended DES
* encrypt(), decrypt(), encrypt_iv(), decrypt_iv()
* Cipher support in mhash.c, openssl.c
* internal: Blowfish, Rijndael-128 ciphers
* blf.[ch], rijndael.[ch] from OpenBSD
* there will be generated file rijndael-tbl.inc.
Marko Kreen
2001-08-21 08:42:41 +08:00
|
|
|
rijndael.o: rijndael.tbl
|
|
|
|
|
2005-07-06 07:18:44 +08:00
|
|
|
rijndael.tbl:
|
/contrib/pgcrypto:
* remove support for encode() as it is in main tree now
* remove krb5.c
* new 'PX library' architecture
* remove BSD license from my code to let the general
PostgreSQL one to apply
* md5, sha1: ANSIfy, use const where appropriate
* various other formatting and clarity changes
* hmac()
* UN*X-like crypt() - system or internal crypt
* Internal crypt: DES, Extended DES, MD5, Blowfish
crypt-des.c, crypt-md5.c from FreeBSD
crypt-blowfish.c from Solar Designer
* gen_salt() for crypt() - Blowfish, MD5, DES, Extended DES
* encrypt(), decrypt(), encrypt_iv(), decrypt_iv()
* Cipher support in mhash.c, openssl.c
* internal: Blowfish, Rijndael-128 ciphers
* blf.[ch], rijndael.[ch] from OpenBSD
* there will be generated file rijndael-tbl.inc.
Marko Kreen
2001-08-21 08:42:41 +08:00
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -DPRINT_TABS rijndael.c -o gen-rtab
|
|
|
|
./gen-rtab > rijndael.tbl
|