noinst_LIBRARIES=libdh.a
TESTS=dhtest
EXTRA_PROGRAMS=dhtest p1024 p192 p512
INCLUDES=-I$(top_srcdir)/crypto

libdh_a_SOURCES=dh_check.c dh_err.c dh_gen.c dh_key.c dh_lib.c

dhtest_SOURCES=dhtest.c
dhtest_LDFLAGS=-L$(top_builddir)/crypto
dhtest_LDADD=-lcrypto
dhtest_DEPENDENCIES=$(top_builddir)/crypto/libcrypto.a

p1024_SOURCES=p1024.c
p1024_LDFLAGS=-L$(top_builddir)/crypto
p1024_LDADD=-lcrypto
p1024_DEPENDENCIES=$(top_builddir)/crypto/libcrypto.a

p192_SOURCES=p192.c
p192_LDFLAGS=-L$(top_builddir)/crypto
p192_LDADD=-lcrypto
p192_DEPENDENCIES=$(top_builddir)/crypto/libcrypto.a

p512_SOURCES=p512.c
p512_LDFLAGS=-L$(top_builddir)/crypto
p512_LDADD=-lcrypto
p512_DEPENDENCIES=$(top_builddir)/crypto/libcrypto.a

EXTRA_DIST=Makefile.ssl dh.err dh.h dh1024.pem dh192.pem dh2048.pem \
	dh4096.pem dh512.pem example generate

errors dh_err.c dh.h: dh.err
	perl $(top_srcdir)/util/err-ins.pl dh.err dh.h
	perl $(top_srcdir)/crypto/err/err_genc.pl dh.h dh_err.c

$(top_builddir)/crypto/libcrypto.a:
	cd $(top_builddir)/crypto; $(MAKE) $(MFLAGS) libcrypto.a
