VirtualBox

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

Last change on this file since 32083 was 32083, checked in by vboxsync, 14 years ago

FE/SDL: removed obsolete code

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.3 KB
Line 
1# $Id: Makefile.kmk 32083 2010-08-30 10:21:57Z vboxsync $
2## @file
3# Sub-Makefile for VBoxSDL (a simple frontend based on SDL).
4#
5
6#
7# Copyright (C) 2006-2007 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_NAME = VBoxSDL
40
41
42#
43# VBoxSDL
44#
45VBoxSDL_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXMAINCLIENTDLL,VBOXMAINCLIENTEXE)
46VBoxSDL_SDKS = LIBSDL
47VBoxSDL_SOURCES = \
48 VBoxSDL.cpp \
49 Framebuffer.cpp \
50 Helper.cpp
51VBoxSDL_SOURCES.darwin = \
52 VBoxSDLMain-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
62ifdef VBOX_WITH_VRDP
63 VBoxSDL_DEFS += VBOX_WITH_VRDP
64endif
65VBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
66VBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
67VBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
68ifdef VBOX_OPENGL
69 #VBoxSDL_DEFS.linux += VBOX_OPENGL
70endif
71ifndef VBOX_OSE
72# disable for now as this customer-specific GUI
73# VBoxSDL_DEFS.win = VBOX_WIN32_UI
74endif
75VBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
76VBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
77
78VBoxSDL_INCS = \
79 $(PATH_VBoxSDL)
80ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
81VBoxSDL_INCS += \
82 $(VBOX_XCURSOR_INCS)
83endif
84ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
85
86VBoxSDL_LIBS = \
87 $(LIB_SDK_LIBSDL_SDLMAIN)
88endif
89ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
90VBoxSDL_LIBS += \
91 $(PATH_DLL)/VBoxKeyboard$(VBOX_SUFF_DLL) \
92 $(VBOX_XCURSOR_LIBS) \
93 X11
94VBoxSDL_LIBPATH = \
95 $(VBOX_LIBPATH_X11)
96endif
97ifdef VBOX_OPENGL
98 #VBoxSDL_LIBS.linux += GL
99endif
100
101VBoxSDL_LDFLAGS.darwin = \
102 -framework Foundation -framework AppKit
103
104VBoxSDL_CLEAN = $(PATH_VBoxSDL)/Ico64x01.h
105VBoxSDL_INTERMEDIATES = $(PATH_VBoxSDL)/Ico64x01.h
106
107
108# Convert the pnm-file to a byte array.
109$$(PATH_VBoxSDL)/Ico64x01.h: $(PATH_ROOT)/src/VBox/Frontends/VBoxSDL/ico64x01.pnm $(VBOX_BIN2C) | $$(dir $$@)
110 $(call MSG_TOOL,bin2c,VBoxSDL,$<,$@)
111 $(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
112
113# Icon include file.
114$$(PATH_VBoxSDL)/VBoxSDL-icon.rc: $(VBOX_WINDOWS_ICON_FILE) $$(VBoxSDL_PATH)/Makefile.kmk | $$(dir $$@)
115 $(RM) -f $@
116 $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
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
135tstSDL_INCS = \
136 $(PATH_tstSDL)
137
138tstSDL_LIBS = \
139 $(LIB_RUNTIME)
140ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
141tstSDL_LIBS += \
142 $(LIB_SDK_LIBSDL_SDLMAIN)
143endif
144
145ifdef VBOX_OPENGL
146tstSDL_LIBS.linux += GL
147endif
148ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
149tstSDL_LIBPATH = \
150 $(VBOX_LIBPATH_X11)
151endif
152
153tstSDL_LDFLAGS.darwin = \
154 -framework Foundation -framework AppKit
155
156## @todo What was this stuff doing here? The exception config is saying two different things, and why just -O for release builds?
157#tstSDL_CXXFLAGS.win = \
158# -EHsc
159#tstSDL_CXXFLAGS.linux = \
160# -DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
161# -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
162# Is this what's intended? Why -fshort-wchar?
163tstSDL_DEFS.linux = NDEBUG TRIMMED
164tstSDL_CXXFLAGS.linux = -O -Wall -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar
165
166
167endif # !VBOX_WITH_HARDENING || "$(KBUILD_TARGET)" != "darwin"
168include $(KBUILD_PATH)/subfooter.kmk
169
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