VirtualBox

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

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

Started digging into the solaris guest kernel. Added DBGFR3MemRead.

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