766ea169a1292a572f640aec8ea36d482a3e5345
[crypto.git] / lib / silccrypt / Makefile.ad
1 #
2 #  Makefile.ad
3 #
4 #  Author: Pekka Riikonen <priikone@silcnet.org>
5 #
6 #  Copyright (C) 2000 - 2006 Pekka Riikonen
7 #
8 #  This program is free software; you can redistribute it and/or modify
9 #  it under the terms of the GNU General Public License as published by
10 #  the Free Software Foundation; version 2 of the License.
11 #
12 #  This program is distributed in the hope that it will be useful,
13 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 #  GNU General Public License for more details.
16 #
17
18 AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
19
20 noinst_LTLIBRARIES = libsilccrypt.la
21
22 if SILC_AES_ASM
23 if SILC_I486
24 SILC_AES_S = aes_x86.asm aes.c
25 endif
26 if SILC_X86_64
27 SILC_AES_S = aes_x86_64.asm aes.c
28 endif
29 else
30 SILC_AES_S = aes.c
31 endif
32
33 libsilccrypt_la_SOURCES =       \
34         none.c                  \
35         rc5.c                   \
36         md5.c                   \
37         $(SILC_AES_S)           \
38         rsa.c                   \
39         sha1.c                  \
40         sha256.c                \
41         twofish.c               \
42         blowfish.c              \
43         cast.c                  \
44         silccipher.c            \
45         silchash.c              \
46         silchmac.c              \
47         silcrng.c               \
48         silcpkcs.c              \
49         silcpkcs1.c             \
50         silcpk.c
51
52 if SILC_LIBTOOLFIX
53 # Tell libtool to compile silccrypt as shared since silcsim will need it.
54 LTFLAGS = --libtool-enable-shared
55 else
56 LTFLAGS =
57 endif
58
59 CFLAGS = $(LTFLAGS) @SILC_CRYPTO_CFLAGS@
60
61 #ifdef SILC_DIST_TOOLKIT
62 include_HEADERS =               \
63         silccipher.h            \
64         silchash.h              \
65         silchmac.h              \
66         silcpkcs.h              \
67         silcrng.h               \
68         silcpkcs1.h             \
69         silcpk.h
70
71 SILC_EXTRA_DIST = tests
72 #endif SILC_DIST_TOOLKIT
73
74 SUFFIXES = .asm
75
76 .asm.lo:
77         $(LIBTOOL) --tag=CC --mode=compile @SILC_ASSEMBLER@ $<
78
79 EXTRA_DIST = *.h *.asm $(SILC_EXTRA_DIST)
80
81 include $(top_srcdir)/Makefile.defines.in
82
83 # Workaround a bug in GCC 2.x which causes memory exhaustion
84 # when compiling sha1 with optimizations on UltraSPARC.
85 #
86 @FIX_SHA1@sha1.lo:
87 @FIX_SHA1@      $(LTCOMPILE) -O0 -c -o $@ `test -f 'sha1.c' || echo '$(srcdir)/'`sha1.c
88 @FIX_SHA1@