VirtualBox

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

Last change on this file since 48950 was 41477, checked in by vboxsync, 13 years ago

/Makefile.kmk: Cosmetic changes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.1 KB
Line 
1# $Id: Makefile.kmk 41477 2012-05-29 11:43:27Z 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_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
62VBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
63VBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
64VBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
65ifdef VBOX_OPENGL
66 #VBoxSDL_DEFS.linux += VBOX_OPENGL
67endif
68VBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
69VBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
70
71VBoxSDL_INCS = \
72 $(VBoxSDL_0_OUTDIR)
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
106# Icon include file.
107$$(VBoxSDL_0_OUTDIR)/VBoxSDL-icon.rc: $(VBOX_WINDOWS_ICON_FILE) $$(VBoxSDL_DEFPATH)/Makefile.kmk | $$(dir $$@)
108 $(RM) -f $@
109 $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
110
111
112
113#
114# tstSDL
115#
116tstSDL_TEMPLATE = VBOXR3NPEXE
117tstSDL_SDKS = LIBSDL
118tstSDL_INST = $(INST_TESTCASE)
119tstSDL_SOURCES = \
120 VBoxSDLTest.cpp
121tstSDL_SOURCES.darwin = \
122 VBoxSDLMain-darwin.m
123tstSDL_DEFS = IN_RING3 IN_RT_R3 _GNU_SOURCE
124tstSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
125ifdef VBOX_OPENGL
126tstSDL_DEFS.linux = VBOX_OPENGL
127endif
128
129tstSDL_LIBS = \
130 $(LIB_RUNTIME)
131ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
132tstSDL_LIBS += \
133 $(LIB_SDK_LIBSDL_SDLMAIN)
134endif
135
136ifdef VBOX_OPENGL
137tstSDL_LIBS.linux += GL
138endif
139ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
140tstSDL_LIBPATH = \
141 $(VBOX_LIBPATH_X11)
142endif
143
144tstSDL_LDFLAGS.darwin = \
145 -framework Foundation -framework AppKit
146
147## @todo What was this stuff doing here? The exception config is saying two different things, and why just -O for release builds?
148#tstSDL_CXXFLAGS.win = \
149# -EHsc
150#tstSDL_CXXFLAGS.linux = \
151# -DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
152# -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
153# Is this what's intended? Why -fshort-wchar?
154tstSDL_DEFS.linux = NDEBUG TRIMMED
155tstSDL_CXXFLAGS.linux = -O -Wall -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar
156
157
158endif # !VBOX_WITH_HARDENING || "$(KBUILD_TARGET)" != "darwin"
159include $(FILE_KBUILD_SUB_FOOTER)
160
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