summaryrefslogtreecommitdiffstats
path: root/contrib/x265/module.defs
blob: 78a5cb054a172e91ec5a096092cbffbe2d313a73 (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
__deps__ := YASM CMAKE X265_8 X265_10 X265_12
$(eval $(call import.MODULE.defs,X265,x265,$(__deps__)))
$(eval $(call import.CONTRIB.defs,X265))

X265.FETCH.url     = https://download.handbrake.fr/contrib/x265_2.6.tar.gz
X265.FETCH.url    += https://bitbucket.org/multicoreware/x265/downloads/x265_2.6.tar.gz
X265.FETCH.url    += https://download.videolan.org/pub/videolan/x265/x265_2.6.tar.gz
X265.FETCH.sha256  = 1bf0036415996af841884802161065b9e6be74f5f6808ac04831363e2549cdbf
X265.EXTRACT.tarbase = x265_v2.6

# Silence "warning: overriding recipe for target" messages
X265.FETCH.target =

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

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/)"

## 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