VirtualBox

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

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

Fixed few more dependencies on Makefile.kmk.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.2 KB
Line 
1# $Id: Makefile.kmk 10245 2008-07-04 17:31:35Z 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
30PROGRAMS += VBoxSDL tstSDL
31
32
33#
34# VBoxSDL
35#
36
37VBoxSDL_TEMPLATE = VBOXMAINCLIENTEXE
38VBoxSDL_SDKS = LIBSDL
39VBoxSDL_SOURCES = \
40 VBoxSDL.cpp \
41 Framebuffer.cpp \
42 Helper.cpp
43VBoxSDL_SOURCES.darwin = \
44 VBoxSDLMain-darwin.m
45ifndef VBOX_OSE
46 VBoxSDL_SOURCES.win = \
47 win32/WinUI.cpp \
48 win32/TitlebarButtons.cpp \
49 win32/VBoxSDL.rc
50win32/VBoxSDL.rc_INCS = $(PATH_VBoxSDL)
51win32/VBoxSDL.rc_DEPS = $(PATH_VBoxSDL)/VBoxSDL-icon.rc
52win32/VBoxSDL.rc_CLEAN = $(PATH_VBoxSDL)/VBoxSDL-icon.rc
53endif
54
55VBoxSDL_DEFS =
56ifdef VBOX_WITH_SECURELABEL
57 VBoxSDL_DEFS += VBOX_SECURELABEL
58endif
59ifdef VBOX_WITH_VRDP
60 VBoxSDL_DEFS += VBOX_VRDP
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
68ifndef VBOX_OSE
69 VBoxSDL_DEFS.win = VBOX_WIN32_UI
70endif
71VBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
72VBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
73
74VBoxSDL_INCS = \
75 $(PATH_BIN)/sdk/include \
76 $(PATH_VBoxSDL)
77ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
78VBoxSDL_INCS += \
79 $(VBOX_XCURSOR_INCS)
80endif
81VBoxSDL_INCS.freebsd = \
82 /usr/include \
83 /usr/local/include \
84 /usr/X11R6/include ## @todo figure this out.
85ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
86
87VBoxSDL_LIBS = \
88 $(LIB_SDK_LIBSDL_SDLMAIN)
89endif
90ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
91VBoxSDL_LIBS += \
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
105Framebuffer.cpp_DEPS = $(PATH_VBoxSDL)/Ico64x01.h
106
107
108#
109# tstSDL
110#
111tstSDL_TEMPLATE = VBOXR3NPEXE
112tstSDL_SDKS = LIBSDL
113tstSDL_INST = $(INST_TESTCASE)
114tstSDL_SOURCES = \
115 VBoxSDLTest.cpp
116tstSDL_SOURCES.darwin = \
117 VBoxSDLMain-darwin.m
118tstSDL_DEFS = IN_RING3 IN_RT_R3 _GNU_SOURCE
119tstSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
120ifdef VBOX_OPENGL
121tstSDL_DEFS.linux = VBOX_OPENGL
122endif
123tstSDL_INCS = \
124 $(PATH_tstSDL)
125
126tstSDL_LIBS = \
127 $(LIB_RUNTIME)
128ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
129tstSDL_LIBS += \
130 $(LIB_SDK_LIBSDL_SDLMAIN)
131endif
132
133ifdef VBOX_OPENGL
134tstSDL_LIBS.linux += GL
135endif
136ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
137tstSDL_LIBPATH = \
138 $(VBOX_LIBPATH_X11)
139tstSDL_INCS.freebsd = \
140 /usr/include \
141 /usr/local/include \
142 /usr/X11R6/include ## @todo figure this out.
143endif
144
145tstSDL_LDFLAGS.darwin = \
146 -framework Foundation -framework AppKit
147
148tstSDL_CXXFLAGS.win = \
149 -EHsc
150tstSDL_CXXFLAGS.linux = \
151 -DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
152 -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
153
154
155# generate rules
156include $(KBUILD_PATH)/subfooter.kmk
157
158
159# Convert the pnm-file to a byte array.
160$(PATH_VBoxSDL)/Ico64x01.h: $(PATH_ROOT)/src/VBox/Frontends/VBoxSDL/ico64x01.pnm $(VBOX_BIN2C) | $(call DIRDEP,$(PATH_VBoxSDL))
161 $(call MSG_TOOL,bin2c,VBoxSDL,$<,$@)
162 $(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
163
164# Icon include file.
165$(PATH_VBoxSDL)/VBoxSDL-icon.rc: $(VBOX_WINDOWS_ICON_FILE) $(VBoxSDL_PATH)/Makefile.kmk | $$(call DIRDEP,$$(@D))
166 $(RM) -f $@
167 $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
168
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