VirtualBox

source: vbox/trunk/src/VBox/Main/src-helper-apps/OpenGLTest/Makefile.kmk@ 91575

Last change on this file since 91575 was 85717, checked in by vboxsync, 4 years ago

OpenGLTest/Makefile.kmk: Only build VBoxOGL2D when needed, so we can successfully disable all Qt bits in the build.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.6 KB
Line 
1# $Id: Makefile.kmk 85717 2020-08-12 14:21:54Z vboxsync $
2## @file
3# Sub-Makefile for the OpenGLTest helper app.
4#
5
6#
7# Copyright (C) 2008-2020 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18SUB_DEPTH = ../../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21
22#
23# Target lists.
24#
25LIBRARIES += VBoxOGLTest
26ifneq ($(KBUILD_TARGET),darwin)
27## @todo r=bird: Why VBOXR3NP?
28VBoxOGLTest_TEMPLATE = VBOXR3NP
29VBoxOGLTest_SOURCES = OpenGLTest.cpp
30else
31VBoxOGLTest_TEMPLATE = VBoxR3Dll
32VBoxOGLTest_SOURCES.darwin = OpenGLTestDarwin.cpp
33VBoxOGLTest_CXXFLAGS.darwin = $(VBOX_GCC_Wno-deprecated-declarations)
34endif
35
36#
37# VBoxTestOGL - OpenGL support test app.
38# Note! Doesn't link with VBOX_WITH_DEBUG_VCC_CRT defined because it uses Qt.
39#
40if ( defined(VBOX_WITH_QTGUI) \
41 && (defined(VBOX_WITH_VMSVGA3D) || defined(VBOX_WITH_VIDEOHWACCEL)) \
42 && !defined(VBOX_WITH_DEBUG_VCC_CRT))
43 ifneq ($(KBUILD_TARGET),darwin)
44
45 ifdef VBOX_WITH_VIDEOHWACCEL
46 USES += qt5
47 endif
48 PROGRAMS += VBoxTestOGL
49 VBoxTestOGL_TEMPLATE = $(if $(VBOX_WITH_VIDEOHWACCEL),$(if $(VBOX_WITH_HARDENING),VBOXQTGUI,VBOXQTGUIEXE),VBOXMAINEXE)
50 VBoxTestOGL_DEFS.win = _WIN32_WINNT=0x0500 WINDOWS=1
51 VBoxTestOGL_DEFS.linux = Linux=1 _GNU_SOURCE
52 VBoxTestOGL_DEFS.solaris = SunOS=1 _GNU_SOURCE #GLEXT_64_TYPES_DEFINED
53 VBoxTestOGL_DEFS.freebsd = FreeBSD=1 _GNU_SOURCE
54 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
55 VBoxTestOGL_DEFS = VBOX_BUILD_TARGET="$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)"
56 else
57 VBoxTestOGL_DEFS = VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
58 endif
59 VBoxTestOGL_SOURCES = OpenGLTestApp.cpp
60 VBoxTestOGL_SOURCES.win = VBoxTestOGL.rc
61 VBoxTestOGL_LIBS = $(LIB_RUNTIME)
62 ifdef VBOX_WITH_VIDEOHWACCEL
63 VBoxTestOGL_DEFS += VBOX_WITH_VIDEOHWACCEL
64 VBoxTestOGL_LIBS <= $(PATH_STAGE_LIB)/VBoxOGL2D$(VBOX_SUFF_LIB)
65 VBoxTestOGL_QT_MODULES += Core Gui OpenGL Widgets
66 VBoxTestOGL_LIBS.linux += xcb
67 VBoxTestOGL_LIBS.solaris += xcb
68 VBoxTestOGL_LIBS.freebsd += xcb
69 VBoxTestOGL_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
70 if1of ($(KBUILD_TARGET), solaris linux freebsd)
71 # must come after VBoxOGL2D, therefore don't set the arch-specific LIBS variable here!
72 VBoxTestOGL_LIBS += GL pthread dl
73 endif
74 ## @todo not sure why this is a separate library, but whatever.
75 LIBRARIES += VBoxOGL2D
76 VBoxOGL2D_TEMPLATE = $(if $(VBOX_WITH_VIDEOHWACCEL),$(if $(VBOX_WITH_HARDENING),VBOXQTGUI,VBOXQTGUIEXE),VBOXMAINEXE)
77 VBoxOGL2D_DEFS = QT_NO_DEBUG QT_THREAD_SUPPORT QT_SHARED HAVE_CONFIG_H VBOX_WITH_VIDEOHWACCEL VBOX_GUI_USE_QGL
78 VBoxOGL2D_QT_MODULES += OpenGL
79 VBoxOGL2D_SOURCES = VBoxGLSupportInfo.cpp
80 endif
81 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # the X11 gang
82 VBoxTestOGL_LIBS += \
83 X11 \
84 Xext
85 VBoxTestOGL_LIBPATH = \
86 $(VBOX_LIBPATH_X11)
87 endif
88
89 # Don't let ld strip out explicitly linked libraries even when they are not needed.
90 # This was causing some dynamic library loading problems in case of indirect dependencies
91 # in systems where RUNPATH instead of RPATH is utilized.
92 VBoxTestOGL_LDFLAGS.linux = -Wl,--no-as-needed
93 VBoxTestOGL_LDFLAGS.win = /SUBSYSTEM:windows
94
95 endif # KBUILD_TARGET != darwin
96endif
97
98include $(FILE_KBUILD_SUB_FOOTER)
99
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette