VirtualBox

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

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

VBOX_SUFF_OBJ for working around an OS/2 SUFF_OBJ/GXX3OMF artifact.

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