diff options
Diffstat (limited to 'contrib/x265/module.defs')
-rw-r--r-- | contrib/x265/module.defs | 65 |
1 files changed, 42 insertions, 23 deletions
diff --git a/contrib/x265/module.defs b/contrib/x265/module.defs index a2df551ab..5b28b8cac 100644 --- a/contrib/x265/module.defs +++ b/contrib/x265/module.defs @@ -1,4 +1,4 @@ -__deps__ := YASM CMAKE +__deps__ := YASM CMAKE X265_8 X265_10 X265_12 $(eval $(call import.MODULE.defs,X265,x265,$(__deps__))) $(eval $(call import.CONTRIB.defs,X265)) @@ -7,30 +7,19 @@ X265.FETCH.url += https://bitbucket.org/multicoreware/x265/downloads/x265_2.5 X265.FETCH.url += https://download.videolan.org/pub/videolan/x265/x265_2.5.tar.gz X265.FETCH.sha256 = 2e53259b504a7edb9b21b9800163b1ff4c90e60c74e23e7001d423c69c5d3d17 -X265.CONFIGURE.exe = cmake -X265.CONFIGURE.args.prefix = -DCMAKE_INSTALL_PREFIX="$(X265.CONFIGURE.prefix)" -X265.CONFIGURE.deps = -X265.CONFIGURE.static = -X265.CONFIGURE.shared = -DENABLE_SHARED=OFF -X265.CONFIGURE.extra = -DENABLE_CLI=OFF -DHIGH_BIT_DEPTH=OFF -DENABLE_LIBNUMA=OFF +# Silence "warning: overriding recipe for target" messages +X265.FETCH.target = -ifneq (none,$(X265.GCC.g)) - X265.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Debug -endif +X265.INSTALL.args.dir = -j 1 -C $(X265.BUILD.dir)/8bit install; +X265.INSTALL.extra = $(CP.exe) $(X265.BUILD.dir)/libx265.a $(CONTRIB.build/)lib +X265.INSTALL.args = !make @dir !extra -ifeq (1,$(BUILD.cross)) - ifeq (mingw,$(BUILD.system)) - X265.CONFIGURE.extra += -DWIN32=ON - endif - X265.CONFIGURE.args.host = -DCMAKE_SYSTEM_NAME="$(X265.CONFIGURE.host)" - X265.CONFIGURE.args.build = -DCMAKE_HOST_SYSTEM="$(X265.CONFIGURE.build)" -else - X265.CONFIGURE.args.host = -DCMAKE_HOST_SYSTEM="$(X265.CONFIGURE.host)" - ifeq (1,$(FEATURE.local_yasm)) - X265.CONFIGURE.env.LOCAL_PATH = PATH="$(call fn.ABSOLUTE,$(CONTRIB.build/)bin):$(PATH)" - X265.BUILD.env = PATH="$(call fn.ABSOLUTE,$(CONTRIB.build/)bin):$(PATH)" - endif -endif +X265.UNINSTALL.dir = $(X265.BUILD.dir)/8bit + +X265.CLEAN.make = $(RM.exe) +X265.CLEAN.args.dir = cd $(1); +X265.CLEAN.extra = libx265.a +X265.CLEAN.args = @dir !make !extra ## find CMakeLists.txt X265.CONFIGURE.extra += "$(call fn.ABSOLUTE,$(X265.EXTRACT.dir/)source/)" @@ -38,3 +27,33 @@ X265.CONFIGURE.extra += "$(call fn.ABSOLUTE,$(X265.EXTRACT.dir/)source/)" ## optional static libs need to be marked X265.OSL.libs = x265 X265.OSL.files = $(foreach i,$(X265.OSL.libs),$(call fn.ABSOLUTE,$(CONTRIB.build/)lib/lib$(i).a)) + +# Override operations that are not needed +X265.FETCH = +X265.VERIFY = $(TOUCH.exe) $@ +X265.EXTRACT = $(TOUCH.exe) $@ +X265.PATCH = $(TOUCH.exe) $@ +X265.CONFIGURE = $(TOUCH.exe) $@ +X265.BUILD = $(TOUCH.exe) $@ + +X265.SOURCE.libs = \ + $(X265.BUILD.dir)/8bit/libx265_main.a \ + $(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 +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 +endif |