Added SILC Thread Queue API
[silc.git] / lib / silcsim / 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 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         aes.o \
37         rsa.o \
38         twofish.o
39
40 #
41 # SILC Hash Functions to be compiled as modules
42 #
43 SIM_HASH_OBJS = \
44         md5.o \
45         sha1.o \
46         sha256.o
47
48 if SILC_SIM
49 all: $(SIM_CIPHER_OBJS) $(SIM_HASH_OBJS)
50 endif
51
52 if SILC_LIBTOOLFIX
53 LTFLAGS = --libtool-enable-shared
54 else
55 LTFLAGS =
56 endif
57
58 $(SIM_CIPHER_OBJS):
59         @if test '!' -f lib$*.la ; then \
60           $(LIBTOOL) --mode=link $(CCLD) -rpath $(silc_modulesdir) \
61                 ../silccrypt/$*.lo -o lib$*.la $(LTFLAGS); \
62           cd $(srcdir) && $(LN_S) -f $(srcdir)/.libs/lib$*.so \
63                 $(srcdir)/$*.sim.so; \
64         fi
65
66 $(SIM_HASH_OBJS):
67         @if test '!' -f lib$*.la ; then \
68           $(LIBTOOL) --mode=link $(CCLD) -rpath $(silc_modulesdir) \
69                 ../silccrypt/$*.lo -o lib$*.la $(LTFLAGS); \
70           cd $(srcdir) && $(LN_S) -f $(srcdir)/.libs/lib$*.so \
71                 $(srcdir)/$*.sim.so; \
72         fi
73
74 CLEANFILES = *.sim.so *.la
75
76 #ifdef SILC_DIST_TOOLKIT
77 include_HEADERS = silcsim.h silcsimutil.h
78 #endif SILC_DIST_TOOLKIT
79
80 EXTRA_DIST = *.h
81
82 #
83 # Installation
84 #
85 install-data-hook:
86         -mkdir -p $(modulesdir)
87         -$(INSTALL_DATA) $(top_srcdir)/lib/silcsim/*.so $(modulesdir)/
88
89 include $(top_srcdir)/Makefile.defines.in