1 | # $Id: Makefile.kmk 98127 2023-01-19 01:54:42Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the OpenGLTest helper app.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2008-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 |
|
---|
32 | #
|
---|
33 | # VBoxOGLTest - Library that VBoxSVC is linked with.
|
---|
34 | #
|
---|
35 | # On darwin this does the whole job, while on the other platforms it just
|
---|
36 | # starts VBoxTestOGL.
|
---|
37 | #
|
---|
38 | LIBRARIES += VBoxOGLTest
|
---|
39 | VBoxOGLTest_TEMPLATE := VBOXR3
|
---|
40 | ifneq ($(KBUILD_TARGET),darwin)
|
---|
41 | VBoxOGLTest_SOURCES := OpenGLTest.cpp
|
---|
42 | else
|
---|
43 | VBoxOGLTest_SOURCES.darwin := OpenGLTestDarwin.cpp
|
---|
44 | VBoxOGLTest_CXXFLAGS.darwin = $(VBOX_GCC_Wno-deprecated-declarations)
|
---|
45 | endif
|
---|
46 |
|
---|
47 |
|
---|
48 | #
|
---|
49 | # VBoxTestOGL - OpenGL support test app.
|
---|
50 | # Note! Doesn't link with VBOX_WITH_DEBUG_VCC_CRT defined because it uses Qt.
|
---|
51 | #
|
---|
52 | if defined(VBOX_WITH_QTGUI) \
|
---|
53 | && (defined(VBOX_WITH_VMSVGA3D) || defined(VBOX_WITH_VIDEOHWACCEL)) \
|
---|
54 | && !defined(VBOX_WITH_DEBUG_VCC_CRT) \
|
---|
55 | && "$(KBUILD_TARGET)" != "darwin"
|
---|
56 | ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
57 | ifndef VBOX_WITH_QT6
|
---|
58 | USES += qt5
|
---|
59 | else
|
---|
60 | USES += qt6
|
---|
61 | endif
|
---|
62 | endif
|
---|
63 | PROGRAMS += VBoxTestOGL
|
---|
64 | VBoxTestOGL_TEMPLATE = $(if $(VBOX_WITH_VIDEOHWACCEL),$(if $(VBOX_WITH_HARDENING),VBoxQtGuiDll,VBoxQtGuiExe),VBOXMAINEXE)
|
---|
65 | VBoxTestOGL_DEFS.win = _WIN32_WINNT=0x0500 WINDOWS=1
|
---|
66 | VBoxTestOGL_DEFS.linux = Linux=1 _GNU_SOURCE
|
---|
67 | VBoxTestOGL_DEFS.solaris = SunOS=1 _GNU_SOURCE #GLEXT_64_TYPES_DEFINED
|
---|
68 | VBoxTestOGL_DEFS.freebsd = FreeBSD=1 _GNU_SOURCE
|
---|
69 | ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
|
---|
70 | VBoxTestOGL_DEFS = VBOX_BUILD_TARGET="$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)"
|
---|
71 | else
|
---|
72 | VBoxTestOGL_DEFS = VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
|
---|
73 | endif
|
---|
74 | VBoxTestOGL_SOURCES = OpenGLTestApp.cpp
|
---|
75 | VBoxTestOGL_SOURCES.win = VBoxTestOGL.rc
|
---|
76 | VBoxTestOGL_LIBS = \
|
---|
77 | $(LIB_RUNTIME)
|
---|
78 | if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # the X11 gang
|
---|
79 | VBoxTestOGL_LIBS += \
|
---|
80 | X11 \
|
---|
81 | Xext
|
---|
82 | VBoxTestOGL_LIBPATH = \
|
---|
83 | $(VBOX_LIBPATH_X11)
|
---|
84 | endif
|
---|
85 |
|
---|
86 | ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
87 | VBoxTestOGL_DEFS += VBOX_WITH_VIDEOHWACCEL
|
---|
88 | VBoxTestOGL_QT_MODULES = Core Gui OpenGL Widgets
|
---|
89 | ifdef VBOX_WITH_QT6
|
---|
90 | VBoxTestOGL_QT_MODULES += OpenGLWidgets
|
---|
91 | endif
|
---|
92 | if1of ($(KBUILD_TARGET), solaris linux freebsd)
|
---|
93 | VBoxTestOGL_LIBS += xcb GL pthread dl
|
---|
94 | endif
|
---|
95 | VBoxTestOGL_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
|
---|
96 | VBoxTestOGL_SOURCES += VBoxGLSupportInfo.cpp
|
---|
97 | endif
|
---|
98 |
|
---|
99 | # Don't let ld strip out explicitly linked libraries even when they are not needed.
|
---|
100 | # This was causing some dynamic library loading problems in case of indirect dependencies
|
---|
101 | # in systems where RUNPATH instead of RPATH is utilized.
|
---|
102 | VBoxTestOGL_LDFLAGS.linux = -Wl,--no-as-needed
|
---|
103 | VBoxTestOGL_LDFLAGS.win = /SUBSYSTEM:windows
|
---|
104 | endif
|
---|
105 |
|
---|
106 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
107 |
|
---|