VirtualBox

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

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

Config.kmk,VMM,VBoxSDL,Resources/win: Created resource templates for the standard windows resource files and applied them to the VMM and VBoxSDL (for testing).

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 4.4 KB
 
1# $Id: Makefile.kmk 55788 2015-05-09 20:29:31Z vboxsync $
2## @file
3# Sub-Makefile for VBoxSDL (a simple frontend based on SDL).
4#
5
6#
7# Copyright (C) 2006-2012 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.alldomusa.eu.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
20if !defined(VBOX_WITH_HARDENING) || "$(KBUILD_TARGET)" != "darwin" # No hardened VBoxSDL on darwin.
21
22#
23# Targets.
24#
25ifdef VBOX_WITH_HARDENING
26 PROGRAMS += VBoxSDLHardened
27 DLLS += VBoxSDL
28else
29 PROGRAMS += VBoxSDL
30endif
31PROGRAMS += tstSDL
32
33
34#
35# Hardened VBoxSDL
36#
37VBoxSDLHardened_TEMPLATE = VBOXR3HARDENEDEXE
38VBoxSDLHardened_SOURCES = VBoxSDLHardened.cpp
39VBoxSDLHardened_SOURCES.win = $(VBoxSDL_0_OUTDIR)/VBoxSDL-icon.rc
40VBoxSDLHardened_NAME = VBoxSDL
41$(evalcall2 VBOX_SET_VER_INFO_EXE,VBoxSDLHardened,VirtualBox Pure SDL Frontend,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
42
43
44#
45# VBoxSDL
46#
47VBoxSDL_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXMAINCLIENTDLL,VBOXMAINCLIENTEXE)
48VBoxSDL_SDKS = LIBSDL
49VBoxSDL_SOURCES = \
50 VBoxSDL.cpp \
51 Framebuffer.cpp \
52 Helper.cpp
53VBoxSDL_SOURCES.darwin = \
54 VBoxSDLMain-darwin.m
55
56VBoxSDL_DEFS =
57ifdef VBOX_WITH_SDL13
58 VBoxSDL_DEFS += VBOX_WITH_SDL13
59else
60 ifdef VBOX_WITH_SECURELABEL
61 VBoxSDL_DEFS += VBOX_SECURELABEL
62 endif
63endif
64VBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
65VBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
66VBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
67ifdef VBOX_OPENGL
68 #VBoxSDL_DEFS.linux += VBOX_OPENGL
69endif
70VBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
71VBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
72
73VBoxSDL_INCS = \
74 $(VBoxSDL_0_OUTDIR)
75ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
76VBoxSDL_INCS += \
77 $(VBOX_XCURSOR_INCS)
78endif
79ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
80
81VBoxSDL_LIBS = \
82 $(LIB_SDK_LIBSDL_SDLMAIN)
83endif
84ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
85VBoxSDL_LIBS += \
86 $(PATH_STAGE_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL) \
87 $(VBOX_XCURSOR_LIBS) \
88 X11
89VBoxSDL_LIBPATH = \
90 $(VBOX_LIBPATH_X11)
91endif
92ifdef VBOX_OPENGL
93 #VBoxSDL_LIBS.linux += GL
94endif
95
96VBoxSDL_LDFLAGS.darwin = \
97 -framework Foundation -framework AppKit
98
99VBoxSDL_CLEAN = $(VBoxSDL_0_OUTDIR)/Ico64x01.h
100VBoxSDL_INTERMEDIATES = $(VBoxSDL_0_OUTDIR)/Ico64x01.h
101
102
103# Convert the pnm-file to a byte array.
104$$(VBoxSDL_0_OUTDIR)/Ico64x01.h: $(PATH_ROOT)/src/VBox/Frontends/VBoxSDL/ico64x01.pnm $(VBOX_BIN2C) | $$(dir $$@)
105 $(call MSG_TOOL,bin2c,VBoxSDL,$<,$@)
106 $(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
107
108ifdef VBOX_WITH_HARDENING
109$(evalcall2 VBOX_SET_VER_INFO_DLL,VBoxSDL,VirtualBox Pure SDL Frontend,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
110else
111$(evalcall2 VBOX_SET_VER_INFO_EXE,VBoxSDL,VirtualBox Pure SDL Frontend,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
112endif
113
114
115#
116# tstSDL
117#
118tstSDL_TEMPLATE = VBOXR3NPEXE
119tstSDL_SDKS = LIBSDL
120tstSDL_INST = $(INST_TESTCASE)
121tstSDL_SOURCES = \
122 VBoxSDLTest.cpp
123tstSDL_SOURCES.darwin = \
124 VBoxSDLMain-darwin.m
125tstSDL_DEFS = IN_RING3 IN_RT_R3 _GNU_SOURCE
126tstSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
127ifdef VBOX_OPENGL
128tstSDL_DEFS.linux = VBOX_OPENGL
129endif
130
131tstSDL_LIBS = \
132 $(LIB_RUNTIME)
133ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
134tstSDL_LIBS += \
135 $(LIB_SDK_LIBSDL_SDLMAIN)
136endif
137
138ifdef VBOX_OPENGL
139tstSDL_LIBS.linux += GL
140endif
141ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
142tstSDL_LIBPATH = \
143 $(VBOX_LIBPATH_X11)
144endif
145
146tstSDL_LDFLAGS.darwin = \
147 -framework Foundation -framework AppKit
148
149## @todo What was this stuff doing here? The exception config is saying two different things, and why just -O for release builds?
150#tstSDL_CXXFLAGS.win = \
151# -EHsc
152#tstSDL_CXXFLAGS.linux = \
153# -DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
154# -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
155# Is this what's intended? Why -fshort-wchar?
156tstSDL_DEFS.linux = NDEBUG TRIMMED
157tstSDL_CXXFLAGS.linux = -O -Wall -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar
158
159
160endif # !VBOX_WITH_HARDENING || "$(KBUILD_TARGET)" != "darwin"
161include $(FILE_KBUILD_SUB_FOOTER)
162
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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