VirtualBox

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

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

FE/VBoxBFE: another makefile fix attempt

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