Merged silc_1_0_branch to trunk.
[silc.git] / lib / silcsim / Makefile.ad
1 #
2 #  Makefile.ad
3 #
4 #  Author: Pekka Riikonen <priikone@silcnet.org>
5 #
6 #  Copyright (C) 2000 - 2005 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 if SILC_SIM
21 noinst_LTLIBRARIES = libsilcsim.la
22 else
23 noinst_LTLIBRARIES = 
24 endif
25
26 libsilcsim_la_SOURCES = \
27         silcsim.c \
28         silcsimutil.c
29
30 #
31 # SILC Ciphers to be compiled as modules
32 #
33 SIM_CIPHER_OBJS = \
34         none.o \
35         blowfish.o \
36         rc5.o \
37         aes.o \
38         rsa.o \
39         twofish.o \
40         cast.o
41
42 #
43 # SILC Hash Functions to be compiled as modules
44 #
45 SIM_HASH_OBJS = \
46         md5.o \
47         sha1.o
48
49 if SILC_SIM
50 all: $(SIM_CIPHER_OBJS) $(SIM_HASH_OBJS)
51 endif
52
53 if SILC_LIBTOOLFIX
54 LTFLAGS = --libtool-enable-shared
55 else
56 LTFLAGS =
57 endif
58
59 $(SIM_CIPHER_OBJS):
60         @if test '!' -f lib$*.la ; then \
61           $(LIBTOOL) --mode=link $(CCLD) -rpath $(silc_modulesdir) \
62                 ../silccrypt/$*.lo -o lib$*.la $(LTFLAGS); \
63           cd $(srcdir) && $(LN_S) -f $(srcdir)/.libs/lib$*.so \
64                 $(srcdir)/$*.sim.so; \
65         fi
66
67 $(SIM_HASH_OBJS):
68         @if test '!' -f lib$*.la ; then \
69           $(LIBTOOL) --mode=link $(CCLD) -rpath $(silc_modulesdir) \
70                 ../silccrypt/$*.lo -o lib$*.la $(LTFLAGS); \
71           cd $(srcdir) && $(LN_S) -f $(srcdir)/.libs/lib$*.so \
72                 $(srcdir)/$*.sim.so; \
73         fi
74
75 CLEANFILES = *.sim.so *.la
76
77 #ifdef SILC_DIST_TOOLKIT
78 include_HEADERS = silcsim.h silcsimutil.h
79 #endif SILC_DIST_TOOLKIT
80
81 EXTRA_DIST = *.h
82
83 include $(top_srcdir)/Makefile.defines.in