Added SILC HTTP Server API
[runtime.git] / lib / Makefile.ad
index 0fbdfd86a58e8d028368792db8f67d422c50ee1a..3ad5741e2df9793fec9d48aa3ba8cd166a1103e5 100644 (file)
 
 AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
 
-SUBDIRS=
+RUNTIME_BASE_VERSION=@RUNTIME_BASE_VERSION@
+RUNTIME_CURRENT=@RUNTIME_CURRENT@
+RUNTIME_REVISION=@RUNTIME_REVISION@
+RUNTIME_AGE=@RUNTIME_AGE@
 
-include Makefile.runtime
+# SILC Library dirs
+RUNTIME_DIRS =                 \
+       contrib         \
+       silcutil        \
+       silchttp
+
+if SILC_ENABLE_SHARED
+if SILC_WIN32
+LIBTOOL_OPTS= -release $(RUNTIME_BASE_VERSION) -rpath $(DESTDIR)$(libdir) \
+              -export-dynamic -no-undefined
+else
+LIBTOOL_OPTS= -release $(RUNTIME_BASE_VERSION) -rpath $(DESTDIR)$(libdir)
+endif
+LIBTOOL_RUNTIME_VERSION = \
+   -version-info $(RUNTIME_CURRENT):$(RUNTIME_REVISION):$(RUNTIME_AGE)
+else
+LIBTOOL_OPTS=
+LIBTOOL_RUNTIME_VERSION =
+endif
+if SILC_WIN32
+RUNTIME_LINK_LIBS=$(LIBS)
+else
+RUNTIME_LINK_LIBS=
+endif
+
+RUNTIME_LIB = libsrt.a
+
+SUBDIRS = $(RUNTIME_DIRS)
+
+CLEANFILES = $(RUNTIME_LIB)
+DISTCLEANFILES = $(RUNTIME_LIB)
+
+remove:
+       -rm -f $(CLEANFILES)
+
+all:
+       $(MAKE) remove $(RUNTIME_LIB)
+
+install-exec-hook:
+       -mkdir -p $(DESTDIR)$(libdir)
+       -$(LIBTOOL) $(INSTALL) libsrt.la $(DESTDIR)$(libdir)/
+
+libsrt.a:
+       find $(RUNTIME_DIRS) -type f -name *.lo | xargs \
+       $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) \
+       $(RUNTIME_LINK_LIBS) \
+       $(LIBTOOL_RUNTIME_VERSION) \
+       $(LIBTOOL_OPTS) -o libsrt.la
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = srt.pc
+
+EXTRA_DIST = srt.pc.in
 
 include $(top_srcdir)/Makefile.defines.in