1 | # $Id: Makefile.kmk 8760 2008-05-11 18:39:30Z 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 $(KBUILD_PATH)/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 | win32/VBoxSDL.rc_INCS = $(PATH_VBoxSDL)
|
---|
47 | win32/VBoxSDL.rc_DEPS = $(PATH_VBoxSDL)/VBoxSDL-icon.rc
|
---|
48 | win32/VBoxSDL.rc_CLEAN = $(PATH_VBoxSDL)/VBoxSDL-icon.rc
|
---|
49 | endif
|
---|
50 |
|
---|
51 | VBoxSDL_DEFS =
|
---|
52 | ifdef VBOX_WITH_SECURELABEL
|
---|
53 | VBoxSDL_DEFS += VBOX_SECURELABEL
|
---|
54 | endif
|
---|
55 | ifdef VBOX_WITH_VRDP
|
---|
56 | VBoxSDL_DEFS += VBOX_VRDP
|
---|
57 | endif
|
---|
58 | VBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
|
---|
59 | VBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
|
---|
60 | VBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
|
---|
61 | ifdef VBOX_OPENGL
|
---|
62 | #VBoxSDL_DEFS.linux += VBOX_OPENGL
|
---|
63 | endif
|
---|
64 | ifndef VBOX_OSE
|
---|
65 | VBoxSDL_DEFS.win = VBOX_WIN32_UI
|
---|
66 | endif
|
---|
67 | VBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
|
---|
68 | VBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
|
---|
69 |
|
---|
70 | VBoxSDL_INCS = \
|
---|
71 | $(PATH_BIN)/sdk/include \
|
---|
72 | $(PATH_VBoxSDL)
|
---|
73 | ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
|
---|
74 | VBoxSDL_INCS += \
|
---|
75 | $(VBOX_XCURSOR_INCS)
|
---|
76 | endif
|
---|
77 | VBoxSDL_INCS.freebsd = \
|
---|
78 | /usr/include \
|
---|
79 | /usr/local/include \
|
---|
80 | /usr/X11R6/include ## @todo figure this out.
|
---|
81 | ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
|
---|
82 |
|
---|
83 | VBoxSDL_LIBS = \
|
---|
84 | $(LIB_SDK_LIBSDL_SDLMAIN)
|
---|
85 | endif
|
---|
86 | ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
|
---|
87 | VBoxSDL_LIBS += \
|
---|
88 | $(VBOX_XCURSOR_LIBS) \
|
---|
89 | X11
|
---|
90 | VBoxSDL_LIBPATH = \
|
---|
91 | $(VBOX_LIBPATH_X11)
|
---|
92 | endif
|
---|
93 | ifdef VBOX_OPENGL
|
---|
94 | #VBoxSDL_LIBS.linux += GL
|
---|
95 | endif
|
---|
96 |
|
---|
97 | VBoxSDL_LDFLAGS.darwin = \
|
---|
98 | -framework Foundation -framework AppKit
|
---|
99 |
|
---|
100 | VBoxSDL_CLEAN = $(PATH_VBoxSDL)/Ico64x01.h
|
---|
101 | Framebuffer.cpp_DEPS = $(PATH_VBoxSDL)/Ico64x01.h
|
---|
102 |
|
---|
103 |
|
---|
104 | #
|
---|
105 | # tstSDL
|
---|
106 | #
|
---|
107 | tstSDL_TEMPLATE = VBOXR3NPEXE
|
---|
108 | tstSDL_SDKS = LIBSDL
|
---|
109 | tstSDL_INST = $(INST_TESTCASE)
|
---|
110 | tstSDL_SOURCES = \
|
---|
111 | VBoxSDLTest.cpp
|
---|
112 | tstSDL_SOURCES.darwin = \
|
---|
113 | VBoxSDLMain-darwin.m
|
---|
114 | tstSDL_DEFS = IN_RING3 IN_RT_R3 _GNU_SOURCE
|
---|
115 | tstSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
|
---|
116 | ifdef VBOX_OPENGL
|
---|
117 | tstSDL_DEFS.linux = VBOX_OPENGL
|
---|
118 | endif
|
---|
119 | tstSDL_INCS = \
|
---|
120 | $(PATH_tstSDL)
|
---|
121 |
|
---|
122 | tstSDL_LIBS = \
|
---|
123 | $(LIB_RUNTIME)
|
---|
124 | ifneq ($(filter-out win solaris,$(KBUILD_TARGET)),)
|
---|
125 | tstSDL_LIBS += \
|
---|
126 | $(LIB_SDK_LIBSDL_SDLMAIN)
|
---|
127 | endif
|
---|
128 |
|
---|
129 | ifdef VBOX_OPENGL
|
---|
130 | tstSDL_LIBS.linux += GL
|
---|
131 | endif
|
---|
132 | ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
|
---|
133 | tstSDL_LIBPATH = \
|
---|
134 | $(VBOX_LIBPATH_X11)
|
---|
135 | tstSDL_INCS.freebsd = \
|
---|
136 | /usr/include \
|
---|
137 | /usr/local/include \
|
---|
138 | /usr/X11R6/include ## @todo figure this out.
|
---|
139 | endif
|
---|
140 |
|
---|
141 | tstSDL_LDFLAGS.darwin = \
|
---|
142 | -framework Foundation -framework AppKit
|
---|
143 |
|
---|
144 | tstSDL_CXXFLAGS.win = \
|
---|
145 | -EHsc
|
---|
146 | tstSDL_CXXFLAGS.linux = \
|
---|
147 | -DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
|
---|
148 | -Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
|
---|
149 |
|
---|
150 |
|
---|
151 | # generate rules
|
---|
152 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
153 |
|
---|
154 |
|
---|
155 | # Convert the pnm-file to a byte array.
|
---|
156 | $(PATH_VBoxSDL)/Ico64x01.h: $(PATH_ROOT)/src/VBox/Frontends/VBoxSDL/ico64x01.pnm $(VBOX_BIN2C) | $(call DIRDEP,$(PATH_VBoxSDL))
|
---|
157 | $(call MSG_TOOL,bin2c,VBoxSDL,$<,$@)
|
---|
158 | $(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
|
---|
159 |
|
---|
160 | # Icon include file.
|
---|
161 | $(PATH_VBoxSDL)/VBoxSDL-icon.rc: $(VBOX_WINDOWS_ICON_FILE) Makefile.kmk | $$(call DIRDEP,$$(@D))
|
---|
162 | $(RM) -f $@
|
---|
163 | $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
|
---|
164 |
|
---|