SILC Runtime Toolkit 1.2 Beta 1
[runtime.git] / lib / Makefile.ad
index 0fbdfd86a58e8d028368792db8f67d422c50ee1a..1408d693a4fec4672610070e59856ec0a31eeecc 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
+
+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
+
+#srt-install:
+#      -mkdir -p $(docdir)/toolkit/
+#      -$(INSTALL_DATA) $(top_srcdir)/doc/toolkit/* $(docdir)/toolkit
+#      -$(INSTALL_DATA) $(top_srcdir)/lib/doc/*.gif $(docdir)/toolkit
+#      -cp -R $(top_srcdir)/tutorial $(docdir)
+
+#install-data-hook:    \
+#      srt-install
 
 include $(top_srcdir)/Makefile.defines.in