updates
[silc.git] / lib / silcsim / Makefile.am
1 #
2 #  Makefile.am
3 #
4 #  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
5 #
6 #  Copyright (C) 2000 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; either version 2 of the License, or
11 #  (at your option) any later version.
12 #
13 #  This program is distributed in the hope that it will be useful,
14 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #  GNU General Public License for more details.
17 #
18
19 AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
20
21 if SILC_SIM
22 noinst_LIBRARIES = libsilcsim.a
23 else
24 noinst_LIBRARIES = 
25 endif
26
27 libsilcsim_a_SOURCES = \
28         silcsim.c \
29         silcsimutil.c
30
31 SIM_CFLAGS = -fPIC -shared
32
33 SIM_MODULES_DIR = modules
34
35 SUBDIRS = modules
36
37 #
38 # SILC Ciphers to be compiled as modules
39 #
40 SIM_CIPHER_OBJS = \
41         none.o \
42         blowfish.o \
43         rc5.o \
44         rc6.o \
45         mars.o \
46         aes.o \
47         rsa.o \
48         twofish.o
49
50 #
51 # SILC Hash Functions to be compiled as modules
52 #
53 SIM_HASH_OBJS = \
54         md5.o \
55         sha1.o
56
57 if SILC_SIM
58 all: $(SIM_CIPHER_OBJS) $(SIM_HASH_OBJS)
59 endif
60
61 $(SIM_CIPHER_OBJS): ../silccrypt/libsilccrypt.a
62         rm -rf $*.c $*.o
63         $(LN_S) $(srcdir)/../silccrypt/$*.c $*.c
64         $(COMPILE) $(SIM_CFLAGS) $*.c -o $(SIM_MODULES_DIR)/$*.sim.so
65         $(LN_S) $(srcdir)/$(SIM_MODULES_DIR)/$*.sim.so $*.o
66         rm -rf $*.c
67
68 $(SIM_HASH_OBJS): ../silccrypt/libsilccrypt.a
69         rm -rf $*.c $*.o
70         $(LN_S) $(srcdir)/../silccrypt/$*.c $*.c
71         $(COMPILE) $(SIM_CFLAGS) $*.c -o $(SIM_MODULES_DIR)/$*.sim.so
72         $(LN_S) $(srcdir)/$(SIM_MODULES_DIR)/$*.sim.so $*.o
73         rm -rf $*.c
74
75 CLEANFILES = $(SIM_MODULES_DIR)/*.sim.so
76
77 EXTRA_DIST = *.h
78
79 include $(top_srcdir)/Makefile.defines.in