VirtualBox

source: vbox/trunk/src/VBox/Debugger/Makefile@ 1471

Last change on this file since 1471 was 957, checked in by vboxsync, 18 years ago

Qt portability.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.6 KB
Line 
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
21DEPTH = ../../..
22include $(PATH_KBUILD)/header.kmk
23
24LIBRARIES = Debugger
25ifdef VBOX_WITH_DEBUGGER_GUI
26DLLS = VBoxDbg
27PROGRAMS = tstVBoxDbg
28endif
29
30ifndef VBOX_OSE
31INSTALLS.win.x86 = dbghelp
32endif
33
34
35#
36# Debugger library
37#
38Debugger_TEMPLATE = VBOXR3
39Debugger_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
40Debugger_SOURCES = \
41 DBGConsole.cpp \
42 DBGCTcp.cpp
43
44#
45# The testcase.
46#
47tstVBoxDbg_TEMPLATE = VBOXQTGUIEXE
48tstVBoxDbg_SOURCES = testcase/tstVBoxDbg.cpp
49tstVBoxDbg_LIBS = \
50 $(LIB_VMM) \
51 $(LIB_RUNTIME)
52ifeq ($(BUILD_TARGET),win)
53tstVBoxDbg_LIBS += \
54 $(PATH_LIB)/VBoxDbg.lib
55else
56tstVBoxDbg_LIBS += \
57 $(PATH_BIN)/VBoxDbg$(VBOX_SUFF_DLL)
58endif
59
60
61#
62# Debugger GUI component.
63#
64VBoxDbg_TEMPLATE = VBOXQTGUI
65VBoxDbg_DEFS = IN_DBG_R3
66VBoxDbg_INCS = \
67 . \
68 $(PATH_VBoxDbg)/ui \
69 $(PATH_VBoxDbg)/moc \
70 $(PATH_VBoxDbg)/include
71
72# QDesigner UI sources
73VBoxDbg_QT_UISRCS =
74
75# Headers containing definitions of classes that use the Q_OBJECT macro
76VBoxDbg_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
82VBoxDbg_QT_MOCUIHDRS =
83
84VBoxDbg_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
88VBoxDbg_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
93VBoxDbg_SOURCES = \
94 $(VBoxDbg_GENSRCS) \
95 VBoxDbg.cpp \
96 VBoxDbgGui.cpp \
97 VBoxDbgBase.cpp \
98 VBoxDbgConsole.cpp \
99 VBoxDbgStats.cpp \
100 DBGConsole.cpp
101
102VBoxDbg_LIBS = $(LIB_VMM)
103
104# generated files we need to clean manually
105VBoxDbg_CLEAN += \
106 $(VBoxDbg_GENSRCS) \
107 $(VBoxDbg_GENHDRS)
108
109
110#
111# Install the dbghelp.dll binary.
112#
113dbghelp_INST = bin/
114dbghelp_SOURCES.x86 = win32/dbghelp.dll
115dbghelp_SOURCES.amd64 = win64/dbghelp.dll
116
117
118include $(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
128define 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
134endef
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
140define 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
148endef
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
154define 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
163endef
164
165define 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
179endef
180
181## Generate rules for generating the Qt source for a target.
182# @param $target Target name.
183define 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
196endef
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
210VBoxDbg_TRANSLATIONS = \
211 nls/VBoxDbg_de.ts
212
213updatenls:
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
225test:
226 echo $(VBoxDbg_GENSRCS) | sed -e "s/ /\n/g"
227
228testwrappers: $(WRAPPERSFILE)
229
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