]> err.no Git - dak/commitdiff
build a static library
authorMark Hymers <mhy@debian.org>
Wed, 4 Feb 2009 10:59:19 +0000 (10:59 +0000)
committerMark Hymers <mhy@debian.org>
Wed, 4 Feb 2009 10:59:19 +0000 (10:59 +0000)
Signed-off-by: Mark Hymers <mhy@debian.org>
tools/dsync-0.0/buildlib/library.mak

index 565baa399f30ecb2332ce84179579dd1d9a8a939..f6fc1f02fd472cf93f285d09285422ffcca166a4 100644 (file)
@@ -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