1 | # $Id: Makefile.kmk 26982 2010-03-03 10:28:21Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for VBoxBFE (a basic frontend which doesn't make use of Main).
|
---|
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 | SUB_DEPTH = ../../../..
|
---|
23 | include $(KBUILD_PATH)/subheader.kmk
|
---|
24 | if !defined(VBOX_WITH_HARDENING) || "$(KBUILD_TARGET)" != "darwin" # No hardened VBoxBFE on darwin (.m).
|
---|
25 |
|
---|
26 | #
|
---|
27 | # Files from Main needed for building VBoxBFE
|
---|
28 | #
|
---|
29 | VBOXBFE_MAIN_CPP = MouseImpl.cpp
|
---|
30 | VBOXBFE_MAIN_H = MouseImpl.h ConsoleEvents.h
|
---|
31 |
|
---|
32 | #
|
---|
33 | # Targets.
|
---|
34 | #
|
---|
35 | ifdef VBOX_WITH_HARDENING
|
---|
36 | PROGRAMS += VBoxBFEHardened
|
---|
37 | DLLS += VBoxBFE
|
---|
38 | else
|
---|
39 | PROGRAMS += VBoxBFE
|
---|
40 | endif
|
---|
41 |
|
---|
42 |
|
---|
43 | #
|
---|
44 | # Hardened VBoxBFE.
|
---|
45 | #
|
---|
46 | VBoxBFEHardened_TEMPLATE = VBOXR3HARDENEDEXE
|
---|
47 | VBoxBFEHardened_SOURCES = VBoxBFEHardened.cpp
|
---|
48 | VBoxBFEHardened_NAME = VBoxBFE
|
---|
49 |
|
---|
50 |
|
---|
51 | #
|
---|
52 | # VBoxBFE
|
---|
53 | #
|
---|
54 | VBoxBFE_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXR3NP,VBOXR3NPEXE)
|
---|
55 | #ifdef VBOX_WITH_SECURELABEL
|
---|
56 | #VBoxBFE_DEFS += VBOX_SECURELABEL
|
---|
57 | #endif
|
---|
58 | ifdef VBOX_WITH_VRDP
|
---|
59 | VBoxBFE_DEFS += VBOX_WITH_VRDP
|
---|
60 | endif
|
---|
61 | VBoxBFE_DEFS += VBOXBFE_WITHOUT_COM
|
---|
62 | ifdef VBOX_WITH_LINUX_COMPILER_H
|
---|
63 | VBoxBFE_DEFS += VBOX_WITH_LINUX_COMPILER_H
|
---|
64 | endif
|
---|
65 | VBoxBFE_DEFS.freebsd = VBOXBFE_WITH_X11
|
---|
66 | VBoxBFE_DEFS.l4 = _GNU_SOURCE
|
---|
67 | VBoxBFE_DEFS.linux = _GNU_SOURCE VBOXBFE_WITH_X11
|
---|
68 | VBoxBFE_DEFS.solaris = VBOXBFE_WITH_X11
|
---|
69 | ifdef VBOX_WITH_CROSSBOW
|
---|
70 | VBoxBFE_DEFS.solaris += VBOX_WITH_CROSSBOW
|
---|
71 | endif
|
---|
72 | VBoxBFE_DEFS.win.x86 = _WIN32_WINNT=0x0500
|
---|
73 |
|
---|
74 | VBoxBFE_SOURCES = \
|
---|
75 | VBoxBFE.cpp \
|
---|
76 | VMMDevInterface.cpp \
|
---|
77 | DisplayImpl.cpp \
|
---|
78 | $(PATH_VBoxBFE)/MouseImpl.cpp \
|
---|
79 | KeyboardImpl.cpp \
|
---|
80 | StatusImpl.cpp \
|
---|
81 | MachineDebuggerImpl.cpp \
|
---|
82 | VMControl.cpp
|
---|
83 |
|
---|
84 | ifdef VBOX_WITH_HGCM
|
---|
85 | VBoxBFE_DEFS += VBOX_WITH_HGCM
|
---|
86 | VBoxBFE_SOURCES += \
|
---|
87 | HGCM.cpp \
|
---|
88 | HGCMThread.cpp \
|
---|
89 | HGCMObjects.cpp
|
---|
90 | endif
|
---|
91 |
|
---|
92 | VBoxBFE_SOURCES.darwin = \
|
---|
93 | VBoxBFEMain-darwin.m
|
---|
94 |
|
---|
95 | VBoxBFE_SOURCES.l4 = \
|
---|
96 | L4Console.cpp \
|
---|
97 | L4Framebuffer.cpp \
|
---|
98 | L4IDLInterface.cpp \
|
---|
99 | EmulCpp.cpp
|
---|
100 |
|
---|
101 | # SDL
|
---|
102 | ifneq ($(KBUILD_TARGET),l4)
|
---|
103 | VBoxBFE_SDKS += LIBSDL
|
---|
104 | VBoxBFE_DEFS += USE_SDL
|
---|
105 | VBoxBFE_SOURCES += \
|
---|
106 | SDLConsole.cpp \
|
---|
107 | SDLFramebuffer.cpp
|
---|
108 | endif
|
---|
109 |
|
---|
110 | # USB Support
|
---|
111 | if1of ($(KBUILD_TARGET), l4 win)
|
---|
112 | VBoxBFE_DEFS += VBOXBFE_WITH_USB
|
---|
113 | VBoxBFE_SOURCES += \
|
---|
114 | HostUSBImpl.cpp \
|
---|
115 | HostUSBDeviceImpl.cpp \
|
---|
116 | USBProxyService.cpp
|
---|
117 | VBoxBFE_SOURCES.l4 += \
|
---|
118 | USBProxyServiceLinux.cpp
|
---|
119 | VBoxBFE_SOURCES.linux += \
|
---|
120 | USBProxyServiceLinux.cpp
|
---|
121 | endif
|
---|
122 |
|
---|
123 | VBoxBFE_INCS = \
|
---|
124 | $(PATH_VBoxBFE) \
|
---|
125 | $(VBOX_PATH_SDK)/include \
|
---|
126 | $(PATH_ROOT)/src/VBox/Frontends/VBoxBFE
|
---|
127 | ifneq ($(filter-out win os2 l4 darwin,$(KBUILD_TARGET)),) # X11
|
---|
128 | VBoxBFE_INCS += \
|
---|
129 | $(VBOX_XCURSOR_INCS)
|
---|
130 | endif
|
---|
131 |
|
---|
132 | VBoxBFE_LIBS = \
|
---|
133 | $(LIB_RUNTIME) \
|
---|
134 | $(LIB_VMM)
|
---|
135 | ifneq ($(filter-out win os2 l4,$(KBUILD_TARGET)),)
|
---|
136 | VBoxBFE_LIBS += \
|
---|
137 | $(LIB_REM)
|
---|
138 | endif
|
---|
139 | ifneq ($(filter-out win os2 l4 darwin,$(KBUILD_TARGET)),) # X11
|
---|
140 | VBoxBFE_LIBS += \
|
---|
141 | $(VBOX_XCURSOR_LIBS) \
|
---|
142 | X11
|
---|
143 | VBoxBFE_LIBPATH += \
|
---|
144 | $(VBOX_LIBPATH_X11)
|
---|
145 | endif
|
---|
146 | ifndef VBOX_WITHOUT_COM
|
---|
147 | VBoxBFE_LIBS.win = \
|
---|
148 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls.lib
|
---|
149 | endif
|
---|
150 | VBoxBFE_LIBS.l4 = \
|
---|
151 | $(L4_LIBDIR)/libl4con-idl.a \
|
---|
152 | $(L4_LIBDIR)/libconstream-server.a \
|
---|
153 | $(L4_LIBDIR)/libvboxctrl-server.a \
|
---|
154 | $(L4_LIBDIR)/libl4sys.a
|
---|
155 | VBoxBFE_LIBS.darwin = \
|
---|
156 | $(LIB_SDK_LIBSDL_SDLMAIN)
|
---|
157 | VBoxBFE_LDFLAGS.darwin = -framework Foundation -framework AppKit
|
---|
158 |
|
---|
159 | VBoxBFE_CXXFLAGS.l4 += -fno-rtti -nostdinc -Wno-non-virtual-dtor \
|
---|
160 | $(addprefix -I,$(VBOX_L4_GCC3_INCS) $(L4_INCDIR))
|
---|
161 | ## @todo why is it all this cool stuff here only for linux? If it's important, -fshort-wchar would apply to all GCC platforms.
|
---|
162 | VBoxBFE_DEFS.linux = \
|
---|
163 | NDEBUG TRIMMED
|
---|
164 | VBoxBFE_CXXFLAGS.linux = \
|
---|
165 | -fno-rtti -fno-exceptions -fshort-wchar -pthread
|
---|
166 |
|
---|
167 | VBoxBFE_CLEAN = $(PATH_VBoxBFE)/Ico64x01.h
|
---|
168 | VBoxBFE_SDLConsole.cpp_DEPS = $(PATH_VBoxBFE)/Ico64x01.h
|
---|
169 |
|
---|
170 | # Convert the pnm-file to a byte array.
|
---|
171 | $$(PATH_VBoxBFE)/Ico64x01.h: $(PATH_ROOT)/src/VBox/Frontends/VBoxBFE/ico64x01.pnm $(VBOX_BIN2C) | $$(dir $$@)
|
---|
172 | $(call MSG_TOOL,bin2c,VBoxBFE,$<,$@)
|
---|
173 | $(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
|
---|
174 |
|
---|
175 | VBoxBFE_DEPS += $(addprefix $(PATH_VBoxBFE)/,$(VBOXBFE_MAIN_CPP) $(VBOXBFE_MAIN_H))
|
---|
176 |
|
---|
177 | # Pattern rules for copying needed files from Main
|
---|
178 | $(addprefix $$(PATH_VBoxBFE)/,$(VBOXBFE_MAIN_CPP)): \
|
---|
179 | $$(PATH_VBoxBFE)/% : $(PATH_ROOT)/src/VBox/Main/% | $$(dir $$@)
|
---|
180 | $(call MSG_INST_FILE,$<,$@)
|
---|
181 | $(QUIET)$(CP_EXT) $< $@
|
---|
182 |
|
---|
183 | $(addprefix $$(PATH_VBoxBFE)/,$(VBOXBFE_MAIN_H)): \
|
---|
184 | $$(PATH_VBoxBFE)/% : $(PATH_ROOT)/src/VBox/Main/include/% | $$(dir $$@)
|
---|
185 | $(call MSG_INST_FILE,$<,$@)
|
---|
186 | $(QUIET)$(CP_EXT) $< $@
|
---|
187 |
|
---|
188 |
|
---|
189 |
|
---|
190 | endif # !VBOX_WITH_HARDENING || !darwin
|
---|
191 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
192 |
|
---|