VirtualBox

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

Last change on this file since 80569 was 80569, checked in by vboxsync, 5 years ago

Main: bugref:9341: Added VM autostart during boot support for windows host

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.4 KB
Line 
1# $Id: Makefile.kmk 80569 2019-09-03 14:34:21Z vboxsync $
2## @file
3# Sub-Makefile for VBoxSDL (a simple frontend based on SDL).
4#
5
6#
7# Copyright (C) 2006-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
18SUB_DEPTH = ../../../..
19include $(KBUILD_PATH)/subheader.kmk
20if !defined(VBOX_WITH_HARDENING) || "$(KBUILD_TARGET)" != "darwin" # No hardened VBoxSDL on darwin.
21
22
23ifdef VBOX_WITH_HARDENING
24 #
25 # Hardened VBoxSDL
26 #
27 PROGRAMS += VBoxSDLHardened
28 VBoxSDLHardened_TEMPLATE = VBOXR3HARDENEDEXE
29 VBoxSDLHardened_SOURCES = VBoxSDLHardened.cpp
30 VBoxSDLHardened_NAME = VBoxSDL
31 $(call VBOX_SET_VER_INFO_EXE,VBoxSDLHardened,VirtualBox Pure SDL Frontend,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
32endif
33
34
35#
36# VBoxSDL
37#
38ifdef VBOX_WITH_HARDENING
39 DLLS += VBoxSDL
40else
41 PROGRAMS += VBoxSDL
42endif
43VBoxSDL_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXMAINCLIENTDLL,VBOXMAINCLIENTEXE)
44VBoxSDL_SDKS = LIBSDL
45VBoxSDL_SOURCES = \
46 VBoxSDL.cpp \
47 Framebuffer.cpp \
48 Helper.cpp \
49 ../Common/PasswordInput.cpp
50VBoxSDL_SOURCES.darwin = \
51 VBoxSDLMain-darwin.m \
52 Framebuffer-darwin.m
53
54VBoxSDL_DEFS =
55ifdef VBOX_WITH_SDL13
56 VBoxSDL_DEFS += VBOX_WITH_SDL13
57else
58 ifdef VBOX_WITH_SECURELABEL
59 VBoxSDL_DEFS += VBOX_SECURELABEL
60 endif
61endif
62VBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
63VBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
64VBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
65ifdef VBOX_OPENGL
66 #VBoxSDL_DEFS.linux += VBOX_OPENGL
67endif
68VBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
69VBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
70
71VBoxSDL_INCS = \
72 $(VBoxSDL_0_OUTDIR) \
73 $(VBOX_GRAPHICS_INCS) \
74 ../Common
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$(call VBOX_SET_VER_INFO_DLL,VBoxSDL,VirtualBox Pure SDL Frontend,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
110else
111$(call VBOX_SET_VER_INFO_EXE,VBoxSDL,VirtualBox Pure SDL Frontend,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
112endif
113
114
115#
116# tstSDL
117#
118PROGRAMS += tstSDL
119tstSDL_TEMPLATE = VBOXR3NPEXE
120tstSDL_SDKS = LIBSDL
121tstSDL_INST = $(INST_TESTCASE)
122tstSDL_SOURCES = \
123 VBoxSDLTest.cpp
124tstSDL_SOURCES.darwin = \
125 VBoxSDLMain-darwin.m
126tstSDL_DEFS = IN_RING3 IN_RT_R3 _GNU_SOURCE
127tstSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
128ifdef VBOX_OPENGL
129tstSDL_DEFS.linux = VBOX_OPENGL
130endif
131
132tstSDL_LIBS = \
133 $(LIB_RUNTIME)
134ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
135tstSDL_LIBS += \
136 $(LIB_SDK_LIBSDL_SDLMAIN)
137endif
138
139ifdef VBOX_OPENGL
140tstSDL_LIBS.linux += GL
141endif
142ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
143tstSDL_LIBPATH = \
144 $(VBOX_LIBPATH_X11)
145endif
146
147tstSDL_LDFLAGS.darwin = \
148 -framework Foundation -framework AppKit
149
150## @todo What was this stuff doing here? The exception config is saying two different things, and why just -O for release builds?
151#tstSDL_CXXFLAGS.win = \
152# -EHsc
153#tstSDL_CXXFLAGS.linux = \
154# -DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
155# -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
156# Is this what's intended? Why -fshort-wchar?
157tstSDL_DEFS.linux = NDEBUG TRIMMED
158tstSDL_CXXFLAGS.linux = -O -Wall -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar
159
160
161endif # !VBOX_WITH_HARDENING || "$(KBUILD_TARGET)" != "darwin"
162include $(FILE_KBUILD_SUB_FOOTER)
163
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