Major restructuring of the internals of SILC Cipher API
[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 else
47 LIBTOOL_OPTS=
48 LIBTOOL_CRYPTO_VERSION =
49 endif
50 if SILC_WIN32
51 CRYPTO_LINK_LIBS=$(LIBS)
52 else
53 CRYPTO_LINK_LIBS=
54 endif
55
56 CRYPTO_LIB = libsct.a
57
58 SUBDIRS = $(CRYPTO_DIRS)
59
60 CLEANFILES = $(CRYPTO_LIB)
61 DISTCLEANFILES = $(CRYPTO_LIB)
62
63 remove:
64         -rm -f $(CLEANFILES)
65
66 all:
67         $(MAKE) remove $(CRYPTO_LIB)
68
69 install-exec-hook:
70         -mkdir -p $(DESTDIR)$(libdir)
71         -$(LIBTOOL) $(INSTALL) libsct.la $(DESTDIR)$(libdir)/
72
73 libsct.a:
74         find $(CRYPTO_DIRS) -type f -name *.lo | xargs \
75         $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) \
76         $(CRYPTO_LINK_LIBS) \
77         $(LIBTOOL_CRYPTO_VERSION) \
78         $(LIBTOOL_OPTS) -o libsct.la
79
80 pkgconfigdir = $(libdir)/pkgconfig
81 pkgconfig_DATA = sct.pc
82
83 EXTRA_DIST = sct.pc.in
84
85 include $(top_srcdir)/Makefile.defines.in