EXTRA_PROGRAMS=example1 example2 example3 example4

example1_SOURCES=example1.c loadkeys.c
example1_LDFLAGS=-L$(top_builddir)/crypto
example1_LDADD=-lcrypto
example1_DEPENDENCIES=$(top_builddir)/crypto/libcrypto.a

example2_SOURCES=example2.c loadkeys.c
example2_LDFLAGS=-L$(top_builddir)/crypto
example2_LDADD=-lcrypto
example2_DEPENDENCIES=$(top_builddir)/crypto/libcrypto.a

example3_SOURCES=example3.c
example3_LDFLAGS=-L$(top_builddir)/crypto
example3_LDADD=-lcrypto
example3_DEPENDENCIES=$(top_builddir)/crypto/libcrypto.a

example4_SOURCES=example4.c
example4_LDFLAGS=-L$(top_builddir)/crypto
example4_LDADD=-lcrypto
example4_DEPENDENCIES=$(top_builddir)/crypto/libcrypto.a

EXTRA_DIST=Makefile.std README cert.pem loadkeys.h privkey.pem

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