SILC Crypto Toolkit 1.2 Beta1
[crypto.git] / lib / Makefile.ad
1 #
2 #  Makefile.am
3 #
4 #  Author: Pekka Riikonen <priikone@silcnet.org>
5 #
6 #  Copyright (C) 2000 - 2008 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 # Library dirs
21 CRYPTO_DIRS =           \
22         silccrypt       \
23         silcskr         \
24         silcmath        \
25         silcasn1        \
26         silcacc         \
27 #ifdef SILC_DIST_SSH
28         silcssh         \
29 #endif SILC_DIST_SSH
30 #ifdef SILC_DIST_PGP
31         silcpgp         \
32 #endif SILC_DIST_PGP
33 #ifdef SILC_DIST_PKIX
34         silcpkix
35 #endif SILC_DIST_PKIX
36
37 if SILC_ENABLE_SHARED
38 if SILC_WIN32
39 LIBTOOL_OPTS= -release $(CRYPTO_BASE_VERSION) -rpath $(DESTDIR)$(libdir) \
40                -export-dynamic -no-undefined
41 else
42 LIBTOOL_OPTS= -release $(CRYPTO_BASE_VERSION) -rpath $(DESTDIR)$(libdir)
43 endif
44 LIBTOOL_CRYPTO_VERSION = \
45    -version-info $(CRYPTO_CURRENT):$(CRYPTO_REVISION):$(CRYPTO_AGE) \
46    -export-symbols-regex '^silc_'
47 else
48 LIBTOOL_OPTS=
49 LIBTOOL_CRYPTO_VERSION =
50 endif
51 if SILC_WIN32
52 CRYPTO_LINK_LIBS=$(LIBS)
53 else
54 CRYPTO_LINK_LIBS=
55 endif
56
57 CRYPTO_LIB = libsct.a
58
59 SUBDIRS = $(CRYPTO_DIRS)
60
61 CLEANFILES = $(CRYPTO_LIB)
62 DISTCLEANFILES = $(CRYPTO_LIB)
63
64 remove:
65         -rm -f $(CLEANFILES)
66
67 all:
68         $(MAKE) remove $(CRYPTO_LIB)
69
70 install-exec-hook:
71         -mkdir -p $(DESTDIR)$(libdir)
72         -$(LIBTOOL) $(INSTALL) libsct.la $(DESTDIR)$(libdir)/
73
74 libsct.a:
75         find $(CRYPTO_DIRS) -type f -name *.lo | xargs \
76         $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) \
77         $(CRYPTO_LINK_LIBS) \
78         $(LIBTOOL_CRYPTO_VERSION) \
79         $(LIBTOOL_OPTS) -o libsct.la
80
81 pkgconfigdir = $(libdir)/pkgconfig
82 pkgconfig_DATA = sct.pc
83
84 EXTRA_DIST = sct.pc.in
85
86 include $(top_srcdir)/Makefile.defines.in