VirtualBox

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

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

#3076: Merged in the branch with the alternate driver authentication method. (34468:HEAD)

  • 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 11725 2008-08-27 22:21:47Z 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
22ifdef VBOX_KBUILD_HACKING
23SUB_DEPTH = ../../../..
24else
25DEPTH ?= ../../../..
26SUB_DEPTH = ..
27endif
28include $(KBUILD_PATH)/subheader.kmk
29
30
31#
32# Targets.
33#
34ifdef VBOX_WITH_HARDENING
35 ifneq ($(KBUILD_TARGET),darwin) # No hardened VBoxSDL on darwin.
36 PROGRAMS += VBoxSDLHardened
37 DLLS += VBoxSDL
38 endif
39else
40 PROGRAMS += VBoxSDL
41endif
42PROGRAMS += tstSDL
43
44
45#
46# Hardened VBoxSDL
47#
48VBoxSDLHardened_TEMPLATE = VBOXR3HARDENEDEXE
49VBoxSDLHardened_SOURCES = VBoxSDLHardened.cpp
50VBoxSDLHardened_NAME = VBoxSDL
51
52
53#
54# VBoxSDL
55#
56VBoxSDL_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXMAINCLIENTDLL,VBOXMAINCLIENTEXE)
57VBoxSDL_SDKS = LIBSDL
58VBoxSDL_SOURCES = \
59 VBoxSDL.cpp \
60 Framebuffer.cpp \
61 Helper.cpp
62VBoxSDL_SOURCES.darwin = \
63 VBoxSDLMain-darwin.m
64ifndef VBOX_OSE
65 VBoxSDL_SOURCES.win = \
66 win32/WinUI.cpp \
67 win32/TitlebarButtons.cpp \
68 win32/VBoxSDL.rc
69win32/VBoxSDL.rc_INCS = $(PATH_VBoxSDL)
70win32/VBoxSDL.rc_DEPS = $(PATH_VBoxSDL)/VBoxSDL-icon.rc
71win32/VBoxSDL.rc_CLEAN = $(PATH_VBoxSDL)/VBoxSDL-icon.rc
72endif
73
74VBoxSDL_DEFS =
75ifdef VBOX_WITH_SECURELABEL
76 VBoxSDL_DEFS += VBOX_SECURELABEL
77endif
78ifdef VBOX_WITH_VRDP
79 VBoxSDL_DEFS += VBOX_VRDP
80endif
81VBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
82VBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
83VBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
84ifdef VBOX_OPENGL
85 #VBoxSDL_DEFS.linux += VBOX_OPENGL
86endif
87ifndef VBOX_OSE
88 VBoxSDL_DEFS.win = VBOX_WIN32_UI
89endif
90VBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
91VBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
92
93VBoxSDL_INCS = \
94 $(PATH_VBoxSDL)
95ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
96VBoxSDL_INCS += \
97 $(VBOX_XCURSOR_INCS)
98endif
99VBoxSDL_INCS.freebsd = \
100 /usr/include \
101 /usr/local/include \
102 /usr/X11R6/include ## @todo figure this out.
103ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
104
105VBoxSDL_LIBS = \
106 $(LIB_SDK_LIBSDL_SDLMAIN)
107endif
108ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
109VBoxSDL_LIBS += \
110 $(VBOX_XCURSOR_LIBS) \
111 X11
112VBoxSDL_LIBPATH = \
113 $(VBOX_LIBPATH_X11)
114endif
115ifdef VBOX_OPENGL
116 #VBoxSDL_LIBS.linux += GL
117endif
118
119VBoxSDL_LDFLAGS.darwin = \
120 -framework Foundation -framework AppKit
121
122VBoxSDL_CLEAN = $(PATH_VBoxSDL)/Ico64x01.h
123Framebuffer.cpp_DEPS = $(PATH_VBoxSDL)/Ico64x01.h
124
125
126#
127# tstSDL
128#
129tstSDL_TEMPLATE = VBOXR3NPEXE
130tstSDL_SDKS = LIBSDL
131tstSDL_INST = $(INST_TESTCASE)
132tstSDL_SOURCES = \
133 VBoxSDLTest.cpp
134tstSDL_SOURCES.darwin = \
135 VBoxSDLMain-darwin.m
136tstSDL_DEFS = IN_RING3 IN_RT_R3 _GNU_SOURCE
137tstSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
138ifdef VBOX_OPENGL
139tstSDL_DEFS.linux = VBOX_OPENGL
140endif
141tstSDL_INCS = \
142 $(PATH_tstSDL)
143
144tstSDL_LIBS = \
145 $(LIB_RUNTIME)
146ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
147tstSDL_LIBS += \
148 $(LIB_SDK_LIBSDL_SDLMAIN)
149endif
150
151ifdef VBOX_OPENGL
152tstSDL_LIBS.linux += GL
153endif
154ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
155tstSDL_LIBPATH = \
156 $(VBOX_LIBPATH_X11)
157tstSDL_INCS.freebsd = \
158 /usr/include \
159 /usr/local/include \
160 /usr/X11R6/include ## @todo figure this out.
161endif
162
163tstSDL_LDFLAGS.darwin = \
164 -framework Foundation -framework AppKit
165
166tstSDL_CXXFLAGS.win = \
167 -EHsc
168tstSDL_CXXFLAGS.linux = \
169 -DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
170 -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
171
172
173# generate rules
174include $(KBUILD_PATH)/subfooter.kmk
175
176
177# Convert the pnm-file to a byte array.
178$(PATH_VBoxSDL)/Ico64x01.h: $(PATH_ROOT)/src/VBox/Frontends/VBoxSDL/ico64x01.pnm $(VBOX_BIN2C) | $(call DIRDEP,$(PATH_VBoxSDL))
179 $(call MSG_TOOL,bin2c,VBoxSDL,$<,$@)
180 $(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
181
182# Icon include file.
183$(PATH_VBoxSDL)/VBoxSDL-icon.rc: $(VBOX_WINDOWS_ICON_FILE) $(VBoxSDL_PATH)/Makefile.kmk | $$(call DIRDEP,$$(@D))
184 $(RM) -f $@
185 $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
186
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