2014-01-27 12:33:19 +00:00
|
|
|
# Simple Makefile for Kvazaar HEVC encoder
|
|
|
|
|
2015-07-31 12:51:53 +00:00
|
|
|
all: cli lib-shared
|
|
|
|
.PHONY: all
|
|
|
|
|
2015-07-01 05:17:21 +00:00
|
|
|
# Installation locations
|
|
|
|
DESTDIR =
|
|
|
|
PREFIX = /usr/local
|
|
|
|
BINDIR = $(PREFIX)/bin
|
|
|
|
INCDIR = $(PREFIX)/include
|
|
|
|
LIBDIR = $(PREFIX)/lib
|
2015-07-01 08:40:14 +00:00
|
|
|
DLLDIR = $(BINDIR)
|
2015-07-01 05:17:21 +00:00
|
|
|
|
2015-07-13 07:08:05 +00:00
|
|
|
# Library version number
|
|
|
|
VER_MAJOR = 0
|
|
|
|
VER_MINOR = 0
|
|
|
|
VER_RELEASE = 0
|
|
|
|
|
|
|
|
PROG = kvazaar
|
|
|
|
DEBUG = kvazaar_debug
|
|
|
|
TESTS = kvazaar_tests
|
2015-07-17 17:44:20 +00:00
|
|
|
|
|
|
|
NAME = libkvazaar
|
2015-08-20 11:45:38 +00:00
|
|
|
STATIC = $(NAME).a
|
2015-07-17 17:44:20 +00:00
|
|
|
SO = $(NAME).so
|
2015-07-13 07:08:05 +00:00
|
|
|
LIB = $(SO).$(VER_MAJOR).$(VER_MINOR).$(VER_RELEASE)
|
2015-07-20 11:49:25 +00:00
|
|
|
DYLIB = $(NAME).$(VER_MAJOR).dylib
|
2015-07-13 07:08:05 +00:00
|
|
|
DLL = kvazaar.dll
|
|
|
|
IMPLIB = libkvazaar.dll.a
|
|
|
|
INC = kvazaar.h \
|
|
|
|
kvazaar_version.h
|
2015-07-01 05:17:21 +00:00
|
|
|
|
|
|
|
# Compilers and other tools
|
|
|
|
AS = yasm
|
2015-07-29 10:42:48 +00:00
|
|
|
LD = $(CC)
|
2015-07-01 05:17:21 +00:00
|
|
|
INSTALL = install
|
2015-07-13 07:08:05 +00:00
|
|
|
LN_S = ln -s
|
2015-08-20 11:45:38 +00:00
|
|
|
RANLIB = ranlib
|
2015-07-01 05:17:21 +00:00
|
|
|
|
|
|
|
# Do not use variable length arrays because they don't work in Visual Studio 2013.
|
2015-07-31 12:53:31 +00:00
|
|
|
WARNINGS = -Werror -Wall -Wtype-limits -Wvla
|
2015-07-01 05:17:21 +00:00
|
|
|
INCLUDEDIRS = -I. -I./strategies -I./extras -I..
|
|
|
|
|
2015-07-17 09:42:26 +00:00
|
|
|
# nasm requires trailing slashes in include directories
|
|
|
|
ASFLAGS += $(patsubst %,%/,$(INCLUDEDIRS))
|
2015-07-29 10:42:48 +00:00
|
|
|
|
|
|
|
# Notes about optimization levels:
|
2015-08-22 14:00:26 +00:00
|
|
|
# Overall, kvazaar seems to run 15-20 % faster when compiled with gcc.
|
2015-07-29 10:42:48 +00:00
|
|
|
# gcc-5.1.1: no benefit from -flto, slight harm from -O3
|
|
|
|
# clang-4.3.0: slight benefit from -O3, more from -flto
|
2015-07-31 12:53:31 +00:00
|
|
|
CFLAGS += -O2 -g -ftree-vectorize
|
|
|
|
|
|
|
|
CFLAGS += -fvisibility=hidden -std=gnu99
|
2015-07-13 11:20:21 +00:00
|
|
|
CFLAGS += -DKVZ_DLL_EXPORTS
|
2015-07-01 05:17:21 +00:00
|
|
|
CFLAGS += $(INCLUDEDIRS) $(WARNINGS)
|
2015-07-29 10:42:48 +00:00
|
|
|
LDFLAGS += -O2 -fvisibility=hidden -lm -pthread
|
2015-01-29 14:20:24 +00:00
|
|
|
|
2015-07-16 11:15:09 +00:00
|
|
|
ARCH ?= $(shell uname -m)
|
|
|
|
|
|
|
|
ifneq ($(findstring Windows, $(OS)),)
|
|
|
|
SYSTEM ?= Windows
|
|
|
|
else
|
|
|
|
SYSTEM ?= $(shell uname -s)
|
2014-02-03 12:27:19 +00:00
|
|
|
endif
|
2014-01-27 12:33:19 +00:00
|
|
|
|
2014-01-30 15:56:52 +00:00
|
|
|
# ARCH related flags
|
|
|
|
ifeq ($(ARCH), x86_64)
|
2014-05-28 12:47:24 +00:00
|
|
|
TARGET_CPU_BITS := 64
|
|
|
|
TARGET_CPU_ARCH := x86
|
|
|
|
else ifeq ($(ARCH), ppc64)
|
|
|
|
TARGET_CPU_BITS := 64
|
|
|
|
TARGET_CPU_ARCH := ppc
|
2014-01-27 12:33:19 +00:00
|
|
|
else
|
2014-05-28 12:47:24 +00:00
|
|
|
#safe (?) defaults
|
|
|
|
TARGET_CPU_BITS := 32
|
|
|
|
TARGET_CPU_ARCH := x86
|
2014-01-27 12:33:19 +00:00
|
|
|
endif
|
|
|
|
|
2014-10-27 16:19:05 +00:00
|
|
|
CFLAGS += -m$(TARGET_CPU_BITS)
|
2014-05-28 12:47:24 +00:00
|
|
|
LDFLAGS += -m$(TARGET_CPU_BITS)
|
|
|
|
|
2015-07-29 00:26:20 +00:00
|
|
|
INSTALL_TARGETS = install-prog install-pc
|
|
|
|
|
2014-02-03 12:27:19 +00:00
|
|
|
# Windows (cygwin/mingw) specific flags
|
2015-07-16 11:15:09 +00:00
|
|
|
ifeq ($(SYSTEM), Windows)
|
2014-02-03 12:27:19 +00:00
|
|
|
ifeq ($(ARCH), x86_64)
|
2015-07-01 05:17:21 +00:00
|
|
|
ASFLAGS += -f win64
|
|
|
|
ASFLAGS += -DHAVE_ALIGNED_STACK=1
|
2014-01-30 15:56:52 +00:00
|
|
|
else
|
2015-07-01 05:17:21 +00:00
|
|
|
ASFLAGS += -f win32
|
|
|
|
ASFLAGS += -DPREFIX
|
|
|
|
ASFLAGS += -DHAVE_ALIGNED_STACK=0
|
2014-01-30 15:56:52 +00:00
|
|
|
endif
|
2014-10-27 16:19:05 +00:00
|
|
|
CFLAGS += -D__USE_MINGW_ANSI_STDIO=1
|
2015-07-31 12:51:53 +00:00
|
|
|
LIBKVAZAAR_SHARED = $(DLL)
|
2015-07-29 00:26:20 +00:00
|
|
|
INSTALL_TARGETS += install-dll
|
2015-07-16 11:15:09 +00:00
|
|
|
|
2014-01-30 15:56:52 +00:00
|
|
|
# OS X specific flags
|
2015-07-16 11:15:09 +00:00
|
|
|
else ifeq ($(SYSTEM), Darwin)
|
2014-01-30 15:56:52 +00:00
|
|
|
ifeq ($(ARCH), x86_64)
|
2015-07-01 05:17:21 +00:00
|
|
|
ASFLAGS += -f macho64
|
2014-01-30 15:56:52 +00:00
|
|
|
else
|
2015-07-01 05:17:21 +00:00
|
|
|
ASFLAGS += -f macho32
|
2014-01-30 15:56:52 +00:00
|
|
|
endif
|
2015-07-01 05:17:21 +00:00
|
|
|
ASFLAGS += -DPREFIX
|
2015-07-31 12:51:53 +00:00
|
|
|
LIBKVAZAAR_SHARED = $(DYLIB)
|
2015-07-29 00:26:20 +00:00
|
|
|
INSTALL_TARGETS += install-dylib
|
2015-07-16 11:15:09 +00:00
|
|
|
|
2014-02-03 12:27:19 +00:00
|
|
|
# Default to Linux/elf specific flags
|
|
|
|
else
|
2015-07-29 00:26:20 +00:00
|
|
|
LIBS += -lrt
|
2015-08-22 14:00:26 +00:00
|
|
|
LDFLAGS += -Wl,-z,noexecstack
|
2014-02-21 12:53:47 +00:00
|
|
|
ifeq ($(ARCH), x86_64)
|
2015-07-01 05:17:21 +00:00
|
|
|
ASFLAGS += -f elf64
|
2014-02-03 12:27:19 +00:00
|
|
|
else
|
2015-07-01 05:17:21 +00:00
|
|
|
ASFLAGS += -f elf32
|
2014-02-03 12:27:19 +00:00
|
|
|
endif
|
2015-07-31 12:51:53 +00:00
|
|
|
LIBKVAZAAR_SHARED = $(LIB)
|
2015-08-22 14:00:26 +00:00
|
|
|
INSTALL_TARGETS += install-lib install-static
|
2014-01-27 12:33:19 +00:00
|
|
|
endif
|
2015-07-16 11:15:09 +00:00
|
|
|
|
2014-10-14 06:45:18 +00:00
|
|
|
# Flags shared across systems
|
|
|
|
ifeq ($(ARCH), x86_64)
|
2015-07-01 05:17:21 +00:00
|
|
|
ASFLAGS += -DARCH_X86_64=1
|
2014-10-14 06:45:18 +00:00
|
|
|
else
|
2015-07-01 05:17:21 +00:00
|
|
|
ASFLAGS += -DARCH_X86_64=0
|
2014-10-14 06:45:18 +00:00
|
|
|
endif
|
2014-01-27 12:33:19 +00:00
|
|
|
|
2015-07-01 05:17:21 +00:00
|
|
|
# Compile asm files by default if yasm is present.
|
|
|
|
ifndef KVZ_DISABLE_ASM
|
|
|
|
has_as := $(shell type $(AS) 2>/dev/null)
|
|
|
|
ifeq ($(has_as),)
|
|
|
|
KVZ_DISABLE_ASM := 1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2015-07-03 08:10:27 +00:00
|
|
|
ifdef CHECKPOINTS
|
|
|
|
CFLAGS += -DCHECKPOINTS
|
|
|
|
endif
|
|
|
|
|
2015-07-01 05:17:21 +00:00
|
|
|
# Compile files in strategy directories with appropriate flags.
|
|
|
|
ifeq ($(ARCH), ppc64)
|
2015-08-20 11:45:38 +00:00
|
|
|
strategies/altivec/%.o: EXTRA_FLAGS += -maltivec -fno-lto
|
|
|
|
strategies/altivec/%.lo: EXTRA_FLAGS += -maltivec -fno-lto
|
2015-07-01 05:17:21 +00:00
|
|
|
else
|
2015-08-20 11:45:38 +00:00
|
|
|
strategies/sse2/%.o: EXTRA_FLAGS += -msse2 -fno-lto
|
|
|
|
strategies/sse41/%.o: EXTRA_FLAGS += -msse4.1 -fno-lto
|
|
|
|
strategies/sse2/%.lo: EXTRA_FLAGS += -msse2 -fno-lto
|
|
|
|
strategies/sse41/%.lo: EXTRA_FLAGS += -msse4.1 -fno-lto
|
2015-07-01 05:17:21 +00:00
|
|
|
# Needs to be defined on Travis
|
|
|
|
ifndef KVZ_DISABLE_AVX2
|
2015-08-20 11:45:38 +00:00
|
|
|
strategies/avx2/%.o: EXTRA_FLAGS += -mavx2 -fno-lto
|
|
|
|
strategies/avx2/%.lo: EXTRA_FLAGS += -mavx2 -fno-lto
|
2015-07-01 05:17:21 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2015-04-17 15:08:58 +00:00
|
|
|
OBJS = \
|
2014-07-18 14:31:18 +00:00
|
|
|
bitstream.o \
|
|
|
|
cabac.o \
|
|
|
|
checkpoint.o \
|
|
|
|
config.o \
|
|
|
|
context.o \
|
|
|
|
cu.o \
|
|
|
|
encoder.o \
|
|
|
|
encoderstate.o \
|
2015-03-13 12:23:54 +00:00
|
|
|
rate_control.o \
|
2014-07-18 14:31:18 +00:00
|
|
|
filter.o \
|
|
|
|
inter.o \
|
|
|
|
intra.o \
|
2015-05-18 08:43:10 +00:00
|
|
|
kvazaar.o \
|
2014-07-18 14:31:18 +00:00
|
|
|
nal.o \
|
|
|
|
imagelist.o \
|
|
|
|
rdo.o \
|
|
|
|
sao.o \
|
|
|
|
scalinglist.o \
|
|
|
|
search.o \
|
2015-07-21 08:49:04 +00:00
|
|
|
search_intra.o \
|
|
|
|
search_inter.o \
|
2014-07-18 14:31:18 +00:00
|
|
|
strategyselector.o \
|
|
|
|
tables.o \
|
|
|
|
threadqueue.o \
|
|
|
|
transform.o \
|
|
|
|
encoder_state-bitstream.o \
|
|
|
|
encoder_state-ctors_dtors.o \
|
|
|
|
encoder_state-geometry.o \
|
|
|
|
image.o \
|
|
|
|
videoframe.o \
|
|
|
|
strategies/strategies-picture.o \
|
|
|
|
strategies/strategies-nal.o \
|
2014-07-29 15:10:47 +00:00
|
|
|
strategies/strategies-dct.o \
|
2015-01-21 16:06:57 +00:00
|
|
|
strategies/strategies-ipol.o \
|
2014-07-18 14:31:18 +00:00
|
|
|
strategies/generic/nal-generic.o \
|
|
|
|
strategies/generic/picture-generic.o \
|
|
|
|
strategies/sse2/picture-sse2.o \
|
|
|
|
strategies/sse41/picture-sse41.o \
|
2014-07-14 13:08:19 +00:00
|
|
|
strategies/altivec/picture-altivec.o \
|
2014-07-21 13:34:55 +00:00
|
|
|
strategies/avx2/picture-avx2.o \
|
2014-07-23 12:15:09 +00:00
|
|
|
strategies/x86_asm/picture-x86-asm.o \
|
2014-07-29 15:10:47 +00:00
|
|
|
strategies/generic/dct-generic.o \
|
2015-01-21 16:06:57 +00:00
|
|
|
strategies/avx2/dct-avx2.o \
|
|
|
|
strategies/generic/ipol-generic.o \
|
2015-04-17 15:08:58 +00:00
|
|
|
strategies/avx2/ipol-avx2.o
|
2014-10-29 13:02:35 +00:00
|
|
|
|
2015-07-01 05:17:21 +00:00
|
|
|
ifndef KVZ_DISABLE_ASM
|
|
|
|
strategies/x86_asm/%.o: EXTRA_FLAGS += -DKVZ_COMPILE_ASM
|
|
|
|
|
|
|
|
OBJS += \
|
|
|
|
strategies/x86_asm/picture-x86-asm-sad.o \
|
|
|
|
strategies/x86_asm/picture-x86-asm-satd.o
|
|
|
|
endif
|
2014-10-29 13:02:35 +00:00
|
|
|
|
2015-04-17 15:08:58 +00:00
|
|
|
TESTDIR := ../tests
|
|
|
|
TEST_OBJS := \
|
|
|
|
$(TESTDIR)/dct_tests.o \
|
|
|
|
$(TESTDIR)/intra_sad_tests.o \
|
|
|
|
$(TESTDIR)/sad_tests.o \
|
|
|
|
$(TESTDIR)/satd_tests.o \
|
|
|
|
$(TESTDIR)/speed_tests.o \
|
|
|
|
$(TESTDIR)/tests_main.o \
|
|
|
|
$(TESTDIR)/test_strategies.o
|
2014-10-29 13:02:35 +00:00
|
|
|
|
2015-08-13 05:56:23 +00:00
|
|
|
MAIN_OBJS := \
|
|
|
|
encmain.o \
|
|
|
|
cli.o \
|
|
|
|
yuv_io.o
|
2014-10-30 12:00:54 +00:00
|
|
|
|
2015-07-01 05:17:21 +00:00
|
|
|
RELEASE_OBJS = $(MAIN_OBJS) $(OBJS)
|
2015-08-20 11:45:38 +00:00
|
|
|
# Compile separate PIC objects for shared libraries
|
|
|
|
SHARED_OBJS = $(OBJS:.o=.lo)
|
2015-04-17 15:08:58 +00:00
|
|
|
DEBUG_OBJS = $(RELEASE_OBJS:.o=_debug.o)
|
2015-07-01 05:17:21 +00:00
|
|
|
TESTS_OBJS = $(TEST_OBJS) $(OBJS)
|
2014-04-15 11:47:24 +00:00
|
|
|
|
2015-04-17 15:08:58 +00:00
|
|
|
DEPS = $(RELEASE_OBJS:.o=.d) $(DEBUG_OBJS:.o=.d) $(TESTS_OBJS:.o=.d)
|
2014-10-29 13:02:35 +00:00
|
|
|
|
2015-07-31 12:51:53 +00:00
|
|
|
.PHONY: cli lib-shared lib-static debug tests build_tests
|
|
|
|
cli: $(PROG)
|
|
|
|
lib-shared: $(LIBKVAZAAR_SHARED)
|
2015-08-20 11:45:38 +00:00
|
|
|
lib-static: $(STATIC)
|
2014-07-23 11:55:06 +00:00
|
|
|
|
2015-04-17 15:08:58 +00:00
|
|
|
debug: LDFLAGS := $(filter-out -O3 -O2 -flto, $(LDFLAGS))
|
|
|
|
debug: CFLAGS := $(filter-out -O3 -O2 -flto, $(CFLAGS))
|
|
|
|
debug: $(DEBUG)
|
2014-07-18 13:55:18 +00:00
|
|
|
|
2015-04-17 15:08:58 +00:00
|
|
|
tests: build_tests
|
2015-07-15 08:00:45 +00:00
|
|
|
./$(TESTS)
|
2015-04-17 15:08:58 +00:00
|
|
|
|
|
|
|
build_tests: CFLAGS := $(filter-out -Werror, $(CFLAGS))
|
|
|
|
build_tests: init_submodules $(TESTS)
|
2014-01-27 12:33:19 +00:00
|
|
|
|
2015-07-31 12:53:31 +00:00
|
|
|
$(LIB): LDFLAGS += -shared -Wl,-soname,$(SO).$(VER_MAJOR)
|
2015-07-16 11:15:09 +00:00
|
|
|
$(DLL): LDFLAGS += -shared -Wl,--out-implib,$(IMPLIB) -o $@
|
2015-07-31 12:53:31 +00:00
|
|
|
$(DYLIB): LDFLAGS += -dynamiclib \
|
2015-07-20 11:40:58 +00:00
|
|
|
-current_version $(VER_MAJOR).$(VER_MINOR).$(VER_RELEASE) \
|
|
|
|
-compatibility_version $(VER_MAJOR) \
|
|
|
|
-install_name $(LIBDIR)/$@
|
2015-07-29 08:24:52 +00:00
|
|
|
|
2015-08-13 06:59:58 +00:00
|
|
|
$(PROG): $(MAIN_OBJS) $(STATIC)
|
2015-07-29 08:24:52 +00:00
|
|
|
$(LD) $^ $(LDFLAGS) $(LIBS) -o $@
|
|
|
|
|
2015-08-20 11:45:38 +00:00
|
|
|
$(STATIC): $(OBJS)
|
|
|
|
$(RM) $@
|
2015-08-29 08:38:10 +00:00
|
|
|
$(AR) rc $@ $^
|
2015-08-20 11:45:38 +00:00
|
|
|
$(RANLIB) $@
|
|
|
|
|
2015-08-20 11:39:18 +00:00
|
|
|
$(LIB) $(DLL) $(DYLIB): $(SHARED_OBJS)
|
2015-07-29 00:26:20 +00:00
|
|
|
$(LD) $^ $(LDFLAGS) $(LIBS) -o $@
|
2015-07-01 08:40:14 +00:00
|
|
|
|
2015-04-17 15:08:58 +00:00
|
|
|
$(DEBUG): $(DEBUG_OBJS)
|
2015-07-29 00:26:20 +00:00
|
|
|
$(LD) $^ $(LDFLAGS) $(LIBS) -o $@
|
2015-07-01 05:17:21 +00:00
|
|
|
|
2015-04-17 15:08:58 +00:00
|
|
|
$(TESTS): $(TESTS_OBJS)
|
2015-07-29 00:26:20 +00:00
|
|
|
$(LD) $^ $(LDFLAGS) $(LIBS) -o $@
|
2014-10-29 13:02:35 +00:00
|
|
|
|
2015-07-29 13:54:32 +00:00
|
|
|
|
|
|
|
%.o: %.asm Makefile
|
|
|
|
$(AS) $(ASFLAGS) -o $@ $<
|
|
|
|
%_debug.o: %.asm Makefile
|
|
|
|
$(AS) $(ASFLAGS) -o $@ $<
|
|
|
|
|
2015-07-29 10:05:56 +00:00
|
|
|
# Hopefully the ASM code is PIC. If not, we have to disable for the .so and .dylib.
|
2015-07-29 13:54:32 +00:00
|
|
|
%.lo: %.asm Makefile
|
|
|
|
$(AS) $(ASFLAGS) -o $@ $<
|
|
|
|
%_debug.lo: %.asm Makefile
|
2015-07-01 05:17:21 +00:00
|
|
|
$(AS) $(ASFLAGS) -o $@ $<
|
|
|
|
|
2015-08-20 11:45:38 +00:00
|
|
|
# Object files not meant for shared libs need KVZ_STATIC_LIB defined so
|
|
|
|
# that the names of the API functions don't get mangled on Windows.
|
|
|
|
%.o: CFLAGS += -DKVZ_STATIC_LIB
|
2015-07-29 13:54:32 +00:00
|
|
|
%.o: %.c Makefile
|
2015-08-22 14:00:26 +00:00
|
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) $(EXTRA_FLAGS) -MMD -MP -c $< -o $@
|
2015-07-29 13:54:32 +00:00
|
|
|
%_debug.o: %.c Makefile
|
2015-08-22 14:00:26 +00:00
|
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) $(EXTRA_FLAGS) -MMD -MP -c $< -o $@
|
2014-07-21 07:54:33 +00:00
|
|
|
|
2015-08-20 11:45:38 +00:00
|
|
|
ifneq ($(SYSTEM), Windows)
|
|
|
|
# Only use -fpic when not on Windows
|
|
|
|
%.lo: CFLAGS += -fpic
|
|
|
|
endif
|
2015-07-29 13:54:32 +00:00
|
|
|
%.lo: %.c Makefile
|
2015-08-22 14:00:26 +00:00
|
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) $(EXTRA_FLAGS) -MMD -MP -c $< -o $@
|
2015-07-29 13:54:32 +00:00
|
|
|
%_debug.lo: %.c Makefile
|
2015-08-22 14:00:26 +00:00
|
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) $(EXTRA_FLAGS) -MMD -MP -c $< -o $@
|
2015-07-29 13:54:32 +00:00
|
|
|
|
2015-07-29 10:05:56 +00:00
|
|
|
|
2015-07-31 12:51:53 +00:00
|
|
|
.PHONY: kvazaar.pc init_submodules install install-pc install-prog install-lib
|
|
|
|
.PHONY: install-dylib install-dll clean
|
2015-07-29 00:26:20 +00:00
|
|
|
kvazaar.pc: kvazaar.pc.in Makefile
|
|
|
|
sed -e "s;@prefix@;$(PREFIX);" -e "s;@libdir@;$(LIBDIR);" \
|
|
|
|
-e "s;@VERSION@;$(VER_MAJOR).$(VER_MINOR).$(VER_RELEASE);" \
|
|
|
|
-e "s;@LIBS@;$(LIBS);" kvazaar.pc.in > $@
|
|
|
|
|
2015-04-17 15:08:58 +00:00
|
|
|
init_submodules:
|
|
|
|
git submodule init
|
|
|
|
git submodule update
|
2014-04-16 06:09:10 +00:00
|
|
|
|
2015-07-16 11:15:09 +00:00
|
|
|
install: $(INSTALL_TARGETS)
|
2015-07-01 05:17:21 +00:00
|
|
|
|
2015-07-29 00:26:20 +00:00
|
|
|
install-pc: kvazaar.pc
|
|
|
|
$(INSTALL) -d $(DESTDIR)$(LIBDIR)/pkgconfig
|
|
|
|
$(INSTALL) -m644 $^ $(DESTDIR)$(LIBDIR)/pkgconfig
|
|
|
|
|
2015-07-01 05:17:21 +00:00
|
|
|
install-prog: $(PROG)
|
|
|
|
$(INSTALL) -d $(DESTDIR)$(BINDIR)
|
2015-07-16 14:50:09 +00:00
|
|
|
$(INSTALL) -m755 $(PROG) $(DESTDIR)$(BINDIR)
|
2015-07-01 05:17:21 +00:00
|
|
|
|
2015-08-20 11:45:38 +00:00
|
|
|
install-static: $(STATIC)
|
|
|
|
$(INSTALL) -d $(DESTDIR)$(INCDIR)
|
|
|
|
$(INSTALL) -d $(DESTDIR)$(LIBDIR)
|
|
|
|
$(INSTALL) -m644 $(INC) $(DESTDIR)$(INCDIR)
|
|
|
|
$(INSTALL) -m644 $(STATIC) $(DESTDIR)$(LIBDIR)
|
|
|
|
|
2015-07-01 05:17:21 +00:00
|
|
|
install-lib: $(LIB)
|
|
|
|
$(INSTALL) -d $(DESTDIR)$(INCDIR)
|
|
|
|
$(INSTALL) -d $(DESTDIR)$(LIBDIR)
|
2015-07-16 14:50:09 +00:00
|
|
|
$(INSTALL) -m644 $(INC) $(DESTDIR)$(INCDIR)
|
|
|
|
$(INSTALL) -m644 $(LIB) $(DESTDIR)$(LIBDIR)
|
2015-07-13 07:08:05 +00:00
|
|
|
$(LN_S) -f -T $(LIB) $(DESTDIR)$(LIBDIR)/$(SO).$(VER_MAJOR)
|
|
|
|
$(LN_S) -f -T $(LIB) $(DESTDIR)$(LIBDIR)/$(SO)
|
2015-07-01 05:17:21 +00:00
|
|
|
|
2015-07-17 17:44:20 +00:00
|
|
|
install-dylib: $(DYLIB)
|
|
|
|
$(INSTALL) -d $(DESTDIR)$(INCDIR)
|
|
|
|
$(INSTALL) -d $(DESTDIR)$(LIBDIR)
|
|
|
|
$(INSTALL) -m644 $(INC) $(DESTDIR)$(INCDIR)
|
|
|
|
$(INSTALL) -m644 $(DYLIB) $(DESTDIR)$(LIBDIR)
|
|
|
|
$(LN_S) -f $(DYLIB) $(DESTDIR)$(LIBDIR)/$(NAME).dylib
|
|
|
|
|
2015-07-01 08:40:14 +00:00
|
|
|
install-dll: $(DLL)
|
|
|
|
$(INSTALL) -d $(DESTDIR)$(DLLDIR)
|
|
|
|
$(INSTALL) -d $(DESTDIR)$(INCDIR)
|
|
|
|
$(INSTALL) -d $(DESTDIR)$(LIBDIR)
|
2015-07-16 14:50:09 +00:00
|
|
|
$(INSTALL) -m644 $(DLL) $(DESTDIR)$(DLLDIR)
|
|
|
|
$(INSTALL) -m644 $(INC) $(DESTDIR)$(INCDIR)
|
|
|
|
$(INSTALL) -m644 $(IMPLIB) $(DESTDIR)$(LIBDIR)
|
2015-07-01 08:40:14 +00:00
|
|
|
|
2014-02-03 12:27:19 +00:00
|
|
|
clean:
|
2015-08-20 11:39:18 +00:00
|
|
|
$(RM) $(RELEASE_OBJS) $(SHARED_OBJS) $(DEBUG_OBJS) $(TESTS_OBJS) $(DEPS)
|
2015-08-20 11:45:38 +00:00
|
|
|
$(RM) $(PROG) $(DEBUG) $(TESTS) $(STATIC) $(LIB) $(DLL) $(IMPLIB) $(DYLIB)
|
2014-04-15 11:47:24 +00:00
|
|
|
|
2014-10-30 12:00:54 +00:00
|
|
|
ifneq ($(MAKECMDGOALS),clean)
|
2015-04-17 15:08:58 +00:00
|
|
|
-include $(DEPS)
|
2014-10-30 12:00:54 +00:00
|
|
|
endif
|
2015-07-01 05:17:21 +00:00
|
|
|
|
|
|
|
# Disable default rules
|
|
|
|
.SUFFIXES:
|
|
|
|
|
|
|
|
.PHONY: all clean build_tests tests debug init_submodules
|
2015-07-01 08:40:14 +00:00
|
|
|
.PHONY: install install-prog install-lib install-dll
|