Added silc_file_stat, silc_file_fstat and silc_file_fsize
[runtime.git] / lib / Makefile.runtime.ad
1 #
2 #  Makefile.runtime.am
3 #
4 #  Author: Pekka Riikonen <priikone@silcnet.org>
5 #
6 #  Copyright (C) 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 RUNTIME_BASE_VERSION=@RUNTIME_BASE_VERSION@
19 RUNTIME_CURRENT=@RUNTIME_CURRENT@
20 RUNTIME_REVISION=@RUNTIME_REVISION@
21 RUNTIME_AGE=@RUNTIME_AGE@
22
23 # SILC Library dirs
24 RUNTIME_DIRS =          \
25         contrib         \
26         silcutil
27
28 if SILC_ENABLE_SHARED
29 if SILC_WIN32
30 LIBTOOL_OPTS= -release $(RUNTIME_BASE_VERSION) -rpath $(DESTDIR)$(libdir) \
31                -export-dynamic -no-undefined
32 else
33 LIBTOOL_OPTS= -release $(RUNTIME_BASE_VERSION) -rpath $(DESTDIR)$(libdir)
34 endif
35 LIBTOOL_RUNTIME_VERSION = \
36    -version-info $(RUNTIME_CURRENT):$(RUNTIME_REVISION):$(RUNTIME_AGE)
37 else
38 LIBTOOL_OPTS=
39 LIBTOOL_RUNTIME_VERSION =
40 endif
41 if SILC_WIN32
42 RUNTIME_LINK_LIBS=$(LIBS)
43 else
44 RUNTIME_LINK_LIBS=
45 endif
46
47 RUNTIME_LIB = libsrt.a
48
49 SUBDIRS += $(RUNTIME_DIRS)
50
51 CLEANFILES = $(RUNTIME_LIB)
52 DISTCLEANFILES = $(RUNTIME_LIB)
53
54 remove:
55         -rm -f $(CLEANFILES)
56
57 all:
58         $(MAKE) remove $(RUNTIME_LIB)
59
60 install-exec-hook:
61         -mkdir -p $(DESTDIR)$(libdir)
62         -$(LIBTOOL) $(INSTALL) libsrt.la $(DESTDIR)$(libdir)/
63
64 libsrt.a:
65         find $(RUNTIME_DIRS) -type f -name *.lo | xargs \
66         $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) \
67         $(RUNTIME_LINK_LIBS) \
68         $(LIBTOOL_RUNTIME_VERSION) \
69         $(LIBTOOL_OPTS) -o libsrt.la
70
71 pkgconfigdir = $(libdir)/pkgconfig
72 pkgconfig_DATA = srt.pc
73
74 EXTRA_DIST = srt.pc.in
75
76 #srt-install:
77 #       -mkdir -p $(docdir)/toolkit/
78 #       -$(INSTALL_DATA) $(top_srcdir)/doc/toolkit/* $(docdir)/toolkit
79 #       -$(INSTALL_DATA) $(top_srcdir)/lib/doc/*.gif $(docdir)/toolkit
80 #       -cp -R $(top_srcdir)/tutorial $(docdir)
81
82 #install-data-hook:     \
83 #       srt-install