VirtualBox

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

Last change on this file since 5674 was 5674, checked in by vboxsync, 17 years ago

Split out the built-in symbols.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.1 KB
Line 
1# $Id: Makefile.kmk 5674 2007-11-11 05:34:02Z vboxsync $
2## @file
3# Makefile for the VBox debugger.
4#
5
6#
7# Copyright (C) 2006-2007 innotek GmbH
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 as published by the Free Software Foundation,
13# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14# distribution. VirtualBox OSE is distributed in the hope that it will
15# be useful, but WITHOUT ANY WARRANTY of any kind.
16
17DEPTH = ../../..
18include $(PATH_KBUILD)/header.kmk
19
20LIBRARIES = Debugger
21ifdef VBOX_WITH_DEBUGGER_GUI
22DLLS = VBoxDbg
23PROGRAMS = tstVBoxDbg
24endif
25
26ifndef VBOX_OSE
27INSTALLS.win.x86 = dbghelp
28endif
29
30
31#
32# Debugger library
33#
34Debugger_TEMPLATE = VBOXR3
35Debugger_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
36Debugger_SOURCES = \
37 DBGConsole.cpp \
38 DBGCBuiltInSymbols.cpp \
39 DBGCEmulateCodeView.cpp \
40 DBGCOps.cpp \
41 DBGCTcp.cpp
42
43#
44# The testcase.
45#
46tstVBoxDbg_TEMPLATE = VBOXQTGUIEXE
47tstVBoxDbg_SOURCES = testcase/tstVBoxDbg.cpp
48tstVBoxDbg_LIBS = \
49 $(LIB_VMM) \
50 $(LIB_RUNTIME)
51ifeq ($(BUILD_TARGET),win)
52tstVBoxDbg_LIBS += \
53 $(PATH_LIB)/VBoxDbg.lib
54else
55tstVBoxDbg_LIBS += \
56 $(PATH_BIN)/VBoxDbg$(VBOX_SUFF_DLL)
57endif
58
59
60#
61# Debugger GUI component.
62#
63VBoxDbg_TEMPLATE = VBOXQTGUI
64VBoxDbg_DEFS = IN_DBG_R3
65VBoxDbg_CXXFLAGS.linux = $(TEMPLATE_VBOXQTGUI_CXXFLAGS.linux) -O2
66VBoxDbg_CXXFLAGS.win = -wd4244
67VBoxDbg_INCS = \
68 . \
69 $(PATH_VBoxDbg)/ui \
70 $(PATH_VBoxDbg)/moc \
71 $(PATH_VBoxDbg)/include
72
73# QDesigner UI sources
74VBoxDbg_QT_UISRCS =
75
76# Headers containing definitions of classes that use the Q_OBJECT macro
77VBoxDbg_QT_MOCHDRS = \
78 VBoxDbgConsole.h \
79 VBoxDbgStats.h \
80 VBoxDbgGui.h
81
82# UI headers (ui.h) containing local definitions of classes that use the Q_OBJECT macro
83VBoxDbg_QT_MOCUIHDRS =
84
85VBoxDbg_GENSRCS = \
86 $(foreach moc,$(notdir $(basename $(VBoxDbg_QT_MOCHDRS))), $(PATH_VBoxDbg)/moc/moc_$(moc).cpp) \
87 $(foreach ui,$(notdir $(basename $(VBoxDbg_QT_UISRCS))), $(PATH_VBoxDbg)/ui/$(ui).cpp $(PATH_VBoxDbg)/moc/moc_$(ui).cpp)
88
89VBoxDbg_GENHDRS = \
90 $(foreach mocui,$(basename $(VBoxDbg_QT_MOCUIHDRS)), $(PATH_VBoxDbg)/moc/$(mocui).moc) \
91 $(foreach moc,$(basename $(VBoxDbg_QT_MOCSRCS)), $(PATH_VBoxDbg)/moc/$(moc).moc) \
92 $(foreach ui,$(basename $(VBoxDbg_QT_UISRCS)), $(PATH_VBoxDbg)/$(ui).h)
93
94VBoxDbg_SOURCES = \
95 $(VBoxDbg_GENSRCS) \
96 VBoxDbg.cpp \
97 VBoxDbgGui.cpp \
98 VBoxDbgBase.cpp \
99 VBoxDbgConsole.cpp \
100 VBoxDbgStats.cpp \
101 DBGConsole.cpp \
102 DBGCBuiltInSymbols.cpp \
103 DBGCEmulateCodeView.cpp \
104 DBGCOps.cpp
105
106VBoxDbg_LIBS = $(LIB_VMM)
107
108# generated files we need to clean manually
109VBoxDbg_CLEAN += \
110 $(VBoxDbg_GENSRCS) \
111 $(VBoxDbg_GENHDRS)
112
113
114#
115# Install the dbghelp.dll binary.
116#
117dbghelp_INST = bin/
118dbghelp_SOURCES.x86 = win32/dbghelp.dll
119dbghelp_SOURCES.amd64 = win64/dbghelp.dll
120
121
122include $(PATH_KBUILD)/footer.kmk
123
124
125#
126# Source file generation rules
127#
128
129## Generate a rule to create a MOC source file from a header containing
130# classes that use the Q_OBJECT macro.
131# @param $mochdr the header file with Q_OBJECT
132define def_qt_gen_src_moc
133$(eval mocsrc := $(PATH_$(target))/moc/moc_$(notdir $(basename $(mochdr))).cpp)
134$$(mocsrc): $(mochdr)
135 $(call MSG_TOOL,moc,$(target),$(mocsrc),$(mochdr))
136 $(QUIET)$(MKDIR) -p $(basename $(mocsrc))
137 $(QUIET)$(VBOX_MOC) $(mochdr) -o $(mocsrc)
138
139endef
140
141## Generate a rule to create a MOC include file from a source containing
142# local classes that use the Q_OBJECT macro. This include is then included
143# by that source, so it must be generated before the source gets compiled.
144# @param $mocsrc the source file with Q_OBJECT
145define def_qt_gen_inc_moc
146$(eval mocobj := $(PATH_$(target)_$(mocsrc))/$(notdir $(basename $(mocsrc)))$(VBOX_SUFF_OBJ))
147$(eval mocinc := $(PATH_$(target))/moc/$(notdir $(basename $(mocsrc))).moc)
148$$(mocobj): $(mocinc)
149$$(mocinc): $(mocsrc)
150 $(call MSG_TOOL,moc,$(target),$(mocsrc),$(mocinc))
151 $(QUIET)$(MKDIR) -p $(basename $(mocinc))
152 $(QUIET)$(VBOX_MOC) -i $(mocsrc) -o $(mocinc)
153
154endef
155
156## Generate a rule to create a MOC include file from a UI header (ui.h) containing
157# local classes that use the Q_OBJECT macro. This include is then included
158# by that header, so it must be generated before the UI source gets compiled.
159# @param $mocuihdr the UI header file with Q_OBJECT
160define def_qt_gen_inc_mocuihdr
161$(eval uisrc := $(PATH_$(target))/ui/$(notdir $(basename $(basename $(mocuihdr)))).cpp)
162$(eval uiobj := $(PATH_$(target)_$(uisrc))/$(notdir $(basename $(uisrc)))$(VBOX_SUFF_OBJ))
163$(eval mocuiinc := $(PATH_$(target))/moc/$(notdir $(basename $(mocuihdr))).moc)
164$$(uisrc): $(mocuiinc)
165$$(mocuiinc): $(mocuihdr)
166 $(call MSG_TOOL,moc,$(target),$(mocuihdr),$(mocuiinc))
167 $(QUIET)$(MKDIR) -p $(basename $(mocuiinc))
168 $(QUIET)$(VBOX_MOC) -i $(mocuihdr) -o $(mocuiinc)
169
170endef
171
172define def_qt_gen_src_ui
173$(eval uisrc := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).cpp)
174$(eval uihdr := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).h)
175$(eval mocsrc := $(PATH_$(target))/moc/moc_$(notdir $(basename $(uifile))).cpp)
176
177$$(uihdr): $(uifile) | $(call DIRDEP,$(dir $(uihdr)))
178 $(call MSG_TOOL,uic,$(target),$(uifile),$(uihdr))
179 $(QUIET)$(VBOX_UIC) $(uifile) -o $(uihdr)
180
181$$(uisrc): $(uihdr) $(uifile) $(wildcard $(uifile).h) | $(call DIRDEP,$(dir $(uisrc)))
182 $(call MSG_TOOL,uic,$(target),$(uihdr),$(uisrc))
183 $(QUIET)$(VBOX_UIC) $(uifile) -i $(uihdr) -o $(uisrc)
184
185$$(mocsrc): $(uihdr) | $(call DIRDEP,$(dir $(mocsrc)))
186 $(call MSG_TOOL,uic,$(target),$(uihdr),$(mocsrc))
187 $(QUIET)$(VBOX_MOC) $(uihdr) -o $(mocsrc)
188
189endef
190
191## Generate rules for generating the Qt source for a target.
192# @param $target Target name.
193define def_qt_gen_src
194# moc srcs from hdrs with Q_OBJECT
195$(foreach mochdr,$($(target)_QT_MOCHDRS),$(eval $(def_qt_gen_src_moc)))
196# moc includes from srcs with Q_OBJECT
197$(foreach mocsrc,$($(target)_QT_MOCSRCS),$(eval $(def_qt_gen_inc_moc)))
198# moc includes from UI headers with Q_OBJECT
199$(foreach mocuihdr,$($(target)_QT_MOCUIHDRS),$(eval $(def_qt_gen_inc_mocuihdr)))
200# ui
201$(foreach uifile,$($(target)_QT_UISRCS) ,$(eval $(def_qt_gen_src_ui)))
202# dirs
203$(call DIRDEP,$(PATH_$(target))/ui/) $(call DIRDEP,$(PATH_$(target))/moc/):
204 $(call MSG_MKDIR,$$@)
205 $(QUIET)$(MKDIR) -p $$@
206
207endef
208
209# Generate Qt sources.
210$(foreach target,VBoxDbg,$(eval $(def_qt_gen_src)))
211
212
213$(call DIRDEP,$(PATH_VBoxDbg)/include/):
214 $(call MSG_MKDIR,$@)
215 $(QUIET)$(MKDIR) -p $@
216
217
218#
219# Translation stuff
220#
221
222VBoxDbg_TRANSLATIONS = \
223 nls/VBoxDbg_de.ts
224
225updatenls:
226 $(VBOX_LUPDATE) $(VBoxDbg_SOURCES) $(VBoxDbg_QT_MOCHDRS) $(VBoxDbg_GENHDRS) -ts $(VBoxDbg_TRANSLATIONS)
227
228
229#
230# Hand made dependencies go here
231#
232$(PATH_VBoxDbg)/gen/ui/VBoxNewVMWzd$(VBOX_SUFF_OBJ): $(PATH_VBoxDbg)/ui/VBoxNewVMWzd.h $(PATH_VBoxDbg)/ui/VBoxDiskImageMgrDlg.h
233$(PATH_VBoxDbg)/gen/ui/VBoxDiskImageMgrDlg$(VBOX_SUFF_OBJ): ui/VBoxDiskImageMgrDlg.ui $(PATH_VBoxDbg)/ui/VBoxNewHDWzd.h
234$(PATH_VBoxDbg)/gen/ui/VBoxCloseVMDlg$(VBOX_SUFF_OBJ): $(PATH_VBoxDbg)/ui/VBoxCloseVMDlg.h
235
236
237test:
238 echo $(VBoxDbg_GENSRCS) | sed -e "s/ /\n/g"
239
240testwrappers: $(WRAPPERSFILE)
241
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette