contrib: d3d9: get more wine
[vlc.git] / contrib / src / d3d9 / rules.mak
1 # generate Direct3D9 temporary include
2
3 ifdef HAVE_CROSS_COMPILE
4 IDL_INC_PATH = -I/usr/include/wine/windows/ -I/usr/include/wine/wine/windows/
5 else
6 #ugly way to get the default location of standard idl files
7 IDL_INC_PATH = -I/`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_pkg,$(D3D9CAPS_H_URL),d3d9)
28
29 $(TARBALLS)/d3d9.h:
30         $(call download_pkg,$(D3D9_H_URL),d3d9)
31
32 $(TARBALLS)/dxva2api.idl:
33         $(call download_pkg,$(DXVA2API_IDL_URL),d3d9)
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         cd $(TARBALLS) && patch -fp1 < $(SRC)/d3d9/d3d9caps.patch -o $@
40
41 $(DST_D3D9_H): $(TARBALLS)/d3d9.h .sum-d3d9
42         mkdir -p -- "$(PREFIX)/include/"
43         cd $(TARBALLS) && patch -fp1 < $(SRC)/d3d9/d3d9.patch -o $@
44
45 dxva2api/dxva2api.idl: .sum-d3d9
46         mkdir -p dxva2api
47         cp $(TARBALLS)/dxva2api.idl $@
48         patch -fp1 < $(SRC)/d3d9/dxva2api.patch
49
50 $(DST_DXVA2API_H): dxva2api/dxva2api.idl
51         mkdir -p -- "$(PREFIX)/include/"
52         $(WIDL) -DBOOL=WINBOOL -D_D3D9_H_ -D__C89_NAMELESS $(IDL_INCLUDES) -h -o $@ $<
53
54 .d3d9caps: $(DST_D3D9CAPS_H)
55         touch $@
56
57 .d3d9: $(DST_D3D9_H) $(DST_D3D9CAPS_H) $(DST_DXVA2API_H)
58         touch $@