VirtualBox

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

Last change on this file since 76474 was 69111, checked in by vboxsync, 7 years ago

(C) year

  • 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 69111 2017-10-17 14:26:02Z vboxsync $
2## @file
3# Sub-Makefile for VBoxSDL (a simple frontend based on SDL).
4#
5
6#
7# Copyright (C) 2006-2017 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
49VBoxSDL_SOURCES.darwin = \
50 VBoxSDLMain-darwin.m \
51 Framebuffer-darwin.m
52
53VBoxSDL_DEFS =
54ifdef VBOX_WITH_SDL13
55 VBoxSDL_DEFS += VBOX_WITH_SDL13
56else
57 ifdef VBOX_WITH_SECURELABEL
58 VBoxSDL_DEFS += VBOX_SECURELABEL
59 endif
60endif
61VBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
62VBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
63VBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
64ifdef VBOX_OPENGL
65 #VBoxSDL_DEFS.linux += VBOX_OPENGL
66endif
67VBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
68VBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
69
70VBoxSDL_INCS = \
71 $(VBoxSDL_0_OUTDIR) \
72 $(VBOX_GRAPHICS_INCS)
73ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
74VBoxSDL_INCS += \
75 $(VBOX_XCURSOR_INCS)
76endif
77ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
78
79VBoxSDL_LIBS = \
80 $(LIB_SDK_LIBSDL_SDLMAIN)
81endif
82ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
83VBoxSDL_LIBS += \
84 $(PATH_STAGE_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL) \
85 $(VBOX_XCURSOR_LIBS) \
86 X11
87VBoxSDL_LIBPATH = \
88 $(VBOX_LIBPATH_X11)
89endif
90ifdef VBOX_OPENGL
91 #VBoxSDL_LIBS.linux += GL
92endif
93
94VBoxSDL_LDFLAGS.darwin = \
95 -framework Foundation -framework AppKit
96
97VBoxSDL_CLEAN = $(VBoxSDL_0_OUTDIR)/Ico64x01.h
98VBoxSDL_INTERMEDIATES = $(VBoxSDL_0_OUTDIR)/Ico64x01.h
99
100
101# Convert the pnm-file to a byte array.
102$$(VBoxSDL_0_OUTDIR)/Ico64x01.h: $(PATH_ROOT)/src/VBox/Frontends/VBoxSDL/ico64x01.pnm $(VBOX_BIN2C) | $$(dir $$@)
103 $(call MSG_TOOL,bin2c,VBoxSDL,$<,$@)
104 $(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
105
106ifdef VBOX_WITH_HARDENING
107$(call VBOX_SET_VER_INFO_DLL,VBoxSDL,VirtualBox Pure SDL Frontend,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
108else
109$(call VBOX_SET_VER_INFO_EXE,VBoxSDL,VirtualBox Pure SDL Frontend,$(VBOX_WINDOWS_ICON_FILE)) # Version info / description.
110endif
111
112
113#
114# tstSDL
115#
116PROGRAMS += tstSDL
117tstSDL_TEMPLATE = VBOXR3NPEXE
118tstSDL_SDKS = LIBSDL
119tstSDL_INST = $(INST_TESTCASE)
120tstSDL_SOURCES = \
121 VBoxSDLTest.cpp
122tstSDL_SOURCES.darwin = \
123 VBoxSDLMain-darwin.m
124tstSDL_DEFS = IN_RING3 IN_RT_R3 _GNU_SOURCE
125tstSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
126ifdef VBOX_OPENGL
127tstSDL_DEFS.linux = VBOX_OPENGL
128endif
129
130tstSDL_LIBS = \
131 $(LIB_RUNTIME)
132ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
133tstSDL_LIBS += \
134 $(LIB_SDK_LIBSDL_SDLMAIN)
135endif
136
137ifdef VBOX_OPENGL
138tstSDL_LIBS.linux += GL
139endif
140ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
141tstSDL_LIBPATH = \
142 $(VBOX_LIBPATH_X11)
143endif
144
145tstSDL_LDFLAGS.darwin = \
146 -framework Foundation -framework AppKit
147
148## @todo What was this stuff doing here? The exception config is saying two different things, and why just -O for release builds?
149#tstSDL_CXXFLAGS.win = \
150# -EHsc
151#tstSDL_CXXFLAGS.linux = \
152# -DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
153# -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
154# Is this what's intended? Why -fshort-wchar?
155tstSDL_DEFS.linux = NDEBUG TRIMMED
156tstSDL_CXXFLAGS.linux = -O -Wall -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar
157
158
159endif # !VBOX_WITH_HARDENING || "$(KBUILD_TARGET)" != "darwin"
160include $(FILE_KBUILD_SUB_FOOTER)
161
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