VirtualBox

Changeset 12174 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 6, 2008 4:40:37 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
36140
Message:

Debugger: Use the qt3 unit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Debugger/Makefile.kmk

    r12170 r12174  
    8383# Debugger GUI component.
    8484#
     85USES += qt3
    8586VBoxDbg_TEMPLATE = VBOXQTGUI
     87VBoxDbg_USES = qt3
     88VBoxDbg_QTTOOL = QT3
    8689VBoxDbg_DEFS = IN_DBG_R3
     90VBoxDbg_INCS = .
    8791VBoxDbg_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 
     92VBoxDbg_QT_MOCHDRS = \
     93        VBoxDbgConsole.h \
     94        VBoxDbgStats.h \
     95        VBoxDbgGui.h
    11596VBoxDbg_SOURCES = \
    116         $(VBoxDbg_GENSRCS) \
    11797        VBoxDbg.cpp \
    11898        VBoxDbgGui.cpp \
     
    120100        VBoxDbgConsole.cpp \
    121101        VBoxDbgStats.cpp
    122 
    123 VBoxDbg_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDbg.dylib
    124 
    125102VBoxDbg_LIBS = \
    126103        $(LIB_VMM)
    127 
    128 # generated files we need to clean manually
    129 VBoxDbg_CLEAN += \
    130         $(VBoxDbg_GENSRCS) \
    131         $(VBoxDbg_GENHDRS)
     104VBoxDbg_LDFLAGS.darwin = \
     105        -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDbg.dylib
    132106
    133107
     
    136110#
    137111tstVBoxDbg_TEMPLATE     = VBOXQTGUIEXE
     112tstVBoxDbg_USES         = qt3
     113tstVBoxDbg_QTTOOL       = QT3
    138114tstVBoxDbg_SOURCES      = testcase/tstVBoxDbg.cpp
    139115tstVBoxDbg_LIBS         = \
     
    159135include $(KBUILD_PATH)/subfooter.kmk
    160136
    161 
    162 #
    163 # Source file generation rules
    164 #
    165 
    166 ##  Generate a rule to create a MOC source file from a header containing
    167 #   classes that use the Q_OBJECT macro.
    168 #   @param  $mochdr     the header file with Q_OBJECT
    169 define def_qt_gen_src_moc
    170 $(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 endef
    177 
    178 ##  Generate a rule to create a MOC include file from a source containing
    179 #   local classes that use the Q_OBJECT macro. This include is then included
    180 #   by that source, so it must be generated before the source gets compiled.
    181 #   @param  $mocsrc     the source file with Q_OBJECT
    182 define def_qt_gen_inc_moc
    183 $(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 endef
    192 
    193 ##  Generate a rule to create a MOC include file from a UI header (ui.h) containing
    194 #   local classes that use the Q_OBJECT macro. This include is then included
    195 #   by that header, so it must be generated before the UI source gets compiled.
    196 #   @param  $mocuihdr     the UI header file with Q_OBJECT
    197 define def_qt_gen_inc_mocuihdr
    198 $(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 endef
    208 
    209 define def_qt_gen_src_ui
    210 $(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 endef
    227 
    228 ## Generate rules for generating the Qt source for a target.
    229 # @param   $target  Target name.
    230 define def_qt_gen_src
    231 # moc srcs from hdrs with Q_OBJECT
    232 $(foreach mochdr,$($(target)_QT_MOCHDRS),$(eval $(def_qt_gen_src_moc)))
    233 # moc includes from srcs with Q_OBJECT
    234 $(foreach mocsrc,$($(target)_QT_MOCSRCS),$(eval $(def_qt_gen_inc_moc)))
    235 # moc includes from UI headers with Q_OBJECT
    236 $(foreach mocuihdr,$($(target)_QT_MOCUIHDRS),$(eval $(def_qt_gen_inc_mocuihdr)))
    237 # ui
    238 $(foreach uifile,$($(target)_QT_UISRCS)  ,$(eval $(def_qt_gen_src_ui)))
    239 # dirs
    240 $(call DIRDEP,$(PATH_$(target))/ui/) $(call DIRDEP,$(PATH_$(target))/moc/):
    241         $(call MSG_MKDIR,$$@)
    242         $(QUIET)$(MKDIR) -p $$@
    243 
    244 endef
    245 
    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 stuff
    257 #
    258 
    259 VBoxDbg_TRANSLATIONS = \
    260         nls/VBoxDbg_de.ts
    261 
    262 updatenls:
    263         $(VBOX_LUPDATE) $(VBoxDbg_SOURCES) $(VBoxDbg_QT_MOCHDRS) $(VBoxDbg_GENHDRS) -ts $(VBoxDbg_TRANSLATIONS)
    264 
    265 
    266 #
    267 # Hand made dependencies go here
    268 #
    269 $(PATH_VBoxDbg)/gen/ui/VBoxNewVMWzd$(VBOX_SUFF_OBJ):        $(PATH_VBoxDbg)/ui/VBoxNewVMWzd.h $(PATH_VBoxDbg)/ui/VBoxDiskImageMgrDlg.h
    270 $(PATH_VBoxDbg)/gen/ui/VBoxDiskImageMgrDlg$(VBOX_SUFF_OBJ): ui/VBoxDiskImageMgrDlg.ui $(PATH_VBoxDbg)/ui/VBoxNewHDWzd.h
    271 $(PATH_VBoxDbg)/gen/ui/VBoxCloseVMDlg$(VBOX_SUFF_OBJ):      $(PATH_VBoxDbg)/ui/VBoxCloseVMDlg.h
    272 
    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.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette