Added SILC HTTP Server API
[runtime.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 RUNTIME_BASE_VERSION=@RUNTIME_BASE_VERSION@
21 RUNTIME_CURRENT=@RUNTIME_CURRENT@
22 RUNTIME_REVISION=@RUNTIME_REVISION@
23 RUNTIME_AGE=@RUNTIME_AGE@
24
25 # SILC Library dirs
26 RUNTIME_DIRS =          \
27         contrib         \
28         silcutil        \
29         silchttp
30
31 if SILC_ENABLE_SHARED
32 if SILC_WIN32
33 LIBTOOL_OPTS= -release $(RUNTIME_BASE_VERSION) -rpath $(DESTDIR)$(libdir) \
34                -export-dynamic -no-undefined
35 else
36 LIBTOOL_OPTS= -release $(RUNTIME_BASE_VERSION) -rpath $(DESTDIR)$(libdir)
37 endif
38 LIBTOOL_RUNTIME_VERSION = \
39    -version-info $(RUNTIME_CURRENT):$(RUNTIME_REVISION):$(RUNTIME_AGE)
40 else
41 LIBTOOL_OPTS=
42 LIBTOOL_RUNTIME_VERSION =
43 endif
44 if SILC_WIN32
45 RUNTIME_LINK_LIBS=$(LIBS)
46 else
47 RUNTIME_LINK_LIBS=
48 endif
49
50 RUNTIME_LIB = libsrt.a
51
52 SUBDIRS = $(RUNTIME_DIRS)
53
54 CLEANFILES = $(RUNTIME_LIB)
55 DISTCLEANFILES = $(RUNTIME_LIB)
56
57 remove:
58         -rm -f $(CLEANFILES)
59
60 all:
61         $(MAKE) remove $(RUNTIME_LIB)
62
63 install-exec-hook:
64         -mkdir -p $(DESTDIR)$(libdir)
65         -$(LIBTOOL) $(INSTALL) libsrt.la $(DESTDIR)$(libdir)/
66
67 libsrt.a:
68         find $(RUNTIME_DIRS) -type f -name *.lo | xargs \
69         $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) \
70         $(RUNTIME_LINK_LIBS) \
71         $(LIBTOOL_RUNTIME_VERSION) \
72         $(LIBTOOL_OPTS) -o libsrt.la
73
74 pkgconfigdir = $(libdir)/pkgconfig
75 pkgconfig_DATA = srt.pc
76
77 EXTRA_DIST = srt.pc.in
78
79 include $(top_srcdir)/Makefile.defines.in