VirtualBox

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

Last change on this file since 12623 was 12267, checked in by vboxsync, 16 years ago

VBoxSDL: windows build fix.

  • 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 12267 2008-09-09 03:41:38Z 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_SECURELABEL
69 VBoxSDL_DEFS += VBOX_SECURELABEL
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 VBoxSDL_DEFS.win = VBOX_WIN32_UI
82endif
83VBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
84VBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
85
86VBoxSDL_INCS = \
87 $(PATH_VBoxSDL)
88ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
89VBoxSDL_INCS += \
90 $(VBOX_XCURSOR_INCS)
91endif
92VBoxSDL_INCS.freebsd = \
93 /usr/include \
94 /usr/local/include \
95 /usr/X11R6/include ## @todo figure this out.
96ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
97
98VBoxSDL_LIBS = \
99 $(LIB_SDK_LIBSDL_SDLMAIN)
100endif
101ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
102VBoxSDL_LIBS += \
103 $(VBOX_XCURSOR_LIBS) \
104 X11
105VBoxSDL_LIBPATH = \
106 $(VBOX_LIBPATH_X11)
107endif
108ifdef VBOX_OPENGL
109 #VBoxSDL_LIBS.linux += GL
110endif
111
112VBoxSDL_LDFLAGS.darwin = \
113 -framework Foundation -framework AppKit
114
115VBoxSDL_CLEAN = $(PATH_VBoxSDL)/Ico64x01.h
116VBoxSDL_INTERMEDIATES = $(PATH_VBoxSDL)/Ico64x01.h
117
118
119# Convert the pnm-file to a byte array.
120$$(PATH_VBoxSDL)/Ico64x01.h: $(PATH_ROOT)/src/VBox/Frontends/VBoxSDL/ico64x01.pnm $(VBOX_BIN2C) | $$(dir $$@)
121 $(call MSG_TOOL,bin2c,VBoxSDL,$<,$@)
122 $(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
123
124# Icon include file.
125$$(PATH_VBoxSDL)/VBoxSDL-icon.rc: $(VBOX_WINDOWS_ICON_FILE) $$(VBoxSDL_PATH)/Makefile.kmk | $$(dir $$@)
126 $(RM) -f $@
127 $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
128
129
130
131#
132# tstSDL
133#
134tstSDL_TEMPLATE = VBOXR3NPEXE
135tstSDL_SDKS = LIBSDL
136tstSDL_INST = $(INST_TESTCASE)
137tstSDL_SOURCES = \
138 VBoxSDLTest.cpp
139tstSDL_SOURCES.darwin = \
140 VBoxSDLMain-darwin.m
141tstSDL_DEFS = IN_RING3 IN_RT_R3 _GNU_SOURCE
142tstSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
143ifdef VBOX_OPENGL
144tstSDL_DEFS.linux = VBOX_OPENGL
145endif
146tstSDL_INCS = \
147 $(PATH_tstSDL)
148
149tstSDL_LIBS = \
150 $(LIB_RUNTIME)
151ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
152tstSDL_LIBS += \
153 $(LIB_SDK_LIBSDL_SDLMAIN)
154endif
155
156ifdef VBOX_OPENGL
157tstSDL_LIBS.linux += GL
158endif
159ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
160tstSDL_LIBPATH = \
161 $(VBOX_LIBPATH_X11)
162tstSDL_INCS.freebsd = \
163 /usr/include \
164 /usr/local/include \
165 /usr/X11R6/include ## @todo figure this out.
166endif
167
168tstSDL_LDFLAGS.darwin = \
169 -framework Foundation -framework AppKit
170
171tstSDL_CXXFLAGS.win = \
172 -EHsc
173tstSDL_CXXFLAGS.linux = \
174 -DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
175 -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
176
177
178endif # !VBOX_WITH_HARDENING || "$(KBUILD_TARGET)" != "darwin"
179include $(KBUILD_PATH)/subfooter.kmk
180
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