VirtualBox

source: vbox/trunk/src/VBox/Debugger/Makefile.kmk@ 9734

Last change on this file since 9734 was 8820, checked in by vboxsync, 16 years ago

Dug out the solaris kernel symbols! Use the "detect" command in the debugger in order to do this.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.9 KB
Line 
1# $Id: Makefile.kmk 8820 2008-05-14 19:49:42Z vboxsync $
2## @file
3# Makefile for the VBox debugger.
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
22DEPTH = ../../..
23include $(KBUILD_PATH)/header.kmk
24
25#
26# The targets.
27#
28ifdef VBOX_WITH_DEBUGGER
29 LIBRARIES += Debugger
30 ifdef VBOX_WITH_TESTCASES
31 PROGRAMS += tstDBGCParser
32 endif
33 ifdef VBOX_WITH_DEBUGGER_GUI
34 DLLS += VBoxDbg
35 ifdef VBOX_WITH_TESTCASES
36 PROGRAMS += tstVBoxDbg
37 endif
38 endif
39endif # VBOX_WITH_DEBUGGER
40ifndef VBOX_OSE
41 INSTALLS.win.x86 += dbghelp
42endif
43
44
45#
46# Debugger library - linked into VBoxVMM.
47#
48Debugger_TEMPLATE = VBOXR3
49Debugger_DEFS = IN_VMM_R3 IN_PDM_R3 IN_CFGM_R3 IN_IOM_R3 IN_SUP_R3 IN_VM_R3 IN_RT_R3 IN_CPUM_R3 IN_SELM_R3 IN_PGM_R3 IN_TRPM_R3 IN_MM_R3 IN_DBG_R3 IN_DBGF_R3 IN_DIS_R3
50Debugger_SOURCES = \
51 DBGConsole.cpp \
52 DBGCBuiltInSymbols.cpp \
53 DBGCCmdHlp.cpp \
54 DBGCCmdWorkers.cpp \
55 DBGCCommands.cpp \
56 DBGCEmulateCodeView.cpp \
57 DBGCOps.cpp \
58 DBGCTcp.cpp \
59 DBGPlugInSolaris.cpp \
60 DBGPlugInCommonELF.cpp
61
62
63#
64# The DBGC parser testcase.
65# This stubs all the VBoxVMM APIs.
66#
67tstDBGCParser_TEMPLATE = VBOXR3TSTEXE
68tstDBGCParser_DEFS = IN_DBGF_R3 IN_CPUM_R3 IN_MM_R3 IN_PGM_R3 IN_SELM_R3
69tstDBGCParser_SOURCES = \
70 testcase/tstDBGCParser.cpp \
71 testcase/tstDBGCStubs.cpp
72tstDBGCParser_LIBS = \
73 $(TARGET_Debugger) \
74 $(LIB_RUNTIME)
75
76
77#
78# Debugger GUI component.
79#
80VBoxDbg_TEMPLATE = VBOXQTGUI
81VBoxDbg_DEFS = IN_DBG_R3
82VBoxDbg_CXXFLAGS.linux = $(TEMPLATE_VBOXQTGUI_CXXFLAGS.linux) -O2
83VBoxDbg_INCS = \
84 . \
85 $(PATH_VBoxDbg)/ui \
86 $(PATH_VBoxDbg)/moc \
87 $(PATH_VBoxDbg)/include
88
89# QDesigner UI sources
90VBoxDbg_QT_UISRCS =
91
92# Headers containing definitions of classes that use the Q_OBJECT macro
93VBoxDbg_QT_MOCHDRS = \
94 VBoxDbgConsole.h \
95 VBoxDbgStats.h \
96 VBoxDbgGui.h
97
98# UI headers (ui.h) containing local definitions of classes that use the Q_OBJECT macro
99VBoxDbg_QT_MOCUIHDRS =
100
101VBoxDbg_GENSRCS = \
102 $(foreach moc,$(notdir $(basename $(VBoxDbg_QT_MOCHDRS))), $(PATH_VBoxDbg)/moc/moc_$(moc).cpp) \
103 $(foreach ui,$(notdir $(basename $(VBoxDbg_QT_UISRCS))), $(PATH_VBoxDbg)/ui/$(ui).cpp $(PATH_VBoxDbg)/moc/moc_$(ui).cpp)
104
105VBoxDbg_GENHDRS = \
106 $(foreach mocui,$(basename $(VBoxDbg_QT_MOCUIHDRS)), $(PATH_VBoxDbg)/moc/$(mocui).moc) \
107 $(foreach moc,$(basename $(VBoxDbg_QT_MOCSRCS)), $(PATH_VBoxDbg)/moc/$(moc).moc) \
108 $(foreach ui,$(basename $(VBoxDbg_QT_UISRCS)), $(PATH_VBoxDbg)/$(ui).h)
109
110VBoxDbg_SOURCES = \
111 $(VBoxDbg_GENSRCS) \
112 VBoxDbg.cpp \
113 VBoxDbgGui.cpp \
114 VBoxDbgBase.cpp \
115 VBoxDbgConsole.cpp \
116 VBoxDbgStats.cpp
117
118VBoxDbg_LDFLAGS.darwin = -install_name @executable_path/VBoxDbg.dylib
119
120VBoxDbg_LIBS = \
121 $(LIB_VMM)
122
123# generated files we need to clean manually
124VBoxDbg_CLEAN += \
125 $(VBoxDbg_GENSRCS) \
126 $(VBoxDbg_GENHDRS)
127
128
129#
130# The VBoxDBG testcase.
131#
132tstVBoxDbg_TEMPLATE = VBOXQTGUIEXE
133tstVBoxDbg_SOURCES = testcase/tstVBoxDbg.cpp
134tstVBoxDbg_LIBS = \
135 $(LIB_VMM) \
136 $(LIB_RUNTIME)
137ifeq ($(KBUILD_TARGET),win)
138tstVBoxDbg_LIBS += \
139 $(PATH_LIB)/VBoxDbg.lib
140else
141tstVBoxDbg_LIBS += \
142 $(PATH_BIN)/VBoxDbg$(VBOX_SUFF_DLL)
143endif
144
145
146#
147# Install the dbghelp.dll binary.
148#
149dbghelp_INST = bin/
150dbghelp_SOURCES.x86 = win32/dbghelp.dll
151dbghelp_SOURCES.amd64 = win64/dbghelp.dll
152
153
154include $(KBUILD_PATH)/footer.kmk
155
156
157#
158# Source file generation rules
159#
160
161## Generate a rule to create a MOC source file from a header containing
162# classes that use the Q_OBJECT macro.
163# @param $mochdr the header file with Q_OBJECT
164define def_qt_gen_src_moc
165$(eval mocsrc := $(PATH_$(target))/moc/moc_$(notdir $(basename $(mochdr))).cpp)
166$$(mocsrc): $(mochdr)
167 $(call MSG_TOOL,moc,$(target),$(mocsrc),$(mochdr))
168 $(QUIET)$(MKDIR) -p $(basename $(mocsrc))
169 $(QUIET)$(VBOX_MOC) $(mochdr) -o $(mocsrc)
170
171endef
172
173## Generate a rule to create a MOC include file from a source containing
174# local classes that use the Q_OBJECT macro. This include is then included
175# by that source, so it must be generated before the source gets compiled.
176# @param $mocsrc the source file with Q_OBJECT
177define def_qt_gen_inc_moc
178$(eval mocobj := $(PATH_$(target)_$(mocsrc))/$(notdir $(basename $(mocsrc)))$(VBOX_SUFF_OBJ))
179$(eval mocinc := $(PATH_$(target))/moc/$(notdir $(basename $(mocsrc))).moc)
180$$(mocobj): $(mocinc)
181$$(mocinc): $(mocsrc)
182 $(call MSG_TOOL,moc,$(target),$(mocsrc),$(mocinc))
183 $(QUIET)$(MKDIR) -p $(basename $(mocinc))
184 $(QUIET)$(VBOX_MOC) -i $(mocsrc) -o $(mocinc)
185
186endef
187
188## Generate a rule to create a MOC include file from a UI header (ui.h) containing
189# local classes that use the Q_OBJECT macro. This include is then included
190# by that header, so it must be generated before the UI source gets compiled.
191# @param $mocuihdr the UI header file with Q_OBJECT
192define def_qt_gen_inc_mocuihdr
193$(eval uisrc := $(PATH_$(target))/ui/$(notdir $(basename $(basename $(mocuihdr)))).cpp)
194$(eval uiobj := $(PATH_$(target)_$(uisrc))/$(notdir $(basename $(uisrc)))$(VBOX_SUFF_OBJ))
195$(eval mocuiinc := $(PATH_$(target))/moc/$(notdir $(basename $(mocuihdr))).moc)
196$$(uisrc): $(mocuiinc)
197$$(mocuiinc): $(mocuihdr)
198 $(call MSG_TOOL,moc,$(target),$(mocuihdr),$(mocuiinc))
199 $(QUIET)$(MKDIR) -p $(basename $(mocuiinc))
200 $(QUIET)$(VBOX_MOC) -i $(mocuihdr) -o $(mocuiinc)
201
202endef
203
204define def_qt_gen_src_ui
205$(eval uisrc := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).cpp)
206$(eval uihdr := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).h)
207$(eval mocsrc := $(PATH_$(target))/moc/moc_$(notdir $(basename $(uifile))).cpp)
208
209$$(uihdr): $(uifile) | $(call DIRDEP,$(dir $(uihdr)))
210 $(call MSG_TOOL,uic,$(target),$(uifile),$(uihdr))
211 $(QUIET)$(VBOX_UIC) $(uifile) -o $(uihdr)
212
213$$(uisrc): $(uihdr) $(uifile) $(wildcard $(uifile).h) | $(call DIRDEP,$(dir $(uisrc)))
214 $(call MSG_TOOL,uic,$(target),$(uihdr),$(uisrc))
215 $(QUIET)$(VBOX_UIC) $(uifile) -i $(uihdr) -o $(uisrc)
216
217$$(mocsrc): $(uihdr) | $(call DIRDEP,$(dir $(mocsrc)))
218 $(call MSG_TOOL,uic,$(target),$(uihdr),$(mocsrc))
219 $(QUIET)$(VBOX_MOC) $(uihdr) -o $(mocsrc)
220
221endef
222
223## Generate rules for generating the Qt source for a target.
224# @param $target Target name.
225define def_qt_gen_src
226# moc srcs from hdrs with Q_OBJECT
227$(foreach mochdr,$($(target)_QT_MOCHDRS),$(eval $(def_qt_gen_src_moc)))
228# moc includes from srcs with Q_OBJECT
229$(foreach mocsrc,$($(target)_QT_MOCSRCS),$(eval $(def_qt_gen_inc_moc)))
230# moc includes from UI headers with Q_OBJECT
231$(foreach mocuihdr,$($(target)_QT_MOCUIHDRS),$(eval $(def_qt_gen_inc_mocuihdr)))
232# ui
233$(foreach uifile,$($(target)_QT_UISRCS) ,$(eval $(def_qt_gen_src_ui)))
234# dirs
235$(call DIRDEP,$(PATH_$(target))/ui/) $(call DIRDEP,$(PATH_$(target))/moc/):
236 $(call MSG_MKDIR,$$@)
237 $(QUIET)$(MKDIR) -p $$@
238
239endef
240
241# Generate Qt sources.
242$(foreach target,VBoxDbg,$(eval $(def_qt_gen_src)))
243
244
245$(call DIRDEP,$(PATH_VBoxDbg)/include/):
246 $(call MSG_MKDIR,$@)
247 $(QUIET)$(MKDIR) -p $@
248
249
250#
251# Translation stuff
252#
253
254VBoxDbg_TRANSLATIONS = \
255 nls/VBoxDbg_de.ts
256
257updatenls:
258 $(VBOX_LUPDATE) $(VBoxDbg_SOURCES) $(VBoxDbg_QT_MOCHDRS) $(VBoxDbg_GENHDRS) -ts $(VBoxDbg_TRANSLATIONS)
259
260
261#
262# Hand made dependencies go here
263#
264$(PATH_VBoxDbg)/gen/ui/VBoxNewVMWzd$(VBOX_SUFF_OBJ): $(PATH_VBoxDbg)/ui/VBoxNewVMWzd.h $(PATH_VBoxDbg)/ui/VBoxDiskImageMgrDlg.h
265$(PATH_VBoxDbg)/gen/ui/VBoxDiskImageMgrDlg$(VBOX_SUFF_OBJ): ui/VBoxDiskImageMgrDlg.ui $(PATH_VBoxDbg)/ui/VBoxNewHDWzd.h
266$(PATH_VBoxDbg)/gen/ui/VBoxCloseVMDlg$(VBOX_SUFF_OBJ): $(PATH_VBoxDbg)/ui/VBoxCloseVMDlg.h
267
268
269test:
270 echo $(VBoxDbg_GENSRCS) | sed -e "s/ /\n/g"
271
272testwrappers: $(WRAPPERSFILE)
273
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