VirtualBox

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

最後變更 在這個檔案從98305是 98305,由 vboxsync 提交於 2 年 前

FE/SDL. bugref:9449. Removing VBOX_WITH_SDL2 define.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 4.5 KB
 
1# $Id: Makefile.kmk 98305 2023-01-25 16:48:39Z 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.alldomusa.eu.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
33ifdef 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.
42endif
43
44
45#
46# VBoxSDL
47#
48ifdef VBOX_WITH_HARDENING
49 DLLS += VBoxSDL
50else
51 PROGRAMS += VBoxSDL
52endif
53VBoxSDL_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBoxMainClientDll,VBoxMainClientExe)
54VBoxSDL_SDKS = LIBSDL
55VBoxSDL_SOURCES = \
56 VBoxSDL.cpp \
57 Framebuffer.cpp \
58 Helper.cpp \
59 ../Common/PasswordInput.cpp
60VBoxSDL_SOURCES.darwin = \
61 VBoxSDLMain-darwin.m \
62 Framebuffer-darwin.m
63
64VBoxSDL_DEFS =
65VBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
66VBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
67VBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
68ifdef VBOX_OPENGL
69 #VBoxSDL_DEFS.linux += VBOX_OPENGL
70endif
71VBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
72VBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
73
74VBoxSDL_INCS = \
75 $(VBoxSDL_0_OUTDIR) \
76 $(VBOX_GRAPHICS_INCS) \
77 ../Common
78ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
79VBoxSDL_INCS += \
80 $(VBOX_XCURSOR_INCS)
81endif
82ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
83
84VBoxSDL_LIBS = \
85 $(LIB_SDK_LIBSDL_SDLMAIN)
86endif
87ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
88VBoxSDL_LIBS += \
89 $(PATH_STAGE_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL) \
90 $(VBOX_XCURSOR_LIBS) \
91 X11
92VBoxSDL_LIBPATH = \
93 $(VBOX_LIBPATH_X11)
94endif
95ifdef VBOX_OPENGL
96 #VBoxSDL_LIBS.linux += GL
97endif
98
99VBoxSDL_LDFLAGS.darwin = \
100 -framework Foundation -framework AppKit
101
102VBoxSDL_CLEAN = $(VBoxSDL_0_OUTDIR)/Ico64x01.h
103VBoxSDL_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
111ifdef VBOX_WITH_HARDENING
112$(call VBOX_SET_VER_INFO_DLL,VBoxSDL,VirtualBox Pure SDL Frontend,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
113else
114$(call VBOX_SET_VER_INFO_EXE,VBoxSDL,VirtualBox Pure SDL Frontend,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
115endif
116
117
118#
119# tstSDL
120#
121if 0
122PROGRAMS += tstSDL
123tstSDL_TEMPLATE = VBoxR3TstExe
124tstSDL_SDKS = LIBSDL
125tstSDL_INST = $(INST_TESTCASE)
126tstSDL_SOURCES = \
127 VBoxSDLTest.cpp
128tstSDL_SOURCES.darwin = \
129 VBoxSDLMain-darwin.m
130tstSDL_DEFS = IN_RING3 IN_RT_R3 _GNU_SOURCE
131tstSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
132ifdef VBOX_OPENGL
133tstSDL_DEFS.linux = VBOX_OPENGL
134endif
135
136
137tstSDL_LIBS = \
138 $(LIB_RUNTIME)
139ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
140tstSDL_LIBS += \
141 $(LIB_SDK_LIBSDL_SDLMAIN)
142endif
143
144ifdef VBOX_OPENGL
145tstSDL_LIBS.linux += GL
146endif
147ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
148tstSDL_LIBPATH = \
149 $(VBOX_LIBPATH_X11)
150endif
151
152tstSDL_LDFLAGS.darwin = \
153 -framework Foundation -framework AppKit
154endif
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?
162tstSDL_DEFS.linux = NDEBUG TRIMMED
163tstSDL_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)
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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