VirtualBox

source: vbox/trunk/src/VBox/Frontends/VBoxSDL/Makefile.kmk@ 98412

Last change on this file since 98412 was 98412, checked in by vboxsync, 20 months ago

Frontends/*.kmk: Automatic scm cleanups. bugref:10348

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.7 KB
Line 
1# $Id: Makefile.kmk 98412 2023-02-01 16:21:48Z vboxsync $
2## @file
3# Sub-Makefile for VBoxSDL (a simple frontend based on SDL).
4#
5
6#
7# Copyright (C) 2006-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
28SUB_DEPTH = ../../../..
29include $(KBUILD_PATH)/subheader.kmk
30if !defined(VBOX_WITH_HARDENING) || "$(KBUILD_TARGET)" != "darwin" # No hardened VBoxSDL on darwin.
31
32
33 ifdef VBOX_WITH_HARDENING
34 #
35 # Hardened VBoxSDL
36 #
37 PROGRAMS += VBoxSDLHardened
38 VBoxSDLHardened_TEMPLATE = VBoxR3HardenedExe
39 VBoxSDLHardened_SOURCES = VBoxSDLHardened.cpp
40 VBoxSDLHardened_NAME = VBoxSDL
41 $(call VBOX_SET_VER_INFO_EXE,VBoxSDLHardened,VirtualBox Pure SDL Frontend,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
42 endif
43
44
45 #
46 # VBoxSDL
47 #
48 ifdef VBOX_WITH_HARDENING
49 DLLS += VBoxSDL
50 else
51 PROGRAMS += VBoxSDL
52 endif
53 VBoxSDL_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBoxMainClientDll,VBoxMainClientExe)
54 VBoxSDL_SDKS = LIBSDL2
55 VBoxSDL_SOURCES = \
56 VBoxSDL.cpp \
57 Framebuffer.cpp \
58 Helper.cpp \
59 ../Common/PasswordInput.cpp
60 VBoxSDL_SOURCES.darwin = \
61 VBoxSDLMain-darwin.m \
62 Framebuffer-darwin.m
63
64 VBoxSDL_DEFS =
65 VBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
66 VBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
67 VBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
68 ifdef VBOX_OPENGL
69 #VBoxSDL_DEFS.linux += VBOX_OPENGL
70 endif
71 VBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
72 VBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
73
74 VBoxSDL_INCS = \
75 $(VBoxSDL_0_OUTDIR) \
76 $(VBOX_GRAPHICS_INCS) \
77 ../Common
78 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # X11
79 VBoxSDL_INCS += \
80 $(VBOX_XCURSOR_INCS)
81 endif
82 ifn1of ($(KBUILD_TARGET), solaris) # Probably wrong with SDL2
83 VBoxSDL_LIBS = \
84 $(LIB_SDK_LIBSDL2_SDLMAIN)
85 endif
86 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # X11
87 VBoxSDL_LIBS += \
88 $(PATH_STAGE_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL) \
89 $(VBOX_XCURSOR_LIBS) \
90 X11
91 VBoxSDL_LIBPATH = \
92 $(VBOX_LIBPATH_X11)
93 endif
94 ifdef VBOX_OPENGL
95 #VBoxSDL_LIBS.linux += GL
96 endif
97
98 VBoxSDL_LDFLAGS.darwin = \
99 -framework Foundation -framework AppKit
100 VBoxSDL_LDFLAGS.win = -SubSystem:Windows
101
102 VBoxSDL_CLEAN = $(VBoxSDL_0_OUTDIR)/Ico64x01.h
103 VBoxSDL_INTERMEDIATES = $(VBoxSDL_0_OUTDIR)/Ico64x01.h
104
105
106 # Convert the pnm-file to a byte array.
107 $$(VBoxSDL_0_OUTDIR)/Ico64x01.h: $(PATH_ROOT)/src/VBox/Frontends/VBoxSDL/ico64x01.pnm $(VBOX_BIN2C) | $$(dir $$@)
108 $(call MSG_TOOL,bin2c,VBoxSDL,$<,$@)
109 $(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
110
111 ifdef VBOX_WITH_HARDENING
112 $(call VBOX_SET_VER_INFO_DLL,VBoxSDL,VirtualBox Pure SDL Frontend,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
113 else
114 $(call VBOX_SET_VER_INFO_EXE,VBoxSDL,VirtualBox Pure SDL Frontend,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
115 endif
116
117
118 #
119 # tstSDL
120 #
121 if 0
122 PROGRAMS += tstSDL
123 tstSDL_TEMPLATE = VBoxR3TstExe
124 tstSDL_SDKS = LIBSDL2
125 tstSDL_INST = $(INST_TESTCASE)
126 tstSDL_SOURCES = \
127 VBoxSDLTest.cpp
128 tstSDL_SOURCES.darwin = \
129 VBoxSDLMain-darwin.m
130 tstSDL_DEFS = IN_RING3 IN_RT_R3 _GNU_SOURCE
131 tstSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
132 ifdef VBOX_OPENGL
133 tstSDL_DEFS.linux = VBOX_OPENGL
134 endif
135
136
137 tstSDL_LIBS = \
138 $(LIB_RUNTIME)
139 ifn1of ($(KBUILD_TARGET), solaris)
140 tstSDL_LIBS += \
141 $(LIB_SDK_LIBSDL2_SDLMAIN)
142 endif
143
144 ifdef VBOX_OPENGL
145 tstSDL_LIBS.linux += GL
146 endif
147 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) # X11
148 tstSDL_LIBPATH = \
149 $(VBOX_LIBPATH_X11)
150 endif
151
152 tstSDL_LDFLAGS.darwin = \
153 -framework Foundation -framework AppKit
154 endif
155 ## @todo What was this stuff doing here? The exception config is saying two different things, and why just -O for release builds?
156 #tstSDL_CXXFLAGS.win = \
157 # -EHsc
158 #tstSDL_CXXFLAGS.linux = \
159 # -DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
160 # -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
161 # Is this what's intended? Why -fshort-wchar?
162 tstSDL_DEFS.linux = NDEBUG TRIMMED
163 tstSDL_CXXFLAGS.linux = -O -Wall -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar
164
165
166endif # !VBOX_WITH_HARDENING || "$(KBUILD_TARGET)" != "darwin"
167include $(FILE_KBUILD_SUB_FOOTER)
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