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