summaryrefslogtreecommitdiffstats
path: root/contrib/x265_8bit/module.defs
blob: d2d56dcd3c8897d11607d364c1416152ac04da91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
__deps__ := 
$(eval $(call import.MODULE.defs,X265_8,x265_8,$(__deps__),x265))
$(eval $(call import.CONTRIB.defs,X265_8))

X265_8.FETCH.url     = https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs/x265_3.2.1.tar.gz
X265_8.FETCH.url    += https://download.videolan.org/pub/videolan/x265/x265_3.2.1.tar.gz
X265_8.FETCH.sha256  = fb9badcf92364fd3567f8b5aa0e5e952aeea7a39a2b864387cec31e3b58cbbcc
X265_8.EXTRACT.tarbase = x265_3.2.1

X265_8.build_dir             = 8bit
X265_8.CONFIGURE.exe         = cmake
X265_8.CONFIGURE.args.prefix = -DCMAKE_INSTALL_PREFIX="$(X265_8.CONFIGURE.prefix)"
X265_8.CONFIGURE.deps        =
X265_8.CONFIGURE.static      =
X265_8.CONFIGURE.shared      = -DENABLE_SHARED=OFF
X265_8.CONFIGURE.extra       = -DENABLE_CLI=OFF -DHIGH_BIT_DEPTH=OFF -DEXTRA_LIB="x265_main10.a;x265_main12.a" -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT=ON -DLINKED_12BIT=ON

ifneq (1,$(FEATURE.numa))
    X265_8.CONFIGURE.extra  += -DENABLE_LIBNUMA=OFF
endif

ifeq (size-aggressive,$(GCC.O))
    X265_8.CONFIGURE.extra += -DCMAKE_CXX_FLAGS_MINSIZEREL="-Oz -DNDEBUG" -DCMAKE_C_FLAGS_MINSIZEREL="-Oz -DNDEBUG"
endif

ifeq (darwin,$(HOST.system))
    X265_8.CONFIGURE.extra += -DCMAKE_OSX_ARCHITECTURES=$(HOST.machine)
endif

ifeq ($(GCC.O),$(filter $(GCC.O),size size-aggressive))
    X265_8.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=MinSizeRel
else
    ifneq (none,$(X265_8.GCC.g))
        X265_8.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Debug
    else
        X265_8.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Release
    endif
endif

ifeq (1,$(HOST.cross))
    ifeq (mingw,$(HOST.system))
        X265_8.CONFIGURE.extra += -DWIN32=ON
        X265_8.CONFIGURE.extra += -DCMAKE_SYSTEM_NAME=Windows
        X265_8.CONFIGURE.extra += -DCMAKE_C_COMPILER=$(X265_8.GCC.gcc)
        X265_8.CONFIGURE.extra += -DCMAKE_C_FLAGS="-static-libgcc -static-libstdc++ -static"
        X265_8.CONFIGURE.extra += -DCMAKE_SHARED_LIBRARY_LINK_C_FLAGS="-static-libgcc -static-libstdc++ -static"
        X265_8.CONFIGURE.extra += -DCMAKE_CXX_COMPILER=$(X265_8.GCC.gxx)
        X265_8.CONFIGURE.extra += -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++ -static"
        X265_8.CONFIGURE.extra += -DCMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS="-static-libgcc -static-libstdc++ -static"
        X265_8.CONFIGURE.extra += -DCMAKE_RC_COMPILER=$(HOST.cross.prefix)windres
    else ifeq ($(HOST.system),darwin)
        X265_8.CONFIGURE.args.host = -DCMAKE_HOST_SYSTEM="$(X265_8.CONFIGURE.host)"
    else
        X265_8.CONFIGURE.args.host = -DCMAKE_SYSTEM_NAME="$(X265_8.CONFIGURE.host)"
    endif
    X265_8.CONFIGURE.args.build = -DCMAKE_HOST_SYSTEM="$(X265_8.CONFIGURE.build)"
    X265_8.CONFIGURE.extra     += -DCMAKE_SYSTEM_PROCESSOR=$(HOST.machine)
else
    X265_8.CONFIGURE.args.host  = -DCMAKE_HOST_SYSTEM="$(X265_8.CONFIGURE.host)"
endif

## find CMakeLists.txt
X265_8.CONFIGURE.extra += "$(call fn.ABSOLUTE,$(X265_8.EXTRACT.dir/)source/)"

X265_8.INSTALL.make = $(MV.exe)
X265_8.INSTALL.args.dir = cd $(1);
X265_8.INSTALL.extra = libx265.a libx265_main.a
X265_8.INSTALL.args = @dir !make !extra

# Override operations that are not needed
X265_8.XCLEAN =