VirtualBox

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

Last change on this file since 7392 was 6759, checked in by vboxsync, 17 years ago

Converted all but VirtualBox/Makefile.kmk to sub-makefiles.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1# $Id: Makefile.kmk 6759 2008-02-02 09:44:51Z vboxsync $
2## @file
3# Sub-Makefile for VBoxSDL (a simple frontend based on SDL).
4#
5
6#
7# Copyright (C) 2006-2007 innotek GmbH
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
18DEPTH ?= ../../../..
19SUB_DEPTH = ..
20include $(PATH_KBUILD)/subheader.kmk
21
22PROGRAMS += VBoxSDL tstSDL
23
24
25#
26# VBoxSDL
27#
28
29VBoxSDL_TEMPLATE = VBOXMAINCLIENTEXE
30VBoxSDL_SDKS = LIBSDL
31VBoxSDL_SOURCES = \
32 VBoxSDL.cpp \
33 Framebuffer.cpp \
34 Helper.cpp
35VBoxSDL_SOURCES.darwin = \
36 VBoxSDLMain-darwin.m
37ifndef VBOX_OSE
38 VBoxSDL_SOURCES.win = \
39 win32/WinUI.cpp \
40 win32/TitlebarButtons.cpp \
41 win32/VBoxSDL.rc
42endif
43
44VBoxSDL_DEFS =
45ifdef VBOX_WITH_SECURELABEL
46 VBoxSDL_DEFS += VBOX_SECURELABEL
47endif
48ifdef VBOX_WITH_VRDP
49 VBoxSDL_DEFS += VBOX_VRDP
50endif
51VBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
52VBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
53VBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
54ifdef VBOX_OPENGL
55 #VBoxSDL_DEFS.linux += VBOX_OPENGL
56endif
57ifndef VBOX_OSE
58 VBoxSDL_DEFS.win = VBOX_WIN32_UI
59endif
60VBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
61VBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
62
63VBoxSDL_INCS = \
64 $(PATH_BIN)/sdk/include \
65 $(PATH_VBoxSDL)
66ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
67VBoxSDL_INCS += \
68 $(VBOX_XCURSOR_INCS)
69endif
70VBoxSDL_INCS.freebsd = \
71 /usr/include \
72 /usr/local/include \
73 /usr/X11R6/include ## @todo figure this out.
74ifneq ($(filter-out win solaris,$(BUILD_TARGET)),)
75
76VBoxSDL_LIBS = \
77 $(LIB_SDK_LIBSDL_SDLMAIN)
78endif
79ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
80VBoxSDL_LIBS += \
81 $(VBOX_XCURSOR_LIBS) \
82 X11
83VBoxSDL_LIBPATH = \
84 $(VBOX_LIBPATH_X11)
85endif
86ifdef VBOX_OPENGL
87 #VBoxSDL_LIBS.linux += GL
88endif
89
90VBoxSDL_LDFLAGS.darwin = \
91 -framework Foundation -framework AppKit
92
93VBoxSDL_CLEAN = $(PATH_VBoxSDL)/Ico64x01.h
94Framebuffer.cpp_DEPS = $(PATH_VBoxSDL)/Ico64x01.h
95
96
97#
98# tstSDL
99#
100tstSDL_TEMPLATE = VBOXR3NPEXE
101tstSDL_SDKS = LIBSDL
102tstSDL_INST = $(INST_TESTCASE)
103tstSDL_SOURCES = \
104 VBoxSDLTest.cpp
105tstSDL_SOURCES.darwin = \
106 VBoxSDLMain-darwin.m
107tstSDL_DEFS = IN_RING3 IN_RT_R3 _GNU_SOURCE
108tstSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
109ifdef VBOX_OPENGL
110tstSDL_DEFS.linux = VBOX_OPENGL
111endif
112tstSDL_INCS = \
113 $(PATH_tstSDL)
114
115tstSDL_LIBS = \
116 $(LIB_RUNTIME)
117ifneq ($(filter-out win solaris,$(BUILD_TARGET)),)
118tstSDL_LIBS += \
119 $(LIB_SDK_LIBSDL_SDLMAIN)
120endif
121
122ifdef VBOX_OPENGL
123tstSDL_LIBS.linux += GL
124endif
125ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
126tstSDL_LIBPATH = \
127 $(VBOX_LIBPATH_X11)
128tstSDL_INCS.freebsd = \
129 /usr/include \
130 /usr/local/include \
131 /usr/X11R6/include ## @todo figure this out.
132endif
133
134tstSDL_LDFLAGS.darwin = \
135 -framework Foundation -framework AppKit
136
137tstSDL_CXXFLAGS.win = \
138 -EHsc
139tstSDL_CXXFLAGS.linux = \
140 -DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
141 -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
142
143
144# generate rules
145include $(PATH_KBUILD)/subfooter.kmk
146
147
148# Convert the pnm-file to a byte array.
149$(PATH_VBoxSDL)/Ico64x01.h: $(PATH_ROOT)/src/VBox/Frontends/VBoxSDL/ico64x01.pnm $(VBOX_BIN2C) | $(call DIRDEP,$(PATH_VBoxSDL))
150 $(call MSG_TOOL,bin2c,VBoxSDL,$<,$@)
151 $(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
152
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