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