1 | # $Id: Makefile.kmk 80368 2019-08-21 11:40:44Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the OpenGLTest helper app.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2008-2019 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 |
|
---|
18 | SUB_DEPTH = ../../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 |
|
---|
22 | #
|
---|
23 | # Target lists.
|
---|
24 | #
|
---|
25 | LIBRARIES += VBoxOGLTest
|
---|
26 | VBoxOGLTest_TEMPLATE = VBOXR3NP
|
---|
27 | ifneq ($(KBUILD_TARGET),darwin)
|
---|
28 | VBoxOGLTest_SOURCES = OpenGLTest.cpp
|
---|
29 | endif
|
---|
30 | VBoxOGLTest_SOURCES.darwin = OpenGLTestDarwin.cpp
|
---|
31 |
|
---|
32 | #
|
---|
33 | # VBoxTestOGL - OpenGL support test app.
|
---|
34 | # Note! Doesn't link with VBOX_WITH_DEBUG_VCC_CRT defined because it uses Qt.
|
---|
35 | #
|
---|
36 | if ( defined(VBOX_WITH_QTGUI) \
|
---|
37 | && (defined(VBOX_WITH_VMSVGA3D) || defined(VBOX_WITH_VIDEOHWACCEL)) \
|
---|
38 | && !defined(VBOX_WITH_DEBUG_VCC_CRT))
|
---|
39 | ifneq ($(KBUILD_TARGET),darwin)
|
---|
40 | ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
41 | USES += qt5
|
---|
42 | endif
|
---|
43 | PROGRAMS += VBoxTestOGL
|
---|
44 | VBoxTestOGL_TEMPLATE = $(if $(VBOX_WITH_VIDEOHWACCEL),$(if $(VBOX_WITH_HARDENING),VBOXQTGUI,VBOXQTGUIEXE),VBOXMAINEXE)
|
---|
45 | VBoxTestOGL_DEFS.win = _WIN32_WINNT=0x0500 WINDOWS=1
|
---|
46 | VBoxTestOGL_DEFS.linux = Linux=1 _GNU_SOURCE
|
---|
47 | VBoxTestOGL_DEFS.solaris = SunOS=1 _GNU_SOURCE #GLEXT_64_TYPES_DEFINED
|
---|
48 | VBoxTestOGL_DEFS.darwin = DARWIN=1 GL_GLEXT_LEGACY _GNU_SOURCE
|
---|
49 | VBoxTestOGL_DEFS.freebsd = FreeBSD=1 _GNU_SOURCE
|
---|
50 | VBoxTestOGL_SOURCES = OpenGLTestApp.cpp
|
---|
51 | VBoxTestOGL_SOURCES.win = VBoxTestOGL.rc
|
---|
52 | VBoxTestOGL_LIBS = \
|
---|
53 | $(if $(VBOX_WITH_VIDEOHWACCEL), $(PATH_STAGE_LIB)/VBoxOGL2D$(VBOX_SUFF_LIB),) \
|
---|
54 | $(LIB_RUNTIME)
|
---|
55 | VBoxTestOGL_DEFS += \
|
---|
56 | VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\" \
|
---|
57 | $(if $(VBOX_WITH_VIDEOHWACCEL), VBOX_WITH_VIDEOHWACCEL,)
|
---|
58 | ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
59 | VBoxTestOGL_QT_MODULES += Core Gui OpenGL Widgets
|
---|
60 | VBoxTestOGL_LIBS.linux += xcb
|
---|
61 | VBoxTestOGL_LIBS.solaris += xcb
|
---|
62 | VBoxTestOGL_LIBS.freebsd += xcb
|
---|
63 | VBoxTestOGL_LDFLAGS.darwin += -framework OpenGL -framework IOKit
|
---|
64 | VBoxTestOGL_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
|
---|
65 | if1of ($(KBUILD_TARGET), solaris linux freebsd)
|
---|
66 | # must come after VBoxOGL2D, therefore don't set the arch-specific LIBS variable here!
|
---|
67 | VBoxTestOGL_LIBS += GL pthread dl
|
---|
68 | endif
|
---|
69 | endif
|
---|
70 | if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # the X11 gang
|
---|
71 | VBoxTestOGL_LIBS += \
|
---|
72 | Xmu \
|
---|
73 | X11 \
|
---|
74 | Xext
|
---|
75 | VBoxTestOGL_LIBPATH = \
|
---|
76 | $(VBOX_LIBPATH_X11)
|
---|
77 | endif
|
---|
78 | # Don't let ld strip out explicitly linked libraries even when they are not needed.
|
---|
79 | # This was causing some dynamic library loading problems in case of indirect dependencies
|
---|
80 | # in systems where RUNPATH instead of RPATH is utilized.
|
---|
81 | VBoxTestOGL_LDFLAGS.linux = -Wl,--no-as-needed
|
---|
82 | VBoxTestOGL_LDFLAGS.win = /SUBSYSTEM:windows
|
---|
83 | endif
|
---|
84 | endif
|
---|
85 |
|
---|
86 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
87 |
|
---|