Add cli, lib-shared and lib-static to Makefile.

This commit is contained in:
Ari Koivula 2015-07-31 15:51:53 +03:00
parent 24b3306325
commit beec2705b1
2 changed files with 13 additions and 5 deletions

View file

@ -7,7 +7,7 @@ if [ -n "$VALGRIND_TEST" ]; then
valgrind --leak-check=full --error-exitcode=1 ./kvazaar_debug -i ../mandelbrot_${TEST_DIM}.yuv --input-res=${TEST_DIM} -o /dev/null $VALGRIND_TEST valgrind --leak-check=full --error-exitcode=1 ./kvazaar_debug -i ../mandelbrot_${TEST_DIM}.yuv --input-res=${TEST_DIM} -o /dev/null $VALGRIND_TEST
elif [ -n "$EXPECTED_STATUS" ]; then elif [ -n "$EXPECTED_STATUS" ]; then
cd src cd src
make make cli
set +e set +e
./kvazaar $PARAMS ./kvazaar $PARAMS
EXIT_STATUS=$? EXIT_STATUS=$?

View file

@ -1,5 +1,8 @@
# Simple Makefile for Kvazaar HEVC encoder # Simple Makefile for Kvazaar HEVC encoder
all: cli lib-shared
.PHONY: all
# Installation locations # Installation locations
DESTDIR = DESTDIR =
PREFIX = /usr/local PREFIX = /usr/local
@ -85,7 +88,7 @@ ifeq ($(SYSTEM), Windows)
ASFLAGS += -DHAVE_ALIGNED_STACK=0 ASFLAGS += -DHAVE_ALIGNED_STACK=0
endif endif
CFLAGS += -D__USE_MINGW_ANSI_STDIO=1 CFLAGS += -D__USE_MINGW_ANSI_STDIO=1
ALL_TARGETS = $(PROG) $(DLL) LIBKVAZAAR_SHARED = $(DLL)
INSTALL_TARGETS += install-dll INSTALL_TARGETS += install-dll
# OS X specific flags # OS X specific flags
@ -96,7 +99,7 @@ else ifeq ($(SYSTEM), Darwin)
ASFLAGS += -f macho32 ASFLAGS += -f macho32
endif endif
ASFLAGS += -DPREFIX ASFLAGS += -DPREFIX
ALL_TARGETS = $(PROG) $(DYLIB) LIBKVAZAAR_SHARED = $(DYLIB)
INSTALL_TARGETS += install-dylib INSTALL_TARGETS += install-dylib
# Default to Linux/elf specific flags # Default to Linux/elf specific flags
@ -107,7 +110,7 @@ else
else else
ASFLAGS += -f elf32 ASFLAGS += -f elf32
endif endif
ALL_TARGETS = $(PROG) $(LIB) LIBKVAZAAR_SHARED = $(LIB)
INSTALL_TARGETS += install-lib INSTALL_TARGETS += install-lib
endif endif
@ -223,7 +226,10 @@ TESTS_OBJS = $(TEST_OBJS) $(OBJS)
DEPS = $(RELEASE_OBJS:.o=.d) $(DEBUG_OBJS:.o=.d) $(TESTS_OBJS:.o=.d) DEPS = $(RELEASE_OBJS:.o=.d) $(DEBUG_OBJS:.o=.d) $(TESTS_OBJS:.o=.d)
all: $(ALL_TARGETS) .PHONY: cli lib-shared lib-static debug tests build_tests
cli: $(PROG)
lib-shared: $(LIBKVAZAAR_SHARED)
lib-static: # TODO
debug: LDFLAGS := $(filter-out -O3 -O2 -flto, $(LDFLAGS)) debug: LDFLAGS := $(filter-out -O3 -O2 -flto, $(LDFLAGS))
debug: CFLAGS := $(filter-out -O3 -O2 -flto, $(CFLAGS)) debug: CFLAGS := $(filter-out -O3 -O2 -flto, $(CFLAGS))
@ -277,6 +283,8 @@ $(TESTS): $(TESTS_OBJS)
$(CC) -fpic $(CFLAGS) $(EXTRA_FLAGS) -MMD -MP -c $< -o $@ $(CC) -fpic $(CFLAGS) $(EXTRA_FLAGS) -MMD -MP -c $< -o $@
.PHONY: kvazaar.pc init_submodules install install-pc install-prog install-lib
.PHONY: install-dylib install-dll clean
kvazaar.pc: kvazaar.pc.in Makefile kvazaar.pc: kvazaar.pc.in Makefile
sed -e "s;@prefix@;$(PREFIX);" -e "s;@libdir@;$(LIBDIR);" \ sed -e "s;@prefix@;$(PREFIX);" -e "s;@libdir@;$(LIBDIR);" \
-e "s;@VERSION@;$(VER_MAJOR).$(VER_MINOR).$(VER_RELEASE);" \ -e "s;@VERSION@;$(VER_MAJOR).$(VER_MINOR).$(VER_RELEASE);" \