VirtualBox

source: vbox/trunk/src/VBox/Frontends/VBoxBFE/Makefile.kmk@ 36401

Last change on this file since 36401 was 36401, checked in by vboxsync, 14 years ago

VBoxBFE: The testcase/Makefile.kmk is *NOT* allowed to reference variables defined by the parent makefile, that *BREAKS* running make in the testcase subdirectory. tstMouseImpl must use the INTERMEDIATES property just like VBoxBFE to make sure the headers are generated before sources are built, that's probably what caused the build break that r70348 and others tried to fix.

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