1 | # $Id: Makefile.kmk 106455 2024-10-17 14:02:50Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the Windows guest video driver.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2011-2024 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 | ifdef VBOX_WITH_XPDM
|
---|
36 | #
|
---|
37 | # Install the inf & cat.
|
---|
38 | # This has to be done here since it depends on both the
|
---|
39 | # miniport driver and the display dll.
|
---|
40 | #
|
---|
41 | INSTALLS += VBoxVideo-inf
|
---|
42 | VBoxVideo-inf_INST = $(INST_ADDITIONS)
|
---|
43 | VBoxVideo-inf_MODE = a+r,u+w
|
---|
44 | VBoxVideo-inf_SOURCES = \
|
---|
45 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxVideo.inf
|
---|
46 | VBoxVideo-inf_SOURCES.x86 = \
|
---|
47 | $(PATH_TARGET)/VBoxVideoEarlyNTCat.dir/VBoxVideoEarlyNT.inf
|
---|
48 | VBoxVideo-inf_CLEAN = $(VBoxVideo-inf_SOURCES)
|
---|
49 | VBoxVideo-inf_BLDDIRS = $(PATH_TARGET)/VBoxVideoCat.dir
|
---|
50 | VBoxVideo-inf_BLDDIRS.x86 = $(PATH_TARGET)/VBoxVideoEarlyNTCat.dir
|
---|
51 |
|
---|
52 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxVideo.inf: $(PATH_SUB_CURRENT)/mp/xpdm/VBoxVideo.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
53 | $(call MSG_GENERATE,VBoxVideo-inf,$@,$<)
|
---|
54 | $(call VBOX_EDIT_INF_FN,$<,$@)
|
---|
55 |
|
---|
56 | $(PATH_TARGET)/VBoxVideoEarlyNTCat.dir/VBoxVideoEarlyNT.inf: $(PATH_SUB_CURRENT)/mp/xpdm/VBoxVideoEarlyNT.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
57 | $(call MSG_GENERATE,VBoxVideoEarlyNT-inf,$@,$<)
|
---|
58 | $(call VBOX_EDIT_INF_FN,$<,$@)
|
---|
59 |
|
---|
60 | if defined(VBOX_SIGNING_MODE) && defined(VBOX_SIGN_ADDITIONS)
|
---|
61 | VBoxVideo-inf_SOURCES += \
|
---|
62 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxVideo.cat \
|
---|
63 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxVideo.cat=>VBoxVideo-PreW10.cat \
|
---|
64 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxVideo.sys \
|
---|
65 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxDisp.dll
|
---|
66 | VBoxVideo-inf_SOURCES.x86 += \
|
---|
67 | $(PATH_TARGET)/VBoxVideoEarlyNTCat.dir/VBoxVideoEarlyNT.cat
|
---|
68 |
|
---|
69 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxVideo.sys \
|
---|
70 | $(PATH_TARGET)/VBoxVideoEarlyNTCat.dir/VBoxVideo.sys: $$(VBoxVideo_1_TARGET) | $$(dir $$@)
|
---|
71 | $(INSTALL) -m 644 $< $(@D)
|
---|
72 |
|
---|
73 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxDisp.dll \
|
---|
74 | $(PATH_TARGET)/VBoxVideoEarlyNTCat.dir/VBoxDisp.dll: $$(VBoxDisp_1_TARGET) | $$(dir $$@)
|
---|
75 | $(INSTALL) -m 644 $< $(@D)
|
---|
76 |
|
---|
77 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxVideo.cat: \
|
---|
78 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxVideo.inf \
|
---|
79 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxVideo.sys \
|
---|
80 | $(PATH_TARGET)/VBoxVideoCat.dir/VBoxDisp.dll
|
---|
81 | $(call MSG_TOOL,Inf2Cat,VBoxVideo-inf,$@,$<)
|
---|
82 | $(call VBOX_MAKE_CAT_FN, $(@D),$@)
|
---|
83 |
|
---|
84 | $(PATH_TARGET)/VBoxVideoEarlyNTCat.dir/VBoxVideoEarlyNT.cat: \
|
---|
85 | $(PATH_TARGET)/VBoxVideoEarlyNTCat.dir/VBoxVideoEarlyNT.inf \
|
---|
86 | $(PATH_TARGET)/VBoxVideoEarlyNTCat.dir/VBoxVideo.sys \
|
---|
87 | $(PATH_TARGET)/VBoxVideoEarlyNTCat.dir/VBoxDisp.dll
|
---|
88 | $(call MSG_TOOL,Inf2Cat,VBoxVideoEarlyNT-inf,$@,$<)
|
---|
89 | $(call VBOX_MAKE_CAT_FN, $(@D),$@)
|
---|
90 |
|
---|
91 | endif # signing
|
---|
92 | endif
|
---|
93 |
|
---|
94 | ifdef VBOX_WITH_WDDM
|
---|
95 | VBOXWDDM_WITH_DISPD3D = 1
|
---|
96 |
|
---|
97 | #
|
---|
98 | # Install the inf & cat.
|
---|
99 | # This has to be done here since it depends on both the
|
---|
100 | # miniport driver and the display dll.
|
---|
101 | #
|
---|
102 | INSTALLS += VBoxWddm-inf
|
---|
103 | VBoxWddm-inf_INST = $(INST_ADDITIONS)
|
---|
104 | VBoxWddm-inf_MODE = a+r,u+w
|
---|
105 | VBoxWddm-inf_SOURCES = \
|
---|
106 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxWddm.inf
|
---|
107 | VBoxWddm-inf_CLEAN = $(VBoxWddm-inf_SOURCES)
|
---|
108 | VBoxWddm-inf_CLEAN.amd64 = $(VBoxWddm-inf_SOURCES.amd64)
|
---|
109 | VBoxWddm-inf_BLDDIRS = $(PATH_TARGET)/VBoxWddmCat.dir
|
---|
110 |
|
---|
111 | VBOXWDDM_EDIT_INF_DISPD3D_FN_ARG = $(if $(VBOXWDDM_WITH_DISPD3D),-e 's/^;dispd3d *//', -e '/^;dispd3d /d')
|
---|
112 | VBOXWDDM_EDIT_INF_DISPDX_FN_ARG = $(if $(VBOX_WITH_WDDM_DX),-e 's/^;dispdx *//', -e '/^;dispdx /d')
|
---|
113 | VBOXWDDM_EDIT_INF_MESA3D_FN_ARG = $(if $(VBOX_WITH_MESA3D),-e 's/^;mesa3d *//', -e '/^;mesa3d /d')
|
---|
114 |
|
---|
115 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxWddm.inf: \
|
---|
116 | $(PATH_SUB_CURRENT)/mp/wddm/VBoxWddm.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
117 | $(call MSG_GENERATE,VBoxWddm-inf,$@,$<)
|
---|
118 | $(call VBOX_EDIT_INF_FN,$<,$@ $(VBOXWDDM_EDIT_INF_DISPD3D_FN_ARG) $(VBOXWDDM_EDIT_INF_DISPDX_FN_ARG) $(VBOXWDDM_EDIT_INF_MESA3D_FN_ARG))
|
---|
119 |
|
---|
120 | if defined(VBOX_SIGNING_MODE) && defined(VBOX_SIGN_ADDITIONS)
|
---|
121 | VBoxWddm-inf_SOURCES += \
|
---|
122 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxWddm.cat \
|
---|
123 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxWddm.cat=>VBoxWddm-PreW10.cat \
|
---|
124 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxWddm.sys
|
---|
125 |
|
---|
126 | ifdef VBOXWDDM_WITH_DISPD3D
|
---|
127 | VBoxWddm-inf_SOURCES += \
|
---|
128 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDispD3D.dll
|
---|
129 | VBoxWddm-inf_SOURCES.amd64 += \
|
---|
130 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDispD3D-x86.dll
|
---|
131 | endif # VBOXWDDM_WITH_DISPD3D
|
---|
132 |
|
---|
133 | ifdef VBOX_WITH_WDDM_DX
|
---|
134 | VBoxWddm-inf_SOURCES += \
|
---|
135 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDX.dll
|
---|
136 | VBoxWddm-inf_SOURCES.amd64 += \
|
---|
137 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDX-x86.dll
|
---|
138 | endif
|
---|
139 |
|
---|
140 | ifdef VBOX_WITH_MESA3D
|
---|
141 | VBoxWddm-inf_SOURCES += \
|
---|
142 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxNine.dll \
|
---|
143 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxSVGA.dll \
|
---|
144 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxGL.dll
|
---|
145 | VBoxWddm-inf_SOURCES.amd64 += \
|
---|
146 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxNine-x86.dll \
|
---|
147 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxSVGA-x86.dll \
|
---|
148 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxGL-x86.dll
|
---|
149 | endif
|
---|
150 |
|
---|
151 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxWddm.sys: $$(VBoxWddm_1_TARGET) | $$(dir $$@)
|
---|
152 | $(INSTALL) -m 644 $< $(@D)
|
---|
153 |
|
---|
154 | ifdef VBOXWDDM_WITH_DISPD3D
|
---|
155 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDispD3D.dll: $$(VBoxDispD3D_1_TARGET) | $$(dir $$@)
|
---|
156 | $(INSTALL) -m 644 $< $(@D)
|
---|
157 |
|
---|
158 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
159 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDispD3D-x86.dll: $$(VBoxDispD3D-x86_1_TARGET) | $$(dir $$@)
|
---|
160 | $(INSTALL) -m 644 $< $(@D)
|
---|
161 | endif
|
---|
162 | endif # VBOXWDDM_WITH_DISPD3D
|
---|
163 |
|
---|
164 | ifdef VBOX_WITH_WDDM_DX
|
---|
165 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDX.dll: $$(VBoxDX_1_TARGET) | $$(dir $$@)
|
---|
166 | $(INSTALL) -m 644 $< $(@D)
|
---|
167 |
|
---|
168 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
169 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDX-x86.dll: $$(VBoxDX-x86_1_TARGET) | $$(dir $$@)
|
---|
170 | $(INSTALL) -m 644 $< $(@D)
|
---|
171 | endif
|
---|
172 | endif
|
---|
173 |
|
---|
174 | ifdef VBOX_WITH_MESA3D
|
---|
175 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxNine.dll: $$(VBoxNine_1_TARGET) | $$(dir $$@)
|
---|
176 | $(INSTALL) -m 644 "$<" "$(@D)"
|
---|
177 |
|
---|
178 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxSVGA.dll: $$(VBoxSVGA_1_TARGET) | $$(dir $$@)
|
---|
179 | $(INSTALL) -m 644 "$<" "$(@D)"
|
---|
180 |
|
---|
181 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxGL.dll: $$(VBoxGL_1_TARGET) | $$(dir $$@)
|
---|
182 | $(INSTALL) -m 644 "$<" "$(@D)"
|
---|
183 |
|
---|
184 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
185 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxNine-x86.dll: $$(VBoxNine-x86_1_TARGET) | $$(dir $$@)
|
---|
186 | $(INSTALL) -m 644 $< $(@D)
|
---|
187 |
|
---|
188 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxSVGA-x86.dll: $$(VBoxSVGA-x86_1_TARGET) | $$(dir $$@)
|
---|
189 | $(INSTALL) -m 644 $< $(@D)
|
---|
190 |
|
---|
191 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxGL-x86.dll: $$(VBoxGL-x86_1_TARGET) | $$(dir $$@)
|
---|
192 | $(INSTALL) -m 644 $< $(@D)
|
---|
193 | endif
|
---|
194 | endif
|
---|
195 |
|
---|
196 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxWddm.cat: \
|
---|
197 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxWddm.inf \
|
---|
198 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxWddm.sys \
|
---|
199 | $(if $(VBOXWDDM_WITH_DISPD3D), $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDispD3D.dll, ) \
|
---|
200 | $(if $(VBOXWDDM_WITH_DISPD3D), $(if-expr "$(KBUILD_TARGET_ARCH)" == "amd64", $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDispD3D-x86.dll, ), ) \
|
---|
201 | $(if $(VBOX_WITH_WDDM_DX), $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDX.dll, ) \
|
---|
202 | $(if $(VBOX_WITH_WDDM_DX), $(if-expr "$(KBUILD_TARGET_ARCH)" == "amd64", $(PATH_TARGET)/VBoxWddmCat.dir/VBoxDX-x86.dll, ), ) \
|
---|
203 | $(if $(VBOX_WITH_MESA3D), \
|
---|
204 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxNine.dll \
|
---|
205 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxSVGA.dll \
|
---|
206 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxGL.dll \
|
---|
207 | $(if-expr "$(KBUILD_TARGET_ARCH)" == "amd64", \
|
---|
208 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxNine-x86.dll \
|
---|
209 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxSVGA-x86.dll \
|
---|
210 | $(PATH_TARGET)/VBoxWddmCat.dir/VBoxGL-x86.dll, ), )
|
---|
211 | $(call MSG_TOOL,Inf2Cat,VBoxWddm-inf,$@,$<)
|
---|
212 | $(call VBOX_MAKE_CAT_FN, $(@D),$@)
|
---|
213 | endif # signing
|
---|
214 | endif # VBOX_WITH_WDDM
|
---|
215 |
|
---|
216 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|