summaryrefslogtreecommitdiffstats
path: root/src/VBox/Additions/3D/win/VBoxICD/Makefile.kmk
blob: cba30d10ae4820a22cdf4391cebaf6a2a445daf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# $Id: Makefile.kmk $
## @file
# Sub-Makefile for OpenGL ICD loader.
#

#
# Copyright (C) 2018-2019 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#

SUB_DEPTH = ../../../../../..
include $(KBUILD_PATH)/subheader.kmk

VBOX_GL_ICD_DEF_FILE = $(VBOX_PATH_MESA)/src/gallium/state_trackers/wgl/opengl32.mingw.def

DLLS       += VBoxICD
DLLS.amd64 += VBoxICD-x86

VBoxICD_TEMPLATE = VBoxMesa3DGuestR3DllMinVista
# -wd4005: '__useHeader' : redefinition
VBoxICD_CFLAGS   = -wd4005
VBoxICD_INCS     = \
	$(VBOX_PATH_3D)/win/include \
	$(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video \
	$(VBOX_GRAPHICS_INCS)
VBoxICD_SOURCES  = \
	$(VBOX_PATH_MESA)/src/gallium/state_trackers/wgl/opengl32.def \
	$(VBoxICD_0_OUTDIR)/forwarders.asm \
	$(VBoxICD_0_OUTDIR)/pfns.c \
	VBoxICD.c \
	VBoxICD.rc
VBoxICD_CLEAN    = \
	$(VBoxICD_0_OUTDIR)/forwarders.asm \
	$(VBoxICD_0_OUTDIR)/pfns.c
VBoxICD_LIBS     = \
	$(VBOX_PATH_ADDITIONS_LIB)/VBoxWddmUmHlp$(VBOX_SUFF_LIB)

$$(VBoxICD_0_OUTDIR)/forwarders.asm: \
		$(PATH_SUB_CURRENT)/icd_forwarders.py $(VBOX_GL_ICD_DEF_FILE) | $$(dir $$@)
	$(call MSG_GENERATE,python,$@,$(VBOX_GL_ICD_DEF_FILE))
	$(QUIET)$(VBOX_BLD_PYTHON) $< $(VBOX_GL_ICD_DEF_FILE) $@
$$(VBoxICD_0_OUTDIR)/pfns.c: \
		$(PATH_SUB_CURRENT)/icd_pfns.py $(VBOX_GL_ICD_DEF_FILE) | $$(dir $$@)
	$(call MSG_GENERATE,python,$@,$(VBOX_GL_ICD_DEF_FILE))
	$(QUIET)$(VBOX_BLD_PYTHON) $< $(VBOX_GL_ICD_DEF_FILE) $@

ifdef VBOX_SIGN_ADDITIONS
VBoxICD_INSTTYPE       = none
VBoxICD_DEBUG_INSTTYPE = both
endif

#
# x86 version built for amd64 build
#
VBoxICD-x86_EXTENDS      = VBoxICD
VBoxICD-x86_BLD_TRG_ARCH = x86
VBoxICD-x86_LIBS         = \
	$(VBOX_PATH_ADDITIONS_LIB)/VBoxWddmUmHlp-x86$(VBOX_SUFF_LIB)
VBoxICD-x86_DEFS         = $(VBoxICD_DEFS) VBOX_WOW64

include $(FILE_KBUILD_SUB_FOOTER)