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