56de2636d99fdac10e1d7a6e40cdf1e49b7bb9b0
[silc.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_84.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         aes.h                   \
64         blowfish.h              \
65         cast.h                  \
66         ciphers_def.h           \
67         ciphers.h               \
68         md5.h                   \
69         none.h                  \
70         rc5.h                   \
71         rsa.h                   \
72         sha1.h                  \
73         sha1_internal.h         \
74         sha256.h                \
75         sha256_internal.h       \
76         silccipher.h            \
77         silcdh.h                \
78         silchash.h              \
79         silchmac.h              \
80         silcpkcs.h              \
81         silcrng.h               \
82         silcpkcs1.h             \
83         twofish.h               \
84         silcpk.h
85
86 SILC_EXTRA_DIST = tests
87 #endif SILC_DIST_TOOLKIT
88
89 SUFFIXES = .asm
90
91 .asm.lo:
92         $(LIBTOOL) --tag=CC --mode=compile @SILC_ASSEMBLER@ $<
93
94 EXTRA_DIST = *.h *.asm $(SILC_EXTRA_DIST)
95
96 include $(top_srcdir)/Makefile.defines.in
97
98 # Workaround a bug in GCC 2.x which causes memory exhaustion
99 # when compiling sha1 with optimizations on UltraSPARC.
100 #
101 @FIX_SHA1@sha1.lo:
102 @FIX_SHA1@      $(LTCOMPILE) -O0 -c -o $@ `test -f 'sha1.c' || echo '$(srcdir)/'`sha1.c
103 @FIX_SHA1@