#
# Author: Pekka Riikonen <priikone@silcnet.org>
#
-# Copyright (C) 2000 - 2005 Pekka Riikonen
+# Copyright (C) 2000 - 2007 Pekka Riikonen
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
noinst_LTLIBRARIES = libsilccrypt.la
-libsilccrypt_la_SOURCES = \
- none.c \
- rc5.c \
- md5.c \
- aes.c \
- rsa.c \
- sha1.c \
- twofish.c \
- blowfish.c \
- cast.c \
- silccipher.c \
- silchash.c \
- silchmac.c \
- silcrng.c \
- silcpkcs.c \
- silcpkcs1.c
+if SILC_AES_ASM
+if SILC_I486
+SILC_AES_S = aes_x86.asm aes.c
+endif
+if SILC_X86_64
+SILC_AES_S = aes_x86_64.asm aes.c
+endif
+else
+SILC_AES_S = aes.c
+endif
+
+libsilccrypt_la_SOURCES = \
+ none.c \
+ md5.c \
+ $(SILC_AES_S) \
+ rsa.c \
+ sha1.c \
+ sha256.c \
+ twofish.c \
+ blowfish.c \
+ silccipher.c \
+ silchash.c \
+ silchmac.c \
+ silcrng.c \
+ silcpkcs.c \
+ silcpkcs1.c \
+ silcpk.c
if SILC_LIBTOOLFIX
# Tell libtool to compile silccrypt as shared since silcsim will need it.
LTFLAGS =
endif
-CFLAGS = $(LTFLAGS)
+CFLAGS = $(LTFLAGS) @SILC_CRYPTO_CFLAGS@
#ifdef SILC_DIST_TOOLKIT
-include_HEADERS = \
- aes.h \
- blowfish.h \
- cast.h \
- ciphers_def.h \
- ciphers.h \
- md5.h \
- none.h \
- rc5.h \
- rsa.h \
- sha1.h \
- silccipher.h \
- silcdh.h \
- silchash.h \
- silchmac.h \
- silcpkcs.h \
- silcrng.h \
- silcpkcs1.h \
- twofish.h
+include_HEADERS = \
+ silccipher.h \
+ silchash.h \
+ silchmac.h \
+ silcpkcs.h \
+ silcrng.h \
+ silcpkcs1.h \
+ silcpk.h
SILC_EXTRA_DIST = tests
#endif SILC_DIST_TOOLKIT
-EXTRA_DIST = *.h $(SILC_EXTRA_DIST)
+SUFFIXES = .asm
+
+.asm.lo:
+ $(LIBTOOL) --tag=CC --mode=compile @SILC_ASSEMBLER@ $<
+
+EXTRA_DIST = *.h *.asm $(SILC_EXTRA_DIST)
include $(top_srcdir)/Makefile.defines.in