summaryrefslogtreecommitdiffstats
path: root/contrib/x265
diff options
context:
space:
mode:
authorBradley Sepos <[email protected]>2017-12-26 12:28:25 -0500
committerBradley Sepos <[email protected]>2017-12-26 16:18:54 -0500
commit7ce5d9ccebbfafc453eaaf04f7c2c6cb0bf441a0 (patch)
tree97ef4a8ba877a63ebe34c582f6b39c930f6e3f7b /contrib/x265
parentd14af8b6d840ddf620a997f8c08a9af1cc1ac86e (diff)
contrib: Add universal archiver command for combining x265 libs.
Resolves an issue with GNU vs system libtool on Mac, which also does not support ar -M.
Diffstat (limited to 'contrib/x265')
-rw-r--r--contrib/x265/module.defs24
1 files changed, 10 insertions, 14 deletions
diff --git a/contrib/x265/module.defs b/contrib/x265/module.defs
index 78a5cb054..65ec70516 100644
--- a/contrib/x265/module.defs
+++ b/contrib/x265/module.defs
@@ -42,19 +42,15 @@ X265.SOURCE.libs = \
$(X265.BUILD.dir)/10bit/libx265_main10.a \
$(X265.BUILD.dir)/12bit/libx265_main12.a
-ifeq (darwin, $(BUILD.system))
- define X265.LINK
- libtool -static -o $@ $(X265.SOURCE.libs)
- endef
+ifeq (1-mingw,$(BUILD.cross)-$(BUILD.system))
+ X265.O.ext = .obj
else
- X265.arscript = $(X265.BUILD.dir)/script.ar
- define X265.LINK
- echo "CREATE $@" > $(X265.arscript)
- for a in $(X265.SOURCE.libs); do \
- (echo "ADDLIB $$a" >> $(X265.arscript)); \
- done
- echo "SAVE" >> $(X265.arscript)
- echo "END" >> $(X265.arscript)
- $(AR.exe) -M < $(X265.arscript)
- endef
+ X265.O.ext = .o
endif
+
+define X265.LINK
+ for a in $(X265.SOURCE.libs); do \
+ ($(RM.exe) -rf "$$a"_o && $(MKDIR.exe) -p "$$a"_o && $(AR.exe) x "$$a" && $(MV.exe) *$(X265.O.ext) "$$a"_o && $(AR.exe) cq $@ "$$a"_o/*$(X265.O.ext)); \
+ done
+ $(AR.exe) s $@
+endef