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