Changeset 12174 in vbox for trunk/src/VBox
- Timestamp:
- Sep 6, 2008 4:40:37 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 36140
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Debugger/Makefile.kmk
r12170 r12174 83 83 # Debugger GUI component. 84 84 # 85 USES += qt3 85 86 VBoxDbg_TEMPLATE = VBOXQTGUI 87 VBoxDbg_USES = qt3 88 VBoxDbg_QTTOOL = QT3 86 89 VBoxDbg_DEFS = IN_DBG_R3 90 VBoxDbg_INCS = . 87 91 VBoxDbg_CXXFLAGS.linux = $(TEMPLATE_VBOXQTGUI_CXXFLAGS.linux) -O2 88 VBoxDbg_INCS = \ 89 . \ 90 $(PATH_VBoxDbg)/ui \ 91 $(PATH_VBoxDbg)/moc \ 92 $(PATH_VBoxDbg)/include 93 94 # QDesigner UI sources 95 VBoxDbg_QT_UISRCS = 96 97 # Headers containing definitions of classes that use the Q_OBJECT macro 98 VBoxDbg_QT_MOCHDRS := \ 99 $(PATH_SUB_CURRENT)/VBoxDbgConsole.h \ 100 $(PATH_SUB_CURRENT)/VBoxDbgStats.h \ 101 $(PATH_SUB_CURRENT)/VBoxDbgGui.h 102 103 # UI headers (ui.h) containing local definitions of classes that use the Q_OBJECT macro 104 VBoxDbg_QT_MOCUIHDRS = 105 106 VBoxDbg_GENSRCS = \ 107 $(foreach moc,$(notdir $(basename $(VBoxDbg_QT_MOCHDRS))), $(PATH_VBoxDbg)/moc/moc_$(moc).cpp) \ 108 $(foreach ui,$(notdir $(basename $(VBoxDbg_QT_UISRCS))), $(PATH_VBoxDbg)/ui/$(ui).cpp $(PATH_VBoxDbg)/moc/moc_$(ui).cpp) 109 110 VBoxDbg_GENHDRS = \ 111 $(foreach mocui,$(basename $(VBoxDbg_QT_MOCUIHDRS)), $(PATH_VBoxDbg)/moc/$(mocui).moc) \ 112 $(foreach moc,$(basename $(VBoxDbg_QT_MOCSRCS)), $(PATH_VBoxDbg)/moc/$(moc).moc) \ 113 $(foreach ui,$(basename $(VBoxDbg_QT_UISRCS)), $(PATH_VBoxDbg)/$(ui).h) 114 92 VBoxDbg_QT_MOCHDRS = \ 93 VBoxDbgConsole.h \ 94 VBoxDbgStats.h \ 95 VBoxDbgGui.h 115 96 VBoxDbg_SOURCES = \ 116 $(VBoxDbg_GENSRCS) \117 97 VBoxDbg.cpp \ 118 98 VBoxDbgGui.cpp \ … … 120 100 VBoxDbgConsole.cpp \ 121 101 VBoxDbgStats.cpp 122 123 VBoxDbg_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDbg.dylib124 125 102 VBoxDbg_LIBS = \ 126 103 $(LIB_VMM) 127 128 # generated files we need to clean manually 129 VBoxDbg_CLEAN += \ 130 $(VBoxDbg_GENSRCS) \ 131 $(VBoxDbg_GENHDRS) 104 VBoxDbg_LDFLAGS.darwin = \ 105 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDbg.dylib 132 106 133 107 … … 136 110 # 137 111 tstVBoxDbg_TEMPLATE = VBOXQTGUIEXE 112 tstVBoxDbg_USES = qt3 113 tstVBoxDbg_QTTOOL = QT3 138 114 tstVBoxDbg_SOURCES = testcase/tstVBoxDbg.cpp 139 115 tstVBoxDbg_LIBS = \ … … 159 135 include $(KBUILD_PATH)/subfooter.kmk 160 136 161 162 #163 # Source file generation rules164 #165 166 ## Generate a rule to create a MOC source file from a header containing167 # classes that use the Q_OBJECT macro.168 # @param $mochdr the header file with Q_OBJECT169 define def_qt_gen_src_moc170 $(eval mocsrc := $(PATH_$(target))/moc/moc_$(notdir $(basename $(mochdr))).cpp)171 $$(mocsrc): $(mochdr)172 $(call MSG_TOOL,moc,$(target),$(mocsrc),$(mochdr))173 $(QUIET)$(MKDIR) -p $(basename $(mocsrc))174 $(QUIET)$(VBOX_MOC) $(mochdr) -o $(mocsrc)175 176 endef177 178 ## Generate a rule to create a MOC include file from a source containing179 # local classes that use the Q_OBJECT macro. This include is then included180 # by that source, so it must be generated before the source gets compiled.181 # @param $mocsrc the source file with Q_OBJECT182 define def_qt_gen_inc_moc183 $(eval mocobj := $(PATH_$(target)_$(mocsrc))/$(notdir $(basename $(mocsrc)))$(VBOX_SUFF_OBJ))184 $(eval mocinc := $(PATH_$(target))/moc/$(notdir $(basename $(mocsrc))).moc)185 $$(mocobj): $(mocinc)186 $$(mocinc): $(mocsrc)187 $(call MSG_TOOL,moc,$(target),$(mocsrc),$(mocinc))188 $(QUIET)$(MKDIR) -p $(basename $(mocinc))189 $(QUIET)$(VBOX_MOC) -i $(mocsrc) -o $(mocinc)190 191 endef192 193 ## Generate a rule to create a MOC include file from a UI header (ui.h) containing194 # local classes that use the Q_OBJECT macro. This include is then included195 # by that header, so it must be generated before the UI source gets compiled.196 # @param $mocuihdr the UI header file with Q_OBJECT197 define def_qt_gen_inc_mocuihdr198 $(eval uisrc := $(PATH_$(target))/ui/$(notdir $(basename $(basename $(mocuihdr)))).cpp)199 $(eval uiobj := $(PATH_$(target)_$(uisrc))/$(notdir $(basename $(uisrc)))$(VBOX_SUFF_OBJ))200 $(eval mocuiinc := $(PATH_$(target))/moc/$(notdir $(basename $(mocuihdr))).moc)201 $$(uisrc): $(mocuiinc)202 $$(mocuiinc): $(mocuihdr)203 $(call MSG_TOOL,moc,$(target),$(mocuihdr),$(mocuiinc))204 $(QUIET)$(MKDIR) -p $(basename $(mocuiinc))205 $(QUIET)$(VBOX_MOC) -i $(mocuihdr) -o $(mocuiinc)206 207 endef208 209 define def_qt_gen_src_ui210 $(eval uisrc := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).cpp)211 $(eval uihdr := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).h)212 $(eval mocsrc := $(PATH_$(target))/moc/moc_$(notdir $(basename $(uifile))).cpp)213 214 $$(uihdr): $(uifile) | $(call DIRDEP,$(dir $(uihdr)))215 $(call MSG_TOOL,uic,$(target),$(uifile),$(uihdr))216 $(QUIET)$(VBOX_UIC) $(uifile) -o $(uihdr)217 218 $$(uisrc): $(uihdr) $(uifile) $(wildcard $(uifile).h) | $(call DIRDEP,$(dir $(uisrc)))219 $(call MSG_TOOL,uic,$(target),$(uihdr),$(uisrc))220 $(QUIET)$(VBOX_UIC) $(uifile) -i $(uihdr) -o $(uisrc)221 222 $$(mocsrc): $(uihdr) | $(call DIRDEP,$(dir $(mocsrc)))223 $(call MSG_TOOL,uic,$(target),$(uihdr),$(mocsrc))224 $(QUIET)$(VBOX_MOC) $(uihdr) -o $(mocsrc)225 226 endef227 228 ## Generate rules for generating the Qt source for a target.229 # @param $target Target name.230 define def_qt_gen_src231 # moc srcs from hdrs with Q_OBJECT232 $(foreach mochdr,$($(target)_QT_MOCHDRS),$(eval $(def_qt_gen_src_moc)))233 # moc includes from srcs with Q_OBJECT234 $(foreach mocsrc,$($(target)_QT_MOCSRCS),$(eval $(def_qt_gen_inc_moc)))235 # moc includes from UI headers with Q_OBJECT236 $(foreach mocuihdr,$($(target)_QT_MOCUIHDRS),$(eval $(def_qt_gen_inc_mocuihdr)))237 # ui238 $(foreach uifile,$($(target)_QT_UISRCS) ,$(eval $(def_qt_gen_src_ui)))239 # dirs240 $(call DIRDEP,$(PATH_$(target))/ui/) $(call DIRDEP,$(PATH_$(target))/moc/):241 $(call MSG_MKDIR,$$@)242 $(QUIET)$(MKDIR) -p $$@243 244 endef245 246 # Generate Qt sources.247 $(foreach target,VBoxDbg,$(eval $(def_qt_gen_src)))248 249 250 $(call DIRDEP,$(PATH_VBoxDbg)/include/):251 $(call MSG_MKDIR,$@)252 $(QUIET)$(MKDIR) -p $@253 254 255 #256 # Translation stuff257 #258 259 VBoxDbg_TRANSLATIONS = \260 nls/VBoxDbg_de.ts261 262 updatenls:263 $(VBOX_LUPDATE) $(VBoxDbg_SOURCES) $(VBoxDbg_QT_MOCHDRS) $(VBoxDbg_GENHDRS) -ts $(VBoxDbg_TRANSLATIONS)264 265 266 #267 # Hand made dependencies go here268 #269 $(PATH_VBoxDbg)/gen/ui/VBoxNewVMWzd$(VBOX_SUFF_OBJ): $(PATH_VBoxDbg)/ui/VBoxNewVMWzd.h $(PATH_VBoxDbg)/ui/VBoxDiskImageMgrDlg.h270 $(PATH_VBoxDbg)/gen/ui/VBoxDiskImageMgrDlg$(VBOX_SUFF_OBJ): ui/VBoxDiskImageMgrDlg.ui $(PATH_VBoxDbg)/ui/VBoxNewHDWzd.h271 $(PATH_VBoxDbg)/gen/ui/VBoxCloseVMDlg$(VBOX_SUFF_OBJ): $(PATH_VBoxDbg)/ui/VBoxCloseVMDlg.h272 273 274 test:275 echo $(VBoxDbg_GENSRCS) | sed -e "s/ /\n/g"276 277 testwrappers: $(WRAPPERSFILE)278
Note:
See TracChangeset
for help on using the changeset viewer.