VirtualBox

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

Last change on this file since 29607 was 28800, checked in by vboxsync, 15 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.5 KB
Line 
1# $Id: Makefile.kmk 28800 2010-04-27 08:22:32Z 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
53ifndef VBOX_OSE
54 VBoxSDL_SOURCES.win = \
55 win32/WinUI.cpp \
56 win32/TitlebarButtons.cpp \
57 win32/VBoxSDL.rc
58win32/VBoxSDL.rc_INCS = $(PATH_VBoxSDL)
59win32/VBoxSDL.rc_DEPS = $(PATH_VBoxSDL)/VBoxSDL-icon.rc
60win32/VBoxSDL.rc_CLEAN = $(PATH_VBoxSDL)/VBoxSDL-icon.rc
61endif
62
63VBoxSDL_DEFS =
64ifdef VBOX_WITH_SDL13
65 VBoxSDL_DEFS += VBOX_WITH_SDL13
66else
67 ifdef VBOX_WITH_SECURELABEL
68 VBoxSDL_DEFS += VBOX_SECURELABEL
69 endif
70endif
71ifdef VBOX_WITH_VRDP
72 VBoxSDL_DEFS += VBOX_WITH_VRDP
73endif
74VBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
75VBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
76VBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
77ifdef VBOX_OPENGL
78 #VBoxSDL_DEFS.linux += VBOX_OPENGL
79endif
80ifndef VBOX_OSE
81# disable for now as this customer-specific GUI
82# VBoxSDL_DEFS.win = VBOX_WIN32_UI
83endif
84VBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
85VBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
86
87VBoxSDL_INCS = \
88 $(PATH_VBoxSDL)
89ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
90VBoxSDL_INCS += \
91 $(VBOX_XCURSOR_INCS)
92endif
93ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
94
95VBoxSDL_LIBS = \
96 $(LIB_SDK_LIBSDL_SDLMAIN)
97endif
98ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
99VBoxSDL_LIBS += \
100 $(VBOX_XCURSOR_LIBS) \
101 X11
102VBoxSDL_LIBPATH = \
103 $(VBOX_LIBPATH_X11)
104endif
105ifdef VBOX_OPENGL
106 #VBoxSDL_LIBS.linux += GL
107endif
108
109VBoxSDL_LDFLAGS.darwin = \
110 -framework Foundation -framework AppKit
111
112VBoxSDL_CLEAN = $(PATH_VBoxSDL)/Ico64x01.h
113VBoxSDL_INTERMEDIATES = $(PATH_VBoxSDL)/Ico64x01.h
114
115
116# Convert the pnm-file to a byte array.
117$$(PATH_VBoxSDL)/Ico64x01.h: $(PATH_ROOT)/src/VBox/Frontends/VBoxSDL/ico64x01.pnm $(VBOX_BIN2C) | $$(dir $$@)
118 $(call MSG_TOOL,bin2c,VBoxSDL,$<,$@)
119 $(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
120
121# Icon include file.
122$$(PATH_VBoxSDL)/VBoxSDL-icon.rc: $(VBOX_WINDOWS_ICON_FILE) $$(VBoxSDL_PATH)/Makefile.kmk | $$(dir $$@)
123 $(RM) -f $@
124 $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
125
126
127
128#
129# tstSDL
130#
131tstSDL_TEMPLATE = VBOXR3NPEXE
132tstSDL_SDKS = LIBSDL
133tstSDL_INST = $(INST_TESTCASE)
134tstSDL_SOURCES = \
135 VBoxSDLTest.cpp
136tstSDL_SOURCES.darwin = \
137 VBoxSDLMain-darwin.m
138tstSDL_DEFS = IN_RING3 IN_RT_R3 _GNU_SOURCE
139tstSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
140ifdef VBOX_OPENGL
141tstSDL_DEFS.linux = VBOX_OPENGL
142endif
143tstSDL_INCS = \
144 $(PATH_tstSDL)
145
146tstSDL_LIBS = \
147 $(LIB_RUNTIME)
148ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
149tstSDL_LIBS += \
150 $(LIB_SDK_LIBSDL_SDLMAIN)
151endif
152
153ifdef VBOX_OPENGL
154tstSDL_LIBS.linux += GL
155endif
156ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
157tstSDL_LIBPATH = \
158 $(VBOX_LIBPATH_X11)
159endif
160
161tstSDL_LDFLAGS.darwin = \
162 -framework Foundation -framework AppKit
163
164## @todo What was this stuff doing here? The exception config is saying two different things, and why just -O for release builds?
165#tstSDL_CXXFLAGS.win = \
166# -EHsc
167#tstSDL_CXXFLAGS.linux = \
168# -DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
169# -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
170# Is this what's intended? Why -fshort-wchar?
171tstSDL_DEFS.linux = NDEBUG TRIMMED
172tstSDL_CXXFLAGS.linux = -O -Wall -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar
173
174
175endif # !VBOX_WITH_HARDENING || "$(KBUILD_TARGET)" != "darwin"
176include $(KBUILD_PATH)/subfooter.kmk
177
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