VirtualBox

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

Last change on this file since 55746 was 53832, checked in by vboxsync, 10 years ago

added another Windows resource file

  • 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 53832 2015-01-15 16:31:37Z 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.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#
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
42
43#
44# VBoxSDL
45#
46VBoxSDL_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXMAINCLIENTDLL,VBOXMAINCLIENTEXE)
47VBoxSDL_SDKS = LIBSDL
48VBoxSDL_SOURCES = \
49 VBoxSDL.cpp \
50 Framebuffer.cpp \
51 Helper.cpp
52VBoxSDL_SOURCES.darwin = \
53 VBoxSDLMain-darwin.m
54
55VBoxSDL_DEFS =
56ifdef VBOX_WITH_SDL13
57 VBoxSDL_DEFS += VBOX_WITH_SDL13
58else
59 ifdef VBOX_WITH_SECURELABEL
60 VBoxSDL_DEFS += VBOX_SECURELABEL
61 endif
62endif
63VBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
64VBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
65VBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
66ifdef VBOX_OPENGL
67 #VBoxSDL_DEFS.linux += VBOX_OPENGL
68endif
69VBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
70VBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
71
72VBoxSDL_INCS = \
73 $(VBoxSDL_0_OUTDIR)
74ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
75VBoxSDL_INCS += \
76 $(VBOX_XCURSOR_INCS)
77endif
78ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
79
80VBoxSDL_LIBS = \
81 $(LIB_SDK_LIBSDL_SDLMAIN)
82endif
83ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
84VBoxSDL_LIBS += \
85 $(PATH_STAGE_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL) \
86 $(VBOX_XCURSOR_LIBS) \
87 X11
88VBoxSDL_LIBPATH = \
89 $(VBOX_LIBPATH_X11)
90endif
91ifdef VBOX_OPENGL
92 #VBoxSDL_LIBS.linux += GL
93endif
94
95VBoxSDL_LDFLAGS.darwin = \
96 -framework Foundation -framework AppKit
97
98VBoxSDL_CLEAN = $(VBoxSDL_0_OUTDIR)/Ico64x01.h
99VBoxSDL_INTERMEDIATES = $(VBoxSDL_0_OUTDIR)/Ico64x01.h
100
101
102# Convert the pnm-file to a byte array.
103$$(VBoxSDL_0_OUTDIR)/Ico64x01.h: $(PATH_ROOT)/src/VBox/Frontends/VBoxSDL/ico64x01.pnm $(VBOX_BIN2C) | $$(dir $$@)
104 $(call MSG_TOOL,bin2c,VBoxSDL,$<,$@)
105 $(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
106
107ifeq ($(KBUILD_TARGET),win)
108VBoxSDL_SOURCES += VBoxSDL.rc
109VBoxSDL.rc_INCS = $(VBoxSDL_0_OUTDIR)
110VBoxSDL.rc_DEPS = $(VBoxSDL_0_OUTDIR)/VBoxSDL-icon.rc
111VBoxSDL.rc_CLEAN = $(VBoxSDL_0_OUTDIR)/VBoxSDL-icon.rc
112# Icon include file.
113$$(VBoxSDL_0_OUTDIR)/VBoxSDL-icon.rc: $(VBOX_WINDOWS_ICON_FILE) $$(VBoxSDL_DEFPATH)/Makefile.kmk | $$(dir $$@)
114 $(RM) -f $@
115 $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
116endif
117
118
119
120#
121# tstSDL
122#
123tstSDL_TEMPLATE = VBOXR3NPEXE
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
136tstSDL_LIBS = \
137 $(LIB_RUNTIME)
138ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
139tstSDL_LIBS += \
140 $(LIB_SDK_LIBSDL_SDLMAIN)
141endif
142
143ifdef VBOX_OPENGL
144tstSDL_LIBS.linux += GL
145endif
146ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
147tstSDL_LIBPATH = \
148 $(VBOX_LIBPATH_X11)
149endif
150
151tstSDL_LDFLAGS.darwin = \
152 -framework Foundation -framework AppKit
153
154## @todo What was this stuff doing here? The exception config is saying two different things, and why just -O for release builds?
155#tstSDL_CXXFLAGS.win = \
156# -EHsc
157#tstSDL_CXXFLAGS.linux = \
158# -DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
159# -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
160# Is this what's intended? Why -fshort-wchar?
161tstSDL_DEFS.linux = NDEBUG TRIMMED
162tstSDL_CXXFLAGS.linux = -O -Wall -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar
163
164
165endif # !VBOX_WITH_HARDENING || "$(KBUILD_TARGET)" != "darwin"
166include $(FILE_KBUILD_SUB_FOOTER)
167
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