summaryrefslogtreecommitdiffstats
path: root/src/VBox/Main/src-helper-apps/OpenGLTest/Makefile.kmk
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Main/src-helper-apps/OpenGLTest/Makefile.kmk')
-rw-r--r--src/VBox/Main/src-helper-apps/OpenGLTest/Makefile.kmk86
1 files changed, 86 insertions, 0 deletions
diff --git a/src/VBox/Main/src-helper-apps/OpenGLTest/Makefile.kmk b/src/VBox/Main/src-helper-apps/OpenGLTest/Makefile.kmk
new file mode 100644
index 00000000..0b78da5c
--- /dev/null
+++ b/src/VBox/Main/src-helper-apps/OpenGLTest/Makefile.kmk
@@ -0,0 +1,86 @@
+# $Id: Makefile.kmk $
+## @file
+# Sub-Makefile for the OpenGLTest helper app.
+#
+
+#
+# Copyright (C) 2008-2020 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
+
+
+#
+# Target lists.
+#
+LIBRARIES += VBoxOGLTest
+VBoxOGLTest_TEMPLATE = VBOXR3NP
+ifneq ($(KBUILD_TARGET),darwin)
+ VBoxOGLTest_SOURCES = OpenGLTest.cpp
+endif
+VBoxOGLTest_SOURCES.darwin = OpenGLTestDarwin.cpp
+
+#
+# VBoxTestOGL - OpenGL support test app.
+# Note! Doesn't link with VBOX_WITH_DEBUG_VCC_CRT defined because it uses Qt.
+#
+if ( defined(VBOX_WITH_QTGUI) \
+ && (defined(VBOX_WITH_VMSVGA3D) || defined(VBOX_WITH_VIDEOHWACCEL)) \
+ && !defined(VBOX_WITH_DEBUG_VCC_CRT))
+ ifneq ($(KBUILD_TARGET),darwin)
+ ifdef VBOX_WITH_VIDEOHWACCEL
+ USES += qt5
+ endif
+ PROGRAMS += VBoxTestOGL
+ VBoxTestOGL_TEMPLATE = $(if $(VBOX_WITH_VIDEOHWACCEL),$(if $(VBOX_WITH_HARDENING),VBOXQTGUI,VBOXQTGUIEXE),VBOXMAINEXE)
+ VBoxTestOGL_DEFS.win = _WIN32_WINNT=0x0500 WINDOWS=1
+ VBoxTestOGL_DEFS.linux = Linux=1 _GNU_SOURCE
+ VBoxTestOGL_DEFS.solaris = SunOS=1 _GNU_SOURCE #GLEXT_64_TYPES_DEFINED
+ VBoxTestOGL_DEFS.darwin = DARWIN=1 GL_GLEXT_LEGACY _GNU_SOURCE
+ VBoxTestOGL_DEFS.freebsd = FreeBSD=1 _GNU_SOURCE
+ VBoxTestOGL_SOURCES = OpenGLTestApp.cpp
+ VBoxTestOGL_SOURCES.win = VBoxTestOGL.rc
+ VBoxTestOGL_LIBS = \
+ $(if $(VBOX_WITH_VIDEOHWACCEL), $(PATH_STAGE_LIB)/VBoxOGL2D$(VBOX_SUFF_LIB),) \
+ $(LIB_RUNTIME)
+ VBoxTestOGL_DEFS += \
+ VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\" \
+ $(if $(VBOX_WITH_VIDEOHWACCEL), VBOX_WITH_VIDEOHWACCEL,)
+ ifdef VBOX_WITH_VIDEOHWACCEL
+ VBoxTestOGL_QT_MODULES += Core Gui OpenGL Widgets
+ VBoxTestOGL_LIBS.linux += xcb
+ VBoxTestOGL_LIBS.solaris += xcb
+ VBoxTestOGL_LIBS.freebsd += xcb
+ VBoxTestOGL_LDFLAGS.darwin += -framework OpenGL -framework IOKit
+ VBoxTestOGL_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
+ if1of ($(KBUILD_TARGET), solaris linux freebsd)
+ # must come after VBoxOGL2D, therefore don't set the arch-specific LIBS variable here!
+ VBoxTestOGL_LIBS += GL pthread dl
+ endif
+ endif
+ if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # the X11 gang
+ VBoxTestOGL_LIBS += \
+ X11 \
+ Xext
+ VBoxTestOGL_LIBPATH = \
+ $(VBOX_LIBPATH_X11)
+endif
+ # Don't let ld strip out explicitly linked libraries even when they are not needed.
+ # This was causing some dynamic library loading problems in case of indirect dependencies
+ # in systems where RUNPATH instead of RPATH is utilized.
+ VBoxTestOGL_LDFLAGS.linux = -Wl,--no-as-needed
+ VBoxTestOGL_LDFLAGS.win = /SUBSYSTEM:windows
+ endif
+endif
+
+include $(FILE_KBUILD_SUB_FOOTER)
+