1 | # $Id: Makefile.kmk 98103 2023-01-17 14:15:46Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the Windows guest video driver.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2011-2023 Oracle and/or its affiliates.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox base platform packages, as
|
---|
10 | # available from https://www.virtualbox.org.
|
---|
11 | #
|
---|
12 | # This program is free software; you can redistribute it and/or
|
---|
13 | # modify it under the terms of the GNU General Public License
|
---|
14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
15 | # License.
|
---|
16 | #
|
---|
17 | # This program is distributed in the hope that it will be useful, but
|
---|
18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | # General Public License for more details.
|
---|
21 | #
|
---|
22 | # You should have received a copy of the GNU General Public License
|
---|
23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | #
|
---|
25 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | #
|
---|
27 |
|
---|
28 | SUB_DEPTH = ../../../../../..
|
---|
29 | include $(KBUILD_PATH)/subheader.kmk
|
---|
30 |
|
---|
31 | # Include sub-makefiles.
|
---|
32 | include $(PATH_SUB_CURRENT)/mp/Makefile.kmk
|
---|
33 | include $(PATH_SUB_CURRENT)/disp/Makefile.kmk
|
---|
34 |
|
---|
35 | #
|
---|
36 | # Install the inf & cat.
|
---|
37 | # This has to be done here since it depends on both the
|
---|
38 | # miniport driver and the display dll.
|
---|
39 | #
|
---|
40 | INSTALLS += VBoxVideo-inf
|
---|
41 | VBoxVideo-inf_INST = $(INST_ADDITIONS)
|
---|
42 | VBoxVideo-inf_MODE = a+r,u+w
|
---|
43 | VBoxVideo-inf_SOURCES = \
|
---|
44 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxVideo.inf
|
---|
45 | VBoxVideo-inf_CLEAN = $(VBoxVideo-inf_SOURCES)
|
---|
46 | VBoxVideo-inf_BLDDIRS = $(PATH_TARGET)/VBoxVideoCat.dir
|
---|
47 |
|
---|
48 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxVideo.inf: $(PATH_SUB_CURRENT)/mp/xpdm/VBoxVideo.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
49 | $(call MSG_GENERATE,VBoxVideo-inf,$@,$<)
|
---|
50 | $(call VBOX_EDIT_INF_FN,$<,$@)
|
---|
51 |
|
---|
52 | if defined(VBOX_SIGNING_MODE) && defined(VBOX_SIGN_ADDITIONS)
|
---|
53 | VBoxVideo-inf_SOURCES += \
|
---|
54 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxVideo.cat \
|
---|
55 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxVideo.cat=>VBoxVideo-PreW10.cat \
|
---|
56 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxVideo.sys \
|
---|
57 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxDisp.dll
|
---|
58 |
|
---|
59 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxVideo.sys: $$(VBoxVideo_1_TARGET) | $$(dir $$@)
|
---|
60 | $(INSTALL) -m 644 $< $(@D)
|
---|
61 |
|
---|
62 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxDisp.dll: $$(VBoxDisp_1_TARGET) | $$(dir $$@)
|
---|
63 | $(INSTALL) -m 644 $< $(@D)
|
---|
64 |
|
---|
65 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxVideo.cat: \
|
---|
66 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxVideo.inf \
|
---|
67 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxVideo.sys \
|
---|
68 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxDisp.dll
|
---|
69 | $(call MSG_TOOL,Inf2Cat,VBoxVideo-inf,$@,$<)
|
---|
70 | $(call VBOX_MAKE_CAT_FN, $(@D),$@)
|
---|
71 | endif # signing
|
---|
72 |
|
---|
73 | ifdef VBOX_WITH_WDDM
|
---|
74 | VBOXWDDM_WITH_DISPD3D = 1
|
---|
75 |
|
---|
76 | #
|
---|
77 | # Install the inf & cat.
|
---|
78 | # This has to be done here since it depends on both the
|
---|
79 | # miniport driver and the display dll.
|
---|
80 | #
|
---|
81 | INSTALLS += VBoxWddm-inf
|
---|
82 | VBoxWddm-inf_INST = $(INST_ADDITIONS)
|
---|
83 | VBoxWddm-inf_MODE = a+r,u+w
|
---|
84 | VBoxWddm-inf_SOURCES = \
|
---|
85 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxWddm.inf
|
---|
86 | VBoxWddm-inf_CLEAN = $(VBoxWddm-inf_SOURCES)
|
---|
87 | VBoxWddm-inf_CLEAN.amd64 = $(VBoxWddm-inf_SOURCES.amd64)
|
---|
88 | VBoxWddm-inf_BLDDIRS = $(PATH_TARGET)/VBoxWddmCat.dir
|
---|
89 |
|
---|
90 | VBOXWDDM_EDIT_INF_DISPD3D_FN_ARG = $(if $(VBOXWDDM_WITH_DISPD3D),-e 's/^;dispd3d *//', -e '/^;dispd3d /d')
|
---|
91 | VBOXWDDM_EDIT_INF_DISPDX_FN_ARG = $(if $(VBOX_WITH_WDDM_DX),-e 's/^;dispdx *//', -e '/^;dispdx /d')
|
---|
92 | VBOXWDDM_EDIT_INF_MESA3D_FN_ARG = $(if $(VBOX_WITH_MESA3D),-e 's/^;mesa3d *//', -e '/^;mesa3d /d')
|
---|
93 |
|
---|
94 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxWddm.inf: \
|
---|
95 | $(PATH_SUB_CURRENT)/mp/wddm/VBoxWddm.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
96 | $(call MSG_GENERATE,VBoxWddm-inf,$@,$<)
|
---|
97 | $(call VBOX_EDIT_INF_FN,$<,$@ $(VBOXWDDM_EDIT_INF_DISPD3D_FN_ARG) $(VBOXWDDM_EDIT_INF_DISPDX_FN_ARG) $(VBOXWDDM_EDIT_INF_MESA3D_FN_ARG))
|
---|
98 |
|
---|
99 | if defined(VBOX_SIGNING_MODE) && defined(VBOX_SIGN_ADDITIONS)
|
---|
100 | VBoxWddm-inf_SOURCES += \
|
---|
101 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxWddm.cat \
|
---|
102 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxWddm.cat=>VBoxWddm-PreW10.cat \
|
---|
103 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxWddm.sys
|
---|
104 |
|
---|
105 | ifdef VBOXWDDM_WITH_DISPD3D
|
---|
106 | VBoxWddm-inf_SOURCES += \
|
---|
107 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDispD3D.dll
|
---|
108 | VBoxWddm-inf_SOURCES.amd64 += \
|
---|
109 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDispD3D-x86.dll
|
---|
110 | endif # VBOXWDDM_WITH_DISPD3D
|
---|
111 |
|
---|
112 | ifdef VBOX_WITH_WDDM_DX
|
---|
113 | VBoxWddm-inf_SOURCES += \
|
---|
114 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDX.dll
|
---|
115 | VBoxWddm-inf_SOURCES.amd64 += \
|
---|
116 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDX-x86.dll
|
---|
117 | endif
|
---|
118 |
|
---|
119 | ifdef VBOX_WITH_MESA3D
|
---|
120 | VBoxWddm-inf_SOURCES += \
|
---|
121 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxNine.dll \
|
---|
122 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxSVGA.dll \
|
---|
123 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxGL.dll
|
---|
124 | VBoxWddm-inf_SOURCES.amd64 += \
|
---|
125 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxNine-x86.dll \
|
---|
126 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxSVGA-x86.dll \
|
---|
127 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxGL-x86.dll
|
---|
128 | endif
|
---|
129 |
|
---|
130 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxWddm.sys: $$(VBoxWddm_1_TARGET) | $$(dir $$@)
|
---|
131 | $(INSTALL) -m 644 $< $(@D)
|
---|
132 |
|
---|
133 | ifdef VBOXWDDM_WITH_DISPD3D
|
---|
134 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDispD3D.dll: $$(VBoxDispD3D_1_TARGET) | $$(dir $$@)
|
---|
135 | $(INSTALL) -m 644 $< $(@D)
|
---|
136 |
|
---|
137 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
138 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDispD3D-x86.dll: $$(VBoxDispD3D-x86_1_TARGET) | $$(dir $$@)
|
---|
139 | $(INSTALL) -m 644 $< $(@D)
|
---|
140 | endif
|
---|
141 | endif # VBOXWDDM_WITH_DISPD3D
|
---|
142 |
|
---|
143 | ifdef VBOX_WITH_WDDM_DX
|
---|
144 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDX.dll: $$(VBoxDX_1_TARGET) | $$(dir $$@)
|
---|
145 | $(INSTALL) -m 644 $< $(@D)
|
---|
146 |
|
---|
147 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
148 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDX-x86.dll: $$(VBoxDX-x86_1_TARGET) | $$(dir $$@)
|
---|
149 | $(INSTALL) -m 644 $< $(@D)
|
---|
150 | endif
|
---|
151 | endif
|
---|
152 |
|
---|
153 | ifdef VBOX_WITH_MESA3D
|
---|
154 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxNine.dll: $$(VBoxNine_1_TARGET) | $$(dir $$@)
|
---|
155 | $(INSTALL) -m 644 "$<" "$(@D)"
|
---|
156 |
|
---|
157 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxSVGA.dll: $$(VBoxSVGA_1_TARGET) | $$(dir $$@)
|
---|
158 | $(INSTALL) -m 644 "$<" "$(@D)"
|
---|
159 |
|
---|
160 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxGL.dll: $$(VBoxGL_1_TARGET) | $$(dir $$@)
|
---|
161 | $(INSTALL) -m 644 "$<" "$(@D)"
|
---|
162 |
|
---|
163 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
164 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxNine-x86.dll: $$(VBoxNine-x86_1_TARGET) | $$(dir $$@)
|
---|
165 | $(INSTALL) -m 644 $< $(@D)
|
---|
166 |
|
---|
167 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxSVGA-x86.dll: $$(VBoxSVGA-x86_1_TARGET) | $$(dir $$@)
|
---|
168 | $(INSTALL) -m 644 $< $(@D)
|
---|
169 |
|
---|
170 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxGL-x86.dll: $$(VBoxGL-x86_1_TARGET) | $$(dir $$@)
|
---|
171 | $(INSTALL) -m 644 $< $(@D)
|
---|
172 | endif
|
---|
173 | endif
|
---|
174 |
|
---|
175 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxWddm.cat: \
|
---|
176 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxWddm.inf \
|
---|
177 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxWddm.sys \
|
---|
178 | $(if $(VBOXWDDM_WITH_DISPD3D), $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDispD3D.dll, ) \
|
---|
179 | $(if $(VBOXWDDM_WITH_DISPD3D), $(if-expr "$(KBUILD_TARGET_ARCH)" == "amd64", $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDispD3D-x86.dll, ), ) \
|
---|
180 | $(if $(VBOX_WITH_WDDM_DX), $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDX.dll, ) \
|
---|
181 | $(if $(VBOX_WITH_WDDM_DX), $(if-expr "$(KBUILD_TARGET_ARCH)" == "amd64", $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDX-x86.dll, ), ) \
|
---|
182 | $(if $(VBOX_WITH_MESA3D), \
|
---|
183 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxNine.dll \
|
---|
184 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxSVGA.dll \
|
---|
185 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxGL.dll \
|
---|
186 | $(if-expr "$(KBUILD_TARGET_ARCH)" == "amd64", \
|
---|
187 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxNine-x86.dll \
|
---|
188 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxSVGA-x86.dll \
|
---|
189 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxGL-x86.dll, ), )
|
---|
190 | $(call MSG_TOOL,Inf2Cat,VBoxWddm-inf,$@,$<)
|
---|
191 | $(call VBOX_MAKE_CAT_FN, $(@D),$@)
|
---|
192 | endif # signing
|
---|
193 | endif # VBOX_WITH_WDDM
|
---|
194 |
|
---|
195 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|