shithub: openh264

Download patch

ref: a614ee1b507b894f86bf31f8df84a62f4fbd2b81
parent: 94a0eaf1e77fa80b5aa2c10f46ef10d86af758e4
author: Martin Storsjö <[email protected]>
date: Fri Mar 7 10:10:46 EST 2014

Add separate install-static and install-shared targets

This allows installing only the static library or shared library
without the other.

--- a/Makefile
+++ b/Makefile
@@ -129,15 +129,23 @@
 	$(QUIET)rm -f $@
 	$(QUIET_CXX)$(CXX) $(SHARED) $(LDFLAGS) $(CXX_LINK_O) $+ $(SHLDFLAGS)
 
-install: $(LIBPREFIX)wels.$(LIBSUFFIX) $(LIBPREFIX)wels.$(SHAREDLIBSUFFIX)
-	mkdir -p $(PREFIX)/lib
+install-headers:
 	mkdir -p $(PREFIX)/include/wels
+	install -m 644 codec/api/svc/codec*.h $(PREFIX)/include/wels
+
+install-static: $(LIBPREFIX)wels.$(LIBSUFFIX) install-headers
+	mkdir -p $(PREFIX)/lib
 	install -m 644 $(LIBPREFIX)wels.$(LIBSUFFIX) $(PREFIX)/lib
+
+install-shared: $(LIBPREFIX)wels.$(SHAREDLIBSUFFIX) install-headers
+	mkdir -p $(PREFIX)/lib
 	install -m 755 $(LIBPREFIX)wels.$(SHAREDLIBSUFFIX) $(PREFIX)/lib
 ifneq ($(EXTRA_LIBRARY),)
 	install -m 644 $(EXTRA_LIBRARY) $(PREFIX)/lib
 endif
-	install -m 644 codec/api/svc/codec*.h $(PREFIX)/include/wels
+
+install: install-static install-shared
+	@:
 
 ifeq ($(HAVE_GTEST),Yes)
 include build/gtest-targets.mk