Permalink
Browse files

Makefile: support for static library (handy to make better optimized …

…static binary)

Usage example:
    make libbdelta.a bdelta LDFLAGS=-static

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  • Loading branch information...
trofi committed Sep 27, 2012
1 parent 3729c8e commit 744c29da69dd38f8ec69fb6f11c8f19f9dc1978d
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/Makefile
View
@@ -8,6 +8,10 @@ ALL_TARGETS = bpatch libbdelta.so bdelta
all: $(ALL_TARGETS)
+libbdelta.a: libbdelta.cpp compatibility.h checksum.h file.h
+ $(CXX) -c $(CXXFLAGS) $(LDFLAGS) $< -o $<.o
+ $(AR) rfs $@ $<.o
+
libbdelta.so: libbdelta.cpp compatibility.h checksum.h file.h
$(CXX) -shared -fPIC $(CXXFLAGS) $(LDFLAGS) $< -o $@

0 comments on commit 744c29d

Please sign in to comment.