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