contrib: d3d9: patch dxva2api.idl to get IDirectXVideoProcessor
[vlc.git] / contrib / src / d3d9 / rules.mak
1 # generate Direct3D9 temporary include
2
3 ifdef HAVE_CROSS_COMPILE
4 IDL_INC_PATH = /usr/include/wine/windows/
5 else
6 #ugly way to get the default location of standard idl files
7 IDL_INC_PATH = /`echo $(MSYSTEM) | tr A-Z a-z`/$(BUILD)/include
8 endif
9
10 D3D9CAPS_COMMIT_ID := 477108e5706e73421634436c21cb76e1795b3609
11 DXVA2API_COMMIT_ID := 67bb96f54d720ca9e5aaa5da7d385348e0bfac31
12 D3D9CAPS_H_URL := http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(D3D9CAPS_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/d3d9caps.h?format=raw
13 D3D9_H_URL := http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(D3D9CAPS_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/d3d9.h?format=raw
14 DXVA2API_IDL_URL := https://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(DXVA2API_COMMIT_ID)/tree/mingw-w64-headers/include/dxva2api.idl?format=raw
15 DST_D3D9CAPS_H = $(PREFIX)/include/d3d9caps.h
16 DST_D3D9_H = $(PREFIX)/include/d3d9.h
17 DST_DXVA2API_H = $(PREFIX)/include/dxva2api.h
18
19
20 ifdef HAVE_WIN32
21 ifndef HAVE_VISUALSTUDIO
22 PKGS += d3d9
23 endif
24 endif
25
26 $(TARBALLS)/d3d9caps.h:
27         $(call download,$(D3D9CAPS_H_URL))
28
29 $(TARBALLS)/d3d9.h:
30         $(call download,$(D3D9_H_URL))
31
32 $(TARBALLS)/dxva2api.idl:
33         $(call download,$(DXVA2API_IDL_URL))
34
35 .sum-d3d9: $(TARBALLS)/d3d9caps.h $(TARBALLS)/d3d9.h $(TARBALLS)/dxva2api.idl
36
37 $(DST_D3D9CAPS_H): $(TARBALLS)/d3d9caps.h .sum-d3d9
38         mkdir -p -- "$(PREFIX)/include/"
39         cp $(TARBALLS)/d3d9caps.h $@ && cd "$(PREFIX)/include/" && patch -fp1 < ../$(SRC)/d3d9/d3d9caps.patch
40
41 $(DST_D3D9_H): $(TARBALLS)/d3d9.h .sum-d3d9
42         mkdir -p -- "$(PREFIX)/include/"
43         cp $(TARBALLS)/d3d9.h $@ && cd "$(PREFIX)/include/" && patch -fp1 < ../$(SRC)/d3d9/d3d9.patch
44
45 dxva2api: .sum-d3d9
46         mkdir -p $@
47         cp $(TARBALLS)/dxva2api.idl $@ && cd $@ && patch -fp1 < ../$(SRC)/d3d9/dxva2api.patch
48
49 $(DST_DXVA2API_H): dxva2api
50         mkdir -p -- "$(PREFIX)/include/"
51         $(WIDL) -DBOOL=WINBOOL -D_D3D9_H_ -D__C89_NAMELESS -I$(IDL_INC_PATH) -h -o $@ $</dxva2api.idl
52
53 .d3d9caps: $(DST_D3D9CAPS_H)
54         touch $@
55
56 .d3d9: $(DST_D3D9_H) $(DST_D3D9CAPS_H) $(DST_DXVA2API_H)
57         touch $@