X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2FMakefile.ad;h=3ad5741e2df9793fec9d48aa3ba8cd166a1103e5;hb=6e8488ced827350e5c0e95f7a9feffdd80281eae;hp=0fbdfd86a58e8d028368792db8f67d422c50ee1a;hpb=a788ad407a51e84cfd41fedc6c053e62283ea2d7;p=runtime.git diff --git a/lib/Makefile.ad b/lib/Makefile.ad index 0fbdfd86..3ad5741e 100644 --- a/lib/Makefile.ad +++ b/lib/Makefile.ad @@ -17,8 +17,63 @@ 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