ref: e366f5779b932c7412bca3357d47545b23682723
parent: b4a941698a70d52b7e70b3594f1bdbfcbc964ba2
parent: 45689f832b1d88ad649bf780e8fc814883f5169a
author: Ethan Hugg <ethanhugg@gmail.com>
date: Fri Feb 7 05:03:06 EST 2014
Merge pull request #267 from mstorsjo/install Add a "make install" target
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,7 @@
CFLAGS_M64=-m64
BUILDTYPE=Release
V=Yes
+PREFIX=/usr/local
ifeq (, $(ENABLE64BIT))
ifeq ($(ARCH), x86_64)
@@ -128,6 +129,19 @@
include codec/processing/targets.mk
include codec/console/dec/targets.mk
include codec/console/enc/targets.mk
+
+libraries: $(LIBPREFIX)wels.$(LIBSUFFIX)
+LIBRARIES += $(LIBPREFIX)wels.$(LIBSUFFIX)
+
+$(LIBPREFIX)wels.$(LIBSUFFIX): $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
+ rm -f $@
+ $(AR) $(AR_OPTS) $+
+
+install: $(LIBPREFIX)wels.$(LIBSUFFIX)
+ mkdir -p $(PREFIX)/lib
+ mkdir -p $(PREFIX)/include/wels
+ install -m 644 $(LIBPREFIX)wels.$(LIBSUFFIX) $(PREFIX)/lib
+ install -m 644 codec/api/svc/codec*.h $(PREFIX)/include/wels
ifeq ($(HAVE_GTEST),Yes)
include build/gtest-targets.mk