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 |
|
---|
18 | DEPTH ?= ../../../..
|
---|
19 | SUB_DEPTH = ..
|
---|
20 | include $(PATH_KBUILD)/subheader.kmk
|
---|
21 |
|
---|
22 | PROGRAMS += VBoxSDL tstSDL
|
---|
23 |
|
---|
24 |
|
---|
25 | #
|
---|
26 | # VBoxSDL
|
---|
27 | #
|
---|
28 |
|
---|
29 | VBoxSDL_TEMPLATE = VBOXMAINCLIENTEXE
|
---|
30 | VBoxSDL_SDKS = LIBSDL
|
---|
31 | VBoxSDL_SOURCES = \
|
---|
32 | VBoxSDL.cpp \
|
---|
33 | Framebuffer.cpp \
|
---|
34 | Helper.cpp
|
---|
35 | VBoxSDL_SOURCES.darwin = \
|
---|
36 | VBoxSDLMain-darwin.m
|
---|
37 | ifndef VBOX_OSE
|
---|
38 | VBoxSDL_SOURCES.win = \
|
---|
39 | win32/WinUI.cpp \
|
---|
40 | win32/TitlebarButtons.cpp \
|
---|
41 | win32/VBoxSDL.rc
|
---|
42 | endif
|
---|
43 |
|
---|
44 | VBoxSDL_DEFS =
|
---|
45 | ifdef VBOX_WITH_SECURELABEL
|
---|
46 | VBoxSDL_DEFS += VBOX_SECURELABEL
|
---|
47 | endif
|
---|
48 | ifdef VBOX_WITH_VRDP
|
---|
49 | VBoxSDL_DEFS += VBOX_VRDP
|
---|
50 | endif
|
---|
51 | VBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
|
---|
52 | VBoxSDL_DEFS.linux = _GNU_SOURCE VBOXSDL_WITH_X11
|
---|
53 | VBoxSDL_DEFS.solaris = VBOXSDL_WITH_X11
|
---|
54 | ifdef VBOX_OPENGL
|
---|
55 | #VBoxSDL_DEFS.linux += VBOX_OPENGL
|
---|
56 | endif
|
---|
57 | ifndef VBOX_OSE
|
---|
58 | VBoxSDL_DEFS.win = VBOX_WIN32_UI
|
---|
59 | endif
|
---|
60 | VBoxSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
|
---|
61 | VBoxSDL_DEFS.win.amd64 = _WIN32_WINNT=0x0510
|
---|
62 |
|
---|
63 | VBoxSDL_INCS = \
|
---|
64 | $(PATH_BIN)/sdk/include \
|
---|
65 | $(PATH_VBoxSDL)
|
---|
66 | ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
|
---|
67 | VBoxSDL_INCS += \
|
---|
68 | $(VBOX_XCURSOR_INCS)
|
---|
69 | endif
|
---|
70 | VBoxSDL_INCS.freebsd = \
|
---|
71 | /usr/include \
|
---|
72 | /usr/local/include \
|
---|
73 | /usr/X11R6/include ## @todo figure this out.
|
---|
74 | ifneq ($(filter-out win solaris,$(BUILD_TARGET)),)
|
---|
75 |
|
---|
76 | VBoxSDL_LIBS = \
|
---|
77 | $(LIB_SDK_LIBSDL_SDLMAIN)
|
---|
78 | endif
|
---|
79 | ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
|
---|
80 | VBoxSDL_LIBS += \
|
---|
81 | $(VBOX_XCURSOR_LIBS) \
|
---|
82 | X11
|
---|
83 | VBoxSDL_LIBPATH = \
|
---|
84 | $(VBOX_LIBPATH_X11)
|
---|
85 | endif
|
---|
86 | ifdef VBOX_OPENGL
|
---|
87 | #VBoxSDL_LIBS.linux += GL
|
---|
88 | endif
|
---|
89 |
|
---|
90 | VBoxSDL_LDFLAGS.darwin = \
|
---|
91 | -framework Foundation -framework AppKit
|
---|
92 |
|
---|
93 | VBoxSDL_CLEAN = $(PATH_VBoxSDL)/Ico64x01.h
|
---|
94 | Framebuffer.cpp_DEPS = $(PATH_VBoxSDL)/Ico64x01.h
|
---|
95 |
|
---|
96 |
|
---|
97 | #
|
---|
98 | # tstSDL
|
---|
99 | #
|
---|
100 | tstSDL_TEMPLATE = VBOXR3NPEXE
|
---|
101 | tstSDL_SDKS = LIBSDL
|
---|
102 | tstSDL_INST = $(INST_TESTCASE)
|
---|
103 | tstSDL_SOURCES = \
|
---|
104 | VBoxSDLTest.cpp
|
---|
105 | tstSDL_SOURCES.darwin = \
|
---|
106 | VBoxSDLMain-darwin.m
|
---|
107 | tstSDL_DEFS = IN_RING3 IN_RT_R3 _GNU_SOURCE
|
---|
108 | tstSDL_DEFS.win.x86 = _WIN32_WINNT=0x0500
|
---|
109 | ifdef VBOX_OPENGL
|
---|
110 | tstSDL_DEFS.linux = VBOX_OPENGL
|
---|
111 | endif
|
---|
112 | tstSDL_INCS = \
|
---|
113 | $(PATH_tstSDL)
|
---|
114 |
|
---|
115 | tstSDL_LIBS = \
|
---|
116 | $(LIB_RUNTIME)
|
---|
117 | ifneq ($(filter-out win solaris,$(BUILD_TARGET)),)
|
---|
118 | tstSDL_LIBS += \
|
---|
119 | $(LIB_SDK_LIBSDL_SDLMAIN)
|
---|
120 | endif
|
---|
121 |
|
---|
122 | ifdef VBOX_OPENGL
|
---|
123 | tstSDL_LIBS.linux += GL
|
---|
124 | endif
|
---|
125 | ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11
|
---|
126 | tstSDL_LIBPATH = \
|
---|
127 | $(VBOX_LIBPATH_X11)
|
---|
128 | tstSDL_INCS.freebsd = \
|
---|
129 | /usr/include \
|
---|
130 | /usr/local/include \
|
---|
131 | /usr/X11R6/include ## @todo figure this out.
|
---|
132 | endif
|
---|
133 |
|
---|
134 | tstSDL_LDFLAGS.darwin = \
|
---|
135 | -framework Foundation -framework AppKit
|
---|
136 |
|
---|
137 | tstSDL_CXXFLAGS.win = \
|
---|
138 | -EHsc
|
---|
139 | tstSDL_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
|
---|
145 | include $(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 |
|
---|