[dak/master] build a static library
Signed-off-by: Mark Hymers <mhy@debian.org>
---
tools/dsync-0.0/buildlib/library.mak | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/tools/dsync-0.0/buildlib/library.mak b/tools/dsync-0.0/buildlib/library.mak
index 565baa3..f6fc1f0 100644
--- a/tools/dsync-0.0/buildlib/library.mak
+++ b/tools/dsync-0.0/buildlib/library.mak
@@ -25,7 +25,7 @@ $(LOCAL)-LIBRARY := $(LIBRARY)
# Install the command hooks
headers: $($(LOCAL)-HEADERS)
-library: $(LIB)/lib$(LIBRARY).so $(LIB)/lib$(LIBRARY).so.$(MAJOR)
+library: $(LIB)/lib$(LIBRARY).so $(LIB)/lib$(LIBRARY).so.$(MAJOR) $(LIB)/lib$(LIBRARY).a
clean: clean/$(LOCAL)
veryclean: veryclean/$(LOCAL)
@@ -51,6 +51,12 @@ $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS)
$(LFLAGS_SO) $(SONAME_MAGIC)$($(@F)-SONAME) -shared \
$(filter %.opic,$^) $($(@F)-SLIBS)
+$(LIB)/lib$(LIBRARY).a: $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS)
+ -rm -f $(LIB)/lib$($(@F)-LIBRARY).a 2> /dev/null
+ echo Building static library $@
+ $(AR) rc $@ $(filter %.opic,$^)
+ ranlib $@
+
# Compilation rules
vpath %.cc $(SUBDIRS)
$(OBJ)/%.opic: %.cc
--
1.5.6.5
Reply to: