~ubuntu-branches/ubuntu/gutsy/virtualbox-ose/gutsy

« back to all changes in this revision

Viewing changes to src/VBox/Debugger/Makefile.kmk

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2007-09-08 16:44:58 UTC
  • Revision ID: james.westby@ubuntu.com-20070908164458-wao29470vqtr8ksy
Tags: upstream-1.5.0-dfsg2
ImportĀ upstreamĀ versionĀ 1.5.0-dfsg2

Show diffs side-by-side

added added

removed removed

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