AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
-noinst_LIBRARIES = libsilccrypt.a
+noinst_LTLIBRARIES = libsilccrypt.la
-libsilccrypt_a_SOURCES = \
+libsilccrypt_la_SOURCES = \
none.c \
rc5.c \
rc6.c \
- mars.c \
md5.c \
aes.c \
rsa.c \
sha1.c \
twofish.c \
blowfish.c \
+ cast.c \
silccipher.c \
silchash.c \
silchmac.c \
silcpkcs.c \
pkcs1.c
-EXTRA_DIST = *.h
+if SILC_LIBTOOLFIX
+# Tell libtool to compile silccrypt as shared since silcsim will need it.
+LTFLAGS = --libtool-enable-shared
+else
+LTFLAGS =
+endif
+
+CFLAGS = $(LTFLAGS)
+
+if SILC_DIST_TOOLKIT
+include_HEADERS = \
+ aes.h \
+ blowfish.h \
+ cast.h \
+ ciphers_def.h \
+ ciphers.h \
+ md5.h \
+ none.h \
+ pkcs1.h \
+ rc5.h \
+ rc6.h \
+ rsa.h \
+ sha1.h \
+ silccipher.h \
+ silcdh.h \
+ silchash.h \
+ silchmac.h \
+ silcpkcs.h \
+ silcrng.h \
+ twofish.h
+endif
+
+EXTRA_DIST = *.h tests
include $(top_srcdir)/Makefile.defines.in
+
+# Workaround a bug in GCC 2.x which causes memory exhaustion
+# when compiling sha1 with optimizations on UltraSPARC.
+#
+@FIX_SHA1@sha1.lo:
+@FIX_SHA1@ $(LTCOMPILE) -O0 -c -o $@ `test -f 'sha1.c' || echo '$(srcdir)/'`sha1.c
+@FIX_SHA1@