You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
2.3 KiB
66 lines
2.3 KiB
From 14f859ed0ee63774c3aa86cb31ae0d2b8f4941fd Mon Sep 17 00:00:00 2001
|
|
From: Nicolas Chauvet <kwizart@gmail.com>
|
|
Date: Sat, 7 Apr 2018 12:32:54 +0200
|
|
Subject: [PATCH 01/11] Use PREFIX and LIBDIR build variable instead of custom
|
|
ones
|
|
|
|
---
|
|
wrapper/Makefile | 29 +++++++++++++++--------------
|
|
1 file changed, 15 insertions(+), 14 deletions(-)
|
|
|
|
diff --git a/wrapper/Makefile b/wrapper/Makefile
|
|
index 8658e83..6b02083 100644
|
|
--- a/wrapper/Makefile
|
|
+++ b/wrapper/Makefile
|
|
@@ -8,7 +8,8 @@ SRCDIR = $(TOP)/src
|
|
OBJDIR = $(TOP)/obj
|
|
FEATURESRCDIR = $(TOP)/../feature/src
|
|
PTOOLSDIR = $(TOP)/../ptools
|
|
-INSTALL_PREFIX = /usr/local
|
|
+PREFIX ?= /usr/local
|
|
+LIBDIR ?= $(PREFIX)/lib
|
|
|
|
OBJS = \
|
|
$(OBJDIR)/alloc.o \
|
|
@@ -170,24 +171,24 @@ vmafossexec: $(OBJDIR)/main.o $(LIBVMAF)
|
|
|
|
.PHONY: install
|
|
install:
|
|
- mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/lib
|
|
- mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/include
|
|
- mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/share
|
|
- mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/lib/pkgconfig
|
|
- cp $(LIBVMAF) $(DESTDIR)$(INSTALL_PREFIX)/lib/$(LIBVMAF)
|
|
- cp src/libvmaf.h $(DESTDIR)$(INSTALL_PREFIX)/include/
|
|
- cp -r ../model $(DESTDIR)$(INSTALL_PREFIX)/share/
|
|
- cp libvmaf.pc $(DESTDIR)$(INSTALL_PREFIX)/lib/pkgconfig/
|
|
+ mkdir -p $(DESTDIR)$(LIBDIR)
|
|
+ mkdir -p $(DESTDIR)$(PREFIX)/include
|
|
+ mkdir -p $(DESTDIR)$(PREFIX)/share
|
|
+ mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig
|
|
+ cp $(LIBVMAF) $(DESTDIR)$(LIBDIR)/$(LIBVMAF)
|
|
+ cp src/libvmaf.h $(DESTDIR)$(PREFIX)/include/
|
|
+ cp -r ../model $(DESTDIR)$(PREFIX)/share/
|
|
+ cp libvmaf.pc $(DESTDIR)$(LIBDIR)/pkgconfig/
|
|
|
|
.PHONY: uninstall
|
|
uninstall:
|
|
- rm -f $(DESTDIR)$(INSTALL_PREFIX)/lib/$(LIBVMAF)
|
|
- rm -f $(DESTDIR)$(INSTALL_PREFIX)/include/libvmaf.h
|
|
- rm -fr $(DESTDIR)$(INSTALL_PREFIX)/share/model
|
|
- rm -f $(DESTDIR)$(INSTALL_PREFIX)/lib/pkgconfig/libvmaf.pc
|
|
+ rm -f $(DESTDIR)$(LIBDIR)/$(LIBVMAF)
|
|
+ rm -f $(DESTDIR)$(PREFIX)/include/libvmaf.h
|
|
+ rm -fr $(DESTDIR)$(PREFIX)/share/model
|
|
+ rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/libvmaf.pc
|
|
|
|
testlib: $(SRCDIR)/main.cpp
|
|
- $(CXX) -s -o $@ $(CXXFLAGS) $^ -I $(FEATURESRCDIR) -I $(FEATURESRCDIR)/common -I $(DESTDIR)$(INSTALL_PREFIX)/include -L$(DESTDIR)$(INSTALL_PREFIX)/lib -lvmaf -pthread
|
|
+ $(CXX) -s -o $@ $(CXXFLAGS) $^ -I $(FEATURESRCDIR) -I $(FEATURESRCDIR)/common -I $(DESTDIR)$(PREFIX)/include -L$(DESTDIR)$(LIBDIR) -lvmaf -pthread
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
--
|
|
2.17.1
|
|
|