Merged silc_1_1_branch to trunk.
[silc.git] / lib / silccrypt / Makefile.ad
1 #
2 #  Makefile.ad
3 #
4 #  Author: Pekka Riikonen <priikone@silcnet.org>
5 #
6 #  Copyright (C) 2000 - 2007 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         md5.c                   \
36         $(SILC_AES_S)           \
37         rsa.c                   \
38         sha1.c                  \
39         sha256.c                \
40         twofish.c               \
41         blowfish.c              \
42         silccipher.c            \
43         silchash.c              \
44         silchmac.c              \
45         silcrng.c               \
46         silcpkcs.c              \
47         silcpkcs1.c             \
48         silcpk.c
49
50 if SILC_LIBTOOLFIX
51 # Tell libtool to compile silccrypt as shared since silcsim will need it.
52 LTFLAGS = --libtool-enable-shared
53 else
54 LTFLAGS =
55 endif
56
57 CFLAGS = $(LTFLAGS) @SILC_CRYPTO_CFLAGS@
58
59 #ifdef SILC_DIST_TOOLKIT
60 include_HEADERS =               \
61         silccipher.h            \
62         silchash.h              \
63         silchmac.h              \
64         silcpkcs.h              \
65         silcrng.h               \
66         silcpkcs1.h             \
67         silcpk.h
68
69 SILC_EXTRA_DIST = tests
70 #endif SILC_DIST_TOOLKIT
71
72 SUFFIXES = .asm
73
74 .asm.lo:
75         $(LIBTOOL) --tag=CC --mode=compile @SILC_ASSEMBLER@ $<
76
77 EXTRA_DIST = *.h *.asm $(SILC_EXTRA_DIST)
78
79 include $(top_srcdir)/Makefile.defines.in
80
81 # Workaround a bug in GCC 2.x which causes memory exhaustion
82 # when compiling sha1 with optimizations on UltraSPARC.
83 #
84 @FIX_SHA1@sha1.lo:
85 @FIX_SHA1@      $(LTCOMPILE) -O0 -c -o $@ `test -f 'sha1.c' || echo '$(srcdir)/'`sha1.c
86 @FIX_SHA1@