mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-24 02:24:07 +00:00
Merge pull request #116 from darealshinji/shared-target
Make dynamic linking easier
This commit is contained in:
commit
9870dd04bc
10
src/Makefile
10
src/Makefile
|
@ -1,6 +1,6 @@
|
||||||
# Simple Makefile for Kvazaar HEVC encoder
|
# Simple Makefile for Kvazaar HEVC encoder
|
||||||
|
|
||||||
all: cli lib-shared
|
all: cli lib-static lib-shared
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
|
|
||||||
# Installation locations
|
# Installation locations
|
||||||
|
@ -259,6 +259,12 @@ 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)
|
||||||
|
|
||||||
|
ifdef LINK_SHARED
|
||||||
|
LINKLIB = $(LIBKVAZAAR_SHARED)
|
||||||
|
else
|
||||||
|
LINKLIB = $(STATIC)
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: cli lib-shared lib-static debug tests build_tests
|
.PHONY: cli lib-shared lib-static debug tests build_tests
|
||||||
cli: $(PROG)
|
cli: $(PROG)
|
||||||
lib-shared: $(LIBKVAZAAR_SHARED)
|
lib-shared: $(LIBKVAZAAR_SHARED)
|
||||||
|
@ -281,7 +287,7 @@ $(DYLIB): LDFLAGS += -dynamiclib \
|
||||||
-compatibility_version $(VER_MAJOR) \
|
-compatibility_version $(VER_MAJOR) \
|
||||||
-install_name $(LIBDIR)/$@
|
-install_name $(LIBDIR)/$@
|
||||||
|
|
||||||
$(PROG): $(MAIN_OBJS) $(STATIC)
|
$(PROG): $(MAIN_OBJS) $(LINKLIB)
|
||||||
$(LD) $^ $(LDFLAGS) $(LIBS) -o $@
|
$(LD) $^ $(LDFLAGS) $(LIBS) -o $@
|
||||||
|
|
||||||
$(STATIC): $(OBJS)
|
$(STATIC): $(OBJS)
|
||||||
|
|
Loading…
Reference in a new issue