VirtualBox

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

Last change on this file since 22480 was 20433, checked in by vboxsync, 16 years ago

VBoxSDL: made it compile with SDL1.3 to support multiple guest monitors (disabled)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.7 KB
Line 
1# $Id: Makefile.kmk 20433 2009-06-09 12:40:36Z vboxsync $
2## @file
3# Sub-Makefile for VBoxSDL (a simple frontend based on SDL).
4#
5
6#
7# Copyright (C) 2006-2007 Sun Microsystems, Inc.
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# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22SUB_DEPTH = ../../../..
23include $(KBUILD_PATH)/subheader.kmk
24if !defined(VBOX_WITH_HARDENING) || "$(KBUILD_TARGET)" != "darwin" # No hardened VBoxSDL on darwin.
25
26#
27# Targets.
28#
29ifdef VBOX_WITH_HARDENING
30 PROGRAMS += VBoxSDLHardened
31 DLLS += VBoxSDL
32else
33 PROGRAMS += VBoxSDL
34endif
35PROGRAMS += tstSDL
36
37
38#
39# Hardened VBoxSDL
40#
41VBoxSDLHardened_TEMPLATE = VBOXR3HARDENEDEXE
42VBoxSDLHardened_SOURCES = VBoxSDLHardened.cpp
43VBoxSDLHardened_NAME = VBoxSDL
44
45
46#
47# VBoxSDL
48#
49VBoxSDL_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXMAINCLIENTDLL,VBOXMAINCLIENTEXE)
50VBoxSDL_SDKS = LIBSDL
51VBoxSDL_SOURCES = \
52 VBoxSDL.cpp \
53 Framebuffer.cpp \
54 Helper.cpp
55VBoxSDL_SOURCES.darwin = \
56 VBoxSDLMain-darwin.m
57ifndef VBOX_OSE
58 VBoxSDL_SOURCES.win = \
59 win32/WinUI.cpp \
60 win32/TitlebarButtons.cpp \
61 win32/VBoxSDL.rc
62win32/VBoxSDL.rc_INCS = $(PATH_VBoxSDL)
63win32/VBoxSDL.rc_DEPS = $(PATH_VBoxSDL)/VBoxSDL-icon.rc
64win32/VBoxSDL.rc_CLEAN = $(PATH_VBoxSDL)/VBoxSDL-icon.rc
65endif
66
67VBoxSDL_DEFS =
68ifdef VBOX_WITH_SDL13
69 VBoxSDL_DEFS += VBOX_WITH_SDL13
70else
71 ifdef VBOX_WITH_SECURELABEL
72 VBoxSDL_DEFS += VBOX_SECURELABEL
73 endif
74endif
75ifdef VBOX_WITH_VRDP
76 VBoxSDL_DEFS += VBOX_WITH_VRDP
77endif
78VBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
79VBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
80VBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
81ifdef VBOX_OPENGL
82 #VBoxSDL_DEFS.linux += VBOX_OPENGL
83endif
84ifndef VBOX_OSE
85# disable for now as this customer-specific GUI
86# VBoxSDL_DEFS.win = VBOX_WIN32_UI
87endif
88VBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
89VBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
90
91VBoxSDL_INCS = \
92 $(PATH_VBoxSDL)
93ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
94VBoxSDL_INCS += \
95 $(VBOX_XCURSOR_INCS)
96endif
97ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
98
99VBoxSDL_LIBS = \
100 $(LIB_SDK_LIBSDL_SDLMAIN)
101endif
102ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
103VBoxSDL_LIBS += \
104 $(VBOX_XCURSOR_LIBS) \
105 X11
106VBoxSDL_LIBPATH = \
107 $(VBOX_LIBPATH_X11)
108endif
109ifdef VBOX_OPENGL
110 #VBoxSDL_LIBS.linux += GL
111endif
112
113VBoxSDL_LDFLAGS.darwin = \
114 -framework Foundation -framework AppKit
115
116VBoxSDL_CLEAN = $(PATH_VBoxSDL)/Ico64x01.h
117VBoxSDL_INTERMEDIATES = $(PATH_VBoxSDL)/Ico64x01.h
118
119
120# Convert the pnm-file to a byte array.
121$$(PATH_VBoxSDL)/Ico64x01.h: $(PATH_ROOT)/src/VBox/Frontends/VBoxSDL/ico64x01.pnm $(VBOX_BIN2C) | $$(dir $$@)
122 $(call MSG_TOOL,bin2c,VBoxSDL,$<,$@)
123 $(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
124
125# Icon include file.
126$$(PATH_VBoxSDL)/VBoxSDL-icon.rc: $(VBOX_WINDOWS_ICON_FILE) $$(VBoxSDL_PATH)/Makefile.kmk | $$(dir $$@)
127 $(RM) -f $@
128 $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
129
130
131
132#
133# tstSDL
134#
135tstSDL_TEMPLATE = VBOXR3NPEXE
136tstSDL_SDKS = LIBSDL
137tstSDL_INST = $(INST_TESTCASE)
138tstSDL_SOURCES = \
139 VBoxSDLTest.cpp
140tstSDL_SOURCES.darwin = \
141 VBoxSDLMain-darwin.m
142tstSDL_DEFS = IN_RING3 IN_RT_R3 _GNU_SOURCE
143tstSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
144ifdef VBOX_OPENGL
145tstSDL_DEFS.linux = VBOX_OPENGL
146endif
147tstSDL_INCS = \
148 $(PATH_tstSDL)
149
150tstSDL_LIBS = \
151 $(LIB_RUNTIME)
152ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
153tstSDL_LIBS += \
154 $(LIB_SDK_LIBSDL_SDLMAIN)
155endif
156
157ifdef VBOX_OPENGL
158tstSDL_LIBS.linux += GL
159endif
160ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
161tstSDL_LIBPATH = \
162 $(VBOX_LIBPATH_X11)
163endif
164
165tstSDL_LDFLAGS.darwin = \
166 -framework Foundation -framework AppKit
167
168## @todo What was this stuff doing here? The exception config is saying two different things, and why just -O for release builds?
169#tstSDL_CXXFLAGS.win = \
170# -EHsc
171#tstSDL_CXXFLAGS.linux = \
172# -DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
173# -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
174# Is this what's intended? Why -fshort-wchar?
175tstSDL_DEFS.linux = NDEBUG TRIMMED
176tstSDL_CXXFLAGS.linux = -O -Wall -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar
177
178
179endif # !VBOX_WITH_HARDENING || "$(KBUILD_TARGET)" != "darwin"
180include $(KBUILD_PATH)/subfooter.kmk
181
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