VirtualBox

Ignore:
Timestamp:
Sep 9, 2008 3:01:02 AM (16 years ago)
Author:
vboxsync
Message:

Frontends/Makefiles: Converted VirtualBox 3 & 4 into sub-makefiles, eliminated PAHT_TARGET usage, pushed everything up to the root (sub-makefile wise), and fixed VBoxBFE & VBoxSDL exclusion on hardened darwin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r12216 r12258  
    2020#
    2121
    22 # TESTING
    23 USE_KBUILD_QT3_UNIT = 1
    24 
    25 DEPTH = ../../../..
    26 include $(KBUILD_PATH)/header.kmk
     22SUB_DEPTH = ../../../..
     23include $(KBUILD_PATH)/subheader.kmk
    2724
    2825#
     
    4845endif
    4946DLLS.os2 += VBoxHlp
    50 ifndef USE_KBUILD_QT3_UNIT
    51  INSTALLS += VirtualBox.nls
    52 endif
    5347
    5448
     
    10599DIRECTORY_PREFIX = src/linux/
    106100
    107 $(PATH_TARGET)/$(SOURCE_DIRECTORY):
    108         $(MKDIR) -p $(@D)
     101$(PATH_TARGET)/$(SOURCE_DIRECTORY): | $$(dir $@)
    109102        $(LN_SYMLINK) $(abspath $(PATH_CURRENT))/$(DIRECTORY_PREFIX) $@
    110103
     
    113106        $(QUIET)cd $(PATH_TARGET) && tar -chf - $(addprefix $(SOURCE_DIRECTORY)/,$(subst $(DIRECTORY_PREFIX),,$(VBoxKeyboard3_TARSOURCES))) | gzip - > $@
    114107
    115 
    116 #
    117 # Hardened VirtualBox4.
     108OTHER_CLEAN += \
     109        $(PATH_BIN)/vboxkeyboard3.tar.gz \
     110        $(PATH_TARGET)/$(SOURCE_DIRECTORY)
     111
     112
     113#
     114# Hardened VirtualBox3.
    118115#
    119116VirtualBox3Hardened_TEMPLATE = VBOXR3HARDENEDEXE
     
    177174        images/NonOSE/VirtualBox_cube_42px.png
    178175endif
     176VirtualBox_QT_IMAGES := $(abspathex $(VirtualBox_QT_IMAGES),$(PATH_SUB_CURRENT))
    179177
    180178
     
    191189 endif
    192190endif
    193 ifdef USE_KBUILD_QT3_UNIT
    194  USES += qt3
    195  VirtualBox_USES    = qt3
    196  VirtualBox_SDKS   += QT3
    197  VirtualBox_QTTOOL  = QT3
    198 endif
     191USES += qt3
     192VirtualBox_USES    = qt3
     193VirtualBox_SDKS   += QT3
     194VirtualBox_QTTOOL  = QT3
    199195VirtualBox_SDKS.win = WINPSDK DXSDK
    200196#ifeq ($(filter-out freebsd linux netbsd openbsd os2 solaris,$(KBUILD_TARGET)),) - later
     
    209205
    210206# Import translation sources
    211 ifdef USE_KBUILD_QT3_UNIT
    212  VirtualBox3_QT_TRANSLATIONS := $(TRANSLATIONS) \
    213         $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS)))
    214 else
    215  VirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS)
    216  # Each nls/VirtualBox_xx_YY.ts file must have a qt_xx_YY.ts counterpart
    217  VirtualBox_QT_TRANSLATIONS_QT := \
    218         $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts,\
    219                 $(filter nls/VirtualBox_%.ts,$(VirtualBox_QT_TRANSLATIONS)))
    220 endif
     207VirtualBox3_QT_TRANSLATIONS := $(TRANSLATIONS) \
     208$(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS)))
    221209VirtualBox_LRCFLAGS = -nocompress
    222210VirtualBox_QT_TRANSLATIONS_INST = $(INST_BIN)nls3/
     
    229217# OSE version is always necessary for lupdate/lrelease
    230218FORMS += ui/VBoxAboutDlg.ui
    231 ifdef USE_KBUILD_QT3_UNIT
    232  $(eval VirtualBox_SOURCES += $(FORMS) )
    233 else
    234  VirtualBox_QT_UISRCS := $(FORMS)
    235 endif
     219$(eval VirtualBox_SOURCES += $(FORMS) )
    236220
    237221# Headers containing definitions of classes that use the Q_OBJECT macro
     
    265249
    266250# UI headers (ui.h) containing local definitions of classes that use the Q_OBJECT macro
    267 ifdef USE_KBUILD_QT3_UNIT
    268251## @todo move up
    269  VirtualBox_QT_MOCSRCS += \
     252VirtualBox_QT_MOCSRCS += \
    270253        ui/VBoxVMSettingsDlg.ui.h \
    271254        ui/VBoxVMLogViewer.ui.h \
    272255        ui/VBoxSharedFoldersSettings.ui.h \
    273256        ui/VBoxHardDiskSettings.ui.h
    274 
    275 else # !USE_KBUILD_QT3_UNIT
    276  VirtualBox_QT_MOCUIHDRS = \
    277         ui/VBoxVMSettingsDlg.ui.h \
    278         ui/VBoxVMLogViewer.ui.h \
    279         ui/VBoxSharedFoldersSettings.ui.h \
    280         ui/VBoxHardDiskSettings.ui.h
    281 
    282  # All generated sources. Note: this list MUST be in sync with Qt source
    283  # generation rules defined somewhere below!
    284  VirtualBox_GENSRCS = \
    285         $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCHDRS))), $(PATH_VirtualBox)/moc/moc_$(moc).cpp) \
    286         $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS))), $(PATH_VirtualBox)/ui/$(ui).cpp $(PATH_VirtualBox)/moc/moc_$(ui).cpp) \
    287         $(PATH_VirtualBox)/ui/vbox_image_collection.cpp
    288 
    289  # All generated headers. Note: this list MUST be in sync with Qt source
    290  # generation rules defined somewhere below!
    291  VirtualBox_GENHDRS = \
    292         $(foreach mocui,$(notdir $(basename $(VirtualBox_QT_MOCUIHDRS))), $(PATH_VirtualBox)/moc/$(mocui).moc) \
    293         $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCSRCS))), $(PATH_VirtualBox)/moc/$(moc).moc) \
    294         $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS))), $(PATH_VirtualBox)/ui/$(ui).h)
    295 
    296  # All existing .ui.h files for known .ui sources
    297  VirtualBox_QT_UIHDRS = \
    298         $(wildcard $(addsuffix .h,$(VirtualBox_QT_UISRCS)))
    299 
    300  # All header files
    301  VirtualBox_HEADERS = \
    302         $(wildcard include/*.h) \
    303         $(VirtualBox_GENHDRS) \
    304         $(VirtualBox_QT_UIHDRS)
    305 
    306  VirtualBox_SOURCES += $(VirtualBox_GENSRCS)
    307 endif # !USE_KBUILD_QT3_UNIT
    308257
    309258VirtualBox_SOURCES += \
     
    337286VirtualBox_SOURCES.win += \
    338287        src/VBoxFBDDRAW.cpp \
    339         $(PATH_TARGET)/VirtualBox.rc
     288        $(PATH_VirtualBox)/VirtualBox.rc
    340289
    341290VirtualBox_SOURCES.darwin = \
     
    349298 VirtualBox_SOURCES.darwin += \
    350299         src/darwin/VBoxIChatTheaterWrapper.m
    351 endif
    352 
    353 ifdef USE_KBUILD_QT3_UNIT
    354  ## @todo deal with QT_IMAGES...
    355  VirtualBox_SOURCES += \
    356         $(PATH_VirtualBox)/ui/vbox_image_collection.cpp
    357  VirtualBox_BLDDIRS += $(PATH_VirtualBox)/ui
    358300endif
    359301
     
    413355        ./include \
    414356        $(PATH_VirtualBox)/include
    415 ifndef USE_KBUILD_QT3_UNIT
    416  VirtualBox_INCS         += \
    417         $(PATH_VirtualBox)/ui \
    418         $(PATH_VirtualBox)/moc
    419 endif
    420357
    421358ifeq ($(KBUILD_TYPE),release)
     
    469406endif
    470407
    471 
    472 #
    473 # Other stuff
    474 #
    475 VBOX_WRAPPERS_FILE3      = $(PATH_VirtualBox)/include/COMWrappers.h
    476 VirtualBox_BLDDIRS      += $(PATH_VirtualBox)/include/
    477 VirtualBox_INTERMEDIATES+= $(VBOX_WRAPPERS_FILE3)
    478 
    479 VBOX_WRAPPERS_INC_FILE3 := $(PATH_SUB_CURRENT)/include/COMDefs.h
    480 VBOX_WRAPPERS_TEMPLATE3 := $(PATH_SUB_CURRENT)/include/COMWrappers.xsl
    481 VBOX_WRAPPERS_XIDLFILE3 := $(PATH_SUB_CURRENT)/../../Main/idl/VirtualBox.xidl
    482 
    483 
    484 # generated files we need to clean manually
    485 OTHER_CLEAN        += \
    486         $(VirtualBox_GENSRCS) \
    487         $(VirtualBox_GENHDRS) \
    488         $(VBOX_WRAPPERS_FILE3) \
    489         $(PATH_BIN)/vboxkeyboard3.tar.gz
    490 
    491 
     408#
     409# static images imported from VBoxUI.pro as VirtualBox_QT_IMAGES
     410#
     411VirtualBox_BLDDIRS += $(PATH_VirtualBox)/ui
     412VirtualBox_SOURCES += $(PATH_VirtualBox)/ui/vbox_image_collection.cpp
     413VirtualBox_CLEAN   += $(PATH_VirtualBox)/ui/vbox_image_collection.cpp $(PATH_VirtualBox)/ui/vbox_image_collection.txt
     414
     415$$(PATH_VirtualBox)/ui/vbox_image_collection.txt: $(PATH_SUB_CURRENT)/VBoxUI.pro $(VirtualBox_QT_IMAGES) | $$(dir $$@)
     416        $(RM) -f $@
     417        $(APPEND) -v $@ VirtualBox_QT_IMAGES
     418
     419$$(PATH_VirtualBox)/ui/vbox_image_collection.cpp: $$(PATH_VirtualBox)/ui/vbox_image_collection.txt | $$(dir $$@)
     420        $(call MSG_TOOL,uic,VirtualBox,$<,$@)
     421        $(QUIET)$(VBOX_UIC) -o $@ -embed VBoxGUI -f $<
     422
     423
     424#
     425# Generate COM Wrappers
     426#
     427VirtualBox_BLDDIRS       += $(PATH_VirtualBox)/include
     428VirtualBox_CLEAN         += $(PATH_VirtualBox)/include/COMWrappers.h
     429VirtualBox_INTERMEDIATES += $(PATH_VirtualBox)/include/COMWrappers.h
     430
     431$$(PATH_VirtualBox)/include/COMWrappers.h: \
     432                $(PATH_ROOT)/src/VBox/Main/idl/VirtualBox.xidl \
     433                $(VBOX_PATH_VIRTUALBOX3_SRC)/include/COMWrappers.xsl \
     434                | $$(dir $$@)
     435        $(call MSG_GENERATE,VirtualBox,$<,$@)
     436        $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_PATH_VIRTUALBOX3_SRC)/include/COMWrappers.xsl $<
     437
     438# alias for generating the COM Wrappers file.
     439testwrappers:: $(PATH_VirtualBox)/include/COMWrappers.h
     440
     441
     442ifeq ($(KBUILD_TARGET),win)
    492443#
    493444# On Windows we'll have to generate/edit the resource file.
    494445# The IDI_ICON1 name is Qt specific.
    495446#
    496 $(PATH_TARGET)/VirtualBox.rc: $(PATH_SUB_CURRENT)/Makefile.kmk $(VBOX_WINDOWS_ICON_FILE) | $$(call DIRDEP,$$(@D))
     447$$(PATH_VirtualBox)/VirtualBox.rc: $(PATH_SUB_CURRENT)/Makefile.kmk $(VBOX_WINDOWS_ICON_FILE) | $$(dir $$@)
    497448        $(RM) -f $@
    498449        $(APPEND) $@ 'IDI_ICON1 ICON "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
    499450        $(CAT) $@
    500451
    501 OTHER_CLEAN.win += $(PATH_TARGET)/VirtualBox.rc
    502 
    503 
     452VirtualBox_CLEAN.win += $(PATH_VirtualBox)/VirtualBox.rc
     453endif # win
     454
     455
     456ifeq ($(KBUILD_TARGET),darwin)
    504457#
    505458# On Mac OS X (darwin) we need to install icon resources and compulsory bundle contents.
    506459#
    507 INSTALLS.darwin += VirtualBox.app
    508 VirtualBox.app_INST = $(INST_VIRTUALBOX)Contents/
    509 VirtualBox.app_MODE = 644
    510 VirtualBox.app_SOURCES = \
     460INSTALLS.darwin += VirtualBox3.app
     461VirtualBox3.app_INST = $(INST_VIRTUALBOX)Contents/
     462VirtualBox3.app_MODE = 644
     463VirtualBox3.app_SOURCES = \
    511464        src/darwin/PkgInfo \
    512         $(PATH_TARGET)/Info.plist \
     465        $(PATH_VirtualBox3.app)/Info.plist \
    513466        $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns
    514467
    515 $(PATH_TARGET)/Info.plist: src/darwin/Info.plist $(VBOX_VERSION_MK) | $(call DIRDEP,$(PATH_TARGET))
    516         $(call MSG_GENERATE,VirtualBox.app,$<,$@)
     468$$(PATH_VirtualBox3.app)/Info.plist: $(PATH_SUB_CURRENT)/src/darwin/Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
     469        $(call MSG_GENERATE,VirtualBox3.app,$<,$@)
    517470        $(QUIET)$(RM) -f $@
    518471        $(QUIET)$(SED) \
     
    523476                $< > $@
    524477
    525 INSTALLS.darwin += VirtualBoxVM.app
    526 VirtualBoxVM.app_INST = $(VirtualBox.app_INST)Resources/VirtualBoxVM.app/Contents/
    527 VirtualBoxVM.app_MODE = 644
    528 VirtualBoxVM.app_SOURCES = \
     478INSTALLS.darwin += VirtualBoxVM3.app
     479VirtualBoxVM3.app_INST = $(VirtualBox3.app_INST)Resources/VirtualBoxVM.app/Contents/
     480VirtualBoxVM3.app_MODE = 644
     481VirtualBoxVM3.app_SOURCES = \
    529482        src/darwin/VM-PkgInfo=>PkgInfo \
    530         $(PATH_TARGET)/VM-Info.plist=>Info.plist \
     483        $(PATH_VirtualBoxVM3.app)/VM-Info.plist=>Info.plist \
    531484        $(VBOX_MACOSX_ICON_FILE)=>Resources/virtualbox.icns
    532 VirtualBoxVM.app_SYMLINKS = \
     485VirtualBoxVM3.app_SYMLINKS = \
    533486        MacOS=>../../../MacOS/
    534487
    535 $(PATH_TARGET)/VM-Info.plist: src/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $(call DIRDEP,$(PATH_TARGET))
    536         $(call MSG_GENERATE,VirtualBoxVM.app,$<,$@)
     488$$(PATH_VirtualBoxVM3.app)/VM-Info.plist: $(PATH_SUB_CURRENT)/src/darwin/VM-Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
     489        $(call MSG_GENERATE,VirtualBoxVM3.app,$<,$@)
    537490        $(QUIET)$(RM) -f $@
    538491        $(QUIET)$(SED) \
     
    541494                -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
    542495                -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
    543                 --output $@ $<
    544 
    545 
    546 ifndef USE_KBUILD_QT3_UNIT
    547 #
    548 # Translation installation
    549 #
    550 VirtualBox.nls_INST = $(INST_BIN)nls3/
    551 VirtualBox.nls_SOURCES =  $(patsubst %.ts,$(PATH_VirtualBox)/nls/%.qm,$(notdir $(VirtualBox_QT_TRANSLATIONS)))
    552 VirtualBox.nls_SOURCES += $(patsubst %.ts,$(PATH_VirtualBox)/nls/%.qm,$(notdir $(VirtualBox_QT_TRANSLATIONS_QT)))
    553 VirtualBox.nls_MODE = 644
    554 endif
     496                --output $@ \
     497                $<
     498endif # darwin
    555499
    556500
     
    582526
    583527
    584 
    585528# Commit the magic.
    586 # (note: before custom rules that make use of generated variables!).
    587 include $(KBUILD_PATH)/footer.kmk
    588 
    589 
    590 
    591 ifndef USE_KBUILD_QT3_UNIT
    592 
    593 #
    594 # Qt source file generation rules
    595 #
    596 
    597 ## @todo move QT source generation macros to kBuild
    598 
    599 ##  Generate a rule to create a MOC source file from a header containing
    600 #   classes that use the Q_OBJECT macro.
    601 #   @param  $mochdr     header file with Q_OBJECT
    602 define def_qt_gen_src_moc
    603 
    604 $(eval mocsrc := $(PATH_$(target))/moc/moc_$(notdir $(basename $(mochdr))).cpp)
    605 
    606 $(target)_GENSRCS_REAL += $(mocsrc)
    607 
    608 $(mocsrc): $(mochdr)
    609         $$(call MSG_TOOL,moc,$(target),$(mochdr),$$@)
    610         $$(QUIET)$$(MKDIR) -p $$(@D)
    611         $$(QUIET)$$(VBOX_MOC) $(mochdr) -o $$@
    612 
    613 endef
    614 
    615 ##  Generate a rule to create a MOC include file from a source containing
    616 #   local classes that use the Q_OBJECT macro. This include is then included
    617 #   by that source, so it must be generated before the source gets compiled.
    618 #   @param  $mocsrc     source file with Q_OBJECT
    619 define def_qt_gen_inc_moc
    620 
    621 $(eval mocobj := $(PATH_$(target)_$(mocsrc))/$(notdir $(basename $(mocsrc)))$(VBOX_SUFF_OBJ))
    622 $(eval mocinc := $(PATH_$(target))/moc/$(notdir $(basename $(mocsrc))).moc)
    623 
    624 $(target)_GENHDRS_REAL += $(mocinc)
    625 $(target)_INTERMEDIATES += $(mocinc)
    626 
    627 $(mocobj): $(mocinc)
    628 
    629 $(mocinc): $(mocsrc)
    630         $$(call MSG_TOOL,moc,$(target),$(mocsrc),$$@)
    631         $$(QUIET)$$(MKDIR) -p $$(@D)
    632         $$(QUIET)$$(VBOX_MOC) -i $(mocsrc) -o $$@
    633 
    634 endef
    635 
    636 ##  Generate a rule to create a MOC include file from a UI header (ui.h) containing
    637 #   local classes that use the Q_OBJECT macro. This include is then included
    638 #   by that header, so it must be generated before the UI source gets compiled.
    639 #   @param  $mocuihdr     UI header file with Q_OBJECT
    640 define def_qt_gen_inc_mocuihdr
    641 
    642 $(eval uisrc    := $(PATH_$(target))/ui/$(notdir $(basename $(basename $(mocuihdr)))).cpp)
    643 $(eval mocuiinc := $(PATH_$(target))/moc/$(notdir $(basename $(mocuihdr))).moc)
    644 
    645 $(target)_GENHDRS_REAL += $(mocuiinc)
    646 $(target)_INTERMEDIATES += $(mocuiinc)
    647 
    648 $(uisrc): $(mocuiinc)
    649 $(mocuiinc): $(mocuihdr)
    650         $$(call MSG_TOOL,moc,$(target),$(mocuihdr),$$@)
    651         $$(QUIET)$$(MKDIR) -p $$(@D)
    652         $$(QUIET)$$(VBOX_MOC) -i $(mocuihdr) -o $$@
    653 
    654 endef
    655 
    656 ##  Generate a rule to create a header and source files from an UI
    657 #   definition source (.ui).
    658 #   @param  $uifile       UI definintion source file
    659 define def_qt_gen_src_ui
    660 
    661 $(eval uihdr  := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).h)
    662 $(eval mocinc := $(PATH_$(target))/moc/$(notdir $(basename $(uifile))).moc)
    663 $(eval uisrc  := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).cpp)
    664 $(eval mocsrc := $(PATH_$(target))/moc/moc_$(notdir $(basename $(uifile))).cpp)
    665 
    666 $(target)_GENSRCS_REAL += $(uisrc) $(mocsrc)
    667 $(target)_GENHDRS_REAL += $(uihdr) $(mocinc)
    668 $(target)_INTERMEDIATES += $(uihdr) $(mocinc)
    669 
    670 $(uihdr): $(uifile) | $$(call DIRDEP,$(dir $(uihdr)))
    671         $$(call MSG_TOOL,uic,$(target),$(uifile),$$@)
    672         $$(QUIET)$$(VBOX_UIC) $(uifile) -o $$@
    673 
    674 $(mocinc): $(uihdr) | $$(call DIRDEP,$(dir $(mocinc)))
    675         $$(call MSG_TOOL,moc,$(target),$(uihdr),$$@)
    676         $$(QUIET)$$(MKDIR) -p $$(@D)
    677         $$(QUIET)$$(VBOX_MOC) -i $(uihdr) -o $$@
    678 
    679 $(uisrc): $(uihdr) $(uifile) $(mocinc) $(wildcard $(uifile).h) | $$(call DIRDEP,$(dir $(uisrc)))
    680         $$(call MSG_TOOL,uic,$(target),$(uifile),$$@)
    681         $$(QUIET)$$(VBOX_UIC) $(uifile) -i $(uihdr) -o $$@
    682 
    683 $(mocsrc): $(uihdr) $(mocinc) | $$(call DIRDEP,$(dir $(mocsrc)))
    684         $$(call MSG_TOOL,moc,$(target),$(uihdr),$$@)
    685         $$(QUIET)$$(VBOX_MOC) $(uihdr) -o $$@
    686 
    687 endef
    688 
    689 ##  Generate a rule to create a .qm file from a NLS translation
    690 #   source (.ts).
    691 #   @param  $tsfile       Translation source file
    692 define def_qt_gen_nls
    693 
    694 $(eval qmfile  := $(PATH_$(target))/nls/$(notdir $(basename $(tsfile))).qm)
    695 
    696 OTHER_CLEAN += $(qmfile)
    697 
    698 # Note that we use -nocompress in lrelease to avoid stripping comments and
    699 # other information from .qm files. If we don't do that, we get .qm files two
    700 # times smaller, but QTranslator::findMessage() will start searching for
    701 # translations in all existing contexts in case if it cannot find it in the
    702 # original context (which is of course not acceptable, no matter if it's a
    703 # special Qt "feature" or just a bug).
    704 
    705 $(qmfile): $(tsfile) | $$(call DIRDEP,$(dir $(qmfile)))
    706         $$(call MSG_TOOLS,lrelease,$(target),$(tsfile),$$@)
    707         $$(QUIET)$$(VBOX_LRELEASE) -nocompress $(tsfile) -qm $$@
    708 
    709 endef
    710 
    711 ## Generate rules for generating the Qt source for a target.
    712 # @param   $target  Target name.
    713 define def_qt_gen_src
    714 
    715 # moc srcs from hdrs with Q_OBJECT
    716 $(foreach mochdr,$($(target)_QT_MOCHDRS),$(eval $(def_qt_gen_src_moc)))
    717 # moc includes from srcs with Q_OBJECT
    718 $(foreach mocsrc,$($(target)_QT_MOCSRCS),$(eval $(def_qt_gen_inc_moc)))
    719 # moc includes from UI headers with Q_OBJECT
    720 $(foreach mocuihdr,$($(target)_QT_MOCUIHDRS),$(eval $(def_qt_gen_inc_mocuihdr)))
    721 # UI sources
    722 $(foreach uifile,$($(target)_QT_UISRCS),$(eval $(def_qt_gen_src_ui)))
    723 # NLS files
    724 $(foreach tsfile,$($(target)_QT_TRANSLATIONS),$(eval $(def_qt_gen_nls)))
    725 $(foreach tsfile,$($(target)_QT_TRANSLATIONS_QT),$(eval $(def_qt_gen_nls)))
    726 # dirs
    727 $$(call DIRDEP,$(PATH_$(target))/ui/) \
    728 $$(call DIRDEP,$(PATH_$(target))/moc/) \
    729 $$(call DIRDEP,$(PATH_$(target))/nls/):
    730         $$(call MSG_MKDIR,$$@)
    731         $$(QUIET)$$(MKDIR) -p $$@
    732 
    733 endef
    734 
    735 # Generate Qt source rules.
    736 $(foreach target,VirtualBox,$(eval $(def_qt_gen_src)))
    737 
    738 endif # !USE_KBUILD_QT3_UNIT
    739 
    740 # static images imported from VBoxUI.pro as VirtualBox_QT_IMAGES
    741 ## @todo figure out something for QT_IMAGES... (qt3 unit)
    742 $(PATH_VirtualBox)/ui/vbox_image_collection.txt: VBoxUI.pro $(VirtualBox_QT_IMAGES) | $(call DIRDEP,$(PATH_VirtualBox)/ui)
    743         $(RM) -f $@
    744         $(APPEND) -v $@ VirtualBox_QT_IMAGES
    745 
    746 $(PATH_VirtualBox)/ui/vbox_image_collection.cpp: $(PATH_VirtualBox)/ui/vbox_image_collection.txt
    747         $(call MSG_TOOL,uic,VirtualBox,$<,$@)
    748         $(QUIET)$(VBOX_UIC) -o $@ -embed VBoxGUI -f $<
    749 
    750 VirtualBox_GENSRCS += $(PATH_VirtualBox)/ui/vbox_image_collection.cpp
    751 OTHER_CLEAN += $(PATH_VirtualBox)/ui/vbox_image_collection.txt
    752 
    753 
    754 #
    755 # Generate COM Wrappers
    756 #
    757 $(VBOX_WRAPPERS_INC_FILE3): $(VBOX_WRAPPERS_FILE3)
    758 
    759 $(VBOX_WRAPPERS_FILE3): $(VBOX_WRAPPERS_XIDLFILE3) $(VBOX_WRAPPERS_TEMPLATE3) | $(call DIRDEP,$(PATH_VirtualBox)/include/)
    760         $(call MSG_TOOL,xsltproc,VirtualBox,$<,$@)
    761         $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_WRAPPERS_TEMPLATE3) $<
    762 
    763 ifdef USE_KBUILD_QT3_UNIT
    764 # alias for generating the COM Wrappers file.
    765 testwrappers:: $(VBOX_WRAPPERS_FILE3)
     529include $(KBUILD_PATH)/subfooter.kmk
    766530
    767531
     
    774538#
    775539updatenls:: \
    776                 $(VirtualBox4_SOURCES) \
     540                $(VirtualBox_SOURCES) \
    777541                $(wildcard include/*.h)
    778542        $(call MSG_L1,lupdate all languages (nls/*.ts))
     
    780544                $^ \
    781545                -ts \
    782                 $(filter-out nls/qt_%.ts,$(VirtualBox4_QT_TRANSLATIONS)) \
     546                $(filter-out nls/qt_%.ts,$(VirtualBox_QT_TRANSLATIONS)) \
    783547                nls/VirtualBox_xx_YY.ts
    784548
    785 
    786 
    787 
    788 else # !USE_KBUILD_QT3_UNIT
    789 
    790 #
    791 # Hand made dependencies go here.
    792 # Basically, here are dependencies for generated UI source files that
    793 # include generated headers in turn.
    794 #
    795 
    796 $(PATH_VirtualBox)/ui/VBoxDiskImageManagerDlg.cpp: \
    797         $(PATH_VirtualBox)/ui/VBoxNewHDWzd.h
    798 
    799 # Make all generated UI sources dependent on all generated headers (since they
    800 # may include them).  This is safer than indifidual dependencies above but
    801 # currently disabled, because will cause all UI sources to be rebuilt one a
    802 # single one changes.
    803 #$(patsubst %,$(PATH_VirtualBox)/ui/%.cpp,$(notdir $(basename $(VirtualBox_QT_UISRCS)))) : $(VirtualBox_GENHDRS)
    804 
    805 
    806 
    807 
    808 #
    809 # Custom targets
    810 #
    811 
    812 # Update all known NLS translation (.ts) files in the nls/ subdirectory.
    813 # NOTE: This target is intened to be run only by the GUI maintainer shortly
    814 # before a new product release. VirtualBox_xx_YY.ts is a template for new
    815 # languages and should never be actually translated or installed.
    816 updatenls: $(VirtualBox_SOURCES) $(VirtualBox_HEADERS)
    817         $(call MSG_L1,lupdate all languages (nls/*.ts))
    818         $(QUIET)$(VBOX_LUPDATE) $^ -ts $(VirtualBox_QT_TRANSLATIONS) nls/VirtualBox_xx_YY.ts
    819 
    820 
    821 
    822 #
    823 # Test targets
    824 #
    825 
    826 test:
    827         @echo ====================
    828         @echo $(VirtualBox_GENSRCS) | $(SED) -e "s/ /\n/g"
    829         @echo --------------------
    830         @echo $(VirtualBox_GENSRCS_REAL) | $(SED) -e "s/ /\n/g"
    831         @echo ====================
    832         @echo $(VirtualBox_GENHDRS) | $(SED) -e "s/ /\n/g"
    833         @echo --------------------
    834         @echo $(VirtualBox_GENHDRS_REAL) | $(SED) -e "s/ /\n/g"
    835         @echo ====================
    836 
    837 test2:
    838         @echo $(OTHER_CLEAN) | $(SED) -e "s/ /\n/g"
    839 
    840 test3:
    841         @echo $(VirtualBox_HEADERS) | $(SED) -e "s/ /\n/g"
    842 
    843 testwrappers: $(VBOX_WRAPPERS_FILE3)
    844 
    845 endif # !USE_KBUILD_QT3_UNIT
    846 
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