VirtualBox

Ignore:
Timestamp:
Jul 15, 2008 9:12:01 AM (16 years ago)
Author:
vboxsync
Message:

qt3 unit on the move (disabled).

File:
1 edited

Legend:

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

    r10532 r10632  
    11# $Id$
    22## @file
    3 # Makefile for the VirtualBox Qt GUI.
     3# Makefile for the VirtualBox Qt3 GUI.
    44#
    55
     
    2020#
    2121
    22 # include qmake project file
    23 include VBoxUI.pro
    24 
    25 # Import QDesigner UI sources
    26 VirtualBox_QT_UISRCS := $(FORMS)
    27 # Import translation sources
    28 VirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS)
    29 # Import images
    30 VirtualBox_QT_IMAGES := $(IMAGES)
    31 
    32 # reset things to avoid possible conflicts with kBuild
    33 TEMPLATE :=
    34 LANGUAGE :=
    35 FORMS :=
    36 TRANSLATIONS :=
    37 IMAGES :=
    38 
     22DEPTH = ../../../..
     23include $(KBUILD_PATH)/header.kmk
     24
     25#
     26# Globals.
     27#
     28VBOX_PATH_VIRTUALBOX3_SRC := $(PATH_SUB_CURRENT)
    3929VBOX_WITH_REGISTRATION := 1
    4030VBOX_WITH_REGISTRATION_REQUEST := 1
    4131
    42 DEPTH = ../../../..
    43 include $(KBUILD_PATH)/header.kmk
    44 
    45 
    46 #
    47 # Additional images that depend on the version type
    48 #
    49 ifdef VBOX_OSE
    50 VirtualBox_QT_IMAGES += \
    51         images/OSE/about.png \
    52         images/OSE/about_tile.png \
    53         images/OSE/about_16px.png \
    54         images/OSE/VirtualBox_16px.png \
    55         images/OSE/VirtualBox_20px.png \
    56         images/OSE/VirtualBox_32px.png \
    57         images/OSE/VirtualBox_40px.png \
    58         images/OSE/VirtualBox_48px.png \
    59         images/OSE/VirtualBox_64px.png \
    60         images/OSE/VirtualBox_cube_42px.png
    61 else
    62 VirtualBox_QT_IMAGES += \
    63         images/NonOSE/about.png \
    64         images/NonOSE/about_16px.png \
    65         images/NonOSE/VirtualBox_16px.png \
    66         images/NonOSE/VirtualBox_20px.png \
    67         images/NonOSE/VirtualBox_32px.png \
    68         images/NonOSE/VirtualBox_40px.png \
    69         images/NonOSE/VirtualBox_48px.png \
    70         images/NonOSE/VirtualBox_64px.png \
    71         images/NonOSE/VirtualBox_cube_42px.png
    72 endif
    73 
    74 
    75 #
    76 # exclude inappropriate UI content
    77 #
    78 ifndef VBOX_WITH_REGISTRATION
    79 VirtualBox_QT_UISRCS := $(filter-out ui/VBoxRegistrationDlg.ui,$(VirtualBox_QT_UISRCS))
    80 endif
    81 
    8232
    8333#
     
    8636PROGRAMS = VirtualBox
    8737ifeq ($(filter-out freebsd linux openbsd netbsd solaris,$(KBUILD_TARGET)),) # X11
    88 DLLS = VBoxKeyboard3
    89 OTHERS = $(PATH_BIN)/vboxkeyboard3.tar.gz
    90 endif
    91 INSTALLS = VirtualBox.nls
     38 DLLS = VBoxKeyboard3
     39 OTHERS = $(PATH_BIN)/vboxkeyboard3.tar.gz
     40endif
     41DLLS.os2 += VBoxHlp
     42ifndef USE_KBUILD_QT3_UNIT
     43 INSTALLS = VirtualBox.nls
     44endif
     45
    9246
    9347ifeq ($(KBUILD_TARGET),os2)
    94  DLLS += VBoxHlp
     48 #
     49 # VBoxHlp - helper DLL for OS/2.
     50 #
     51 VBoxHlp_ASTOOL      = NASM
     52 VBoxHlp_ASFLAGS     = -f obj
     53 VBoxHlp_DEFS        = IN_RING3 IN_VBOXHLP
     54 VBoxHlp_CXXFLAGS    = -fno-exceptions
     55 VBoxHlp_LDFLAGS     = -nostdlib -los2
     56 VBoxHlp_LDFLAGS    += -Zlinker option -Zlinker manyautodata
     57 VBoxHlp_SOURCES     = \
     58        src/os2/VBoxHlp.asm \
     59        src/os2/VBoxHlp.cpp
     60
     61 #
     62 # Hack for installing the qt.dll when building for OS/2.
     63 #
    9564 ifneq ($(strip $(VBOX_DLL_QT)),)
    96   INSTALLS += qt.dll
     65  INSTALLS.os2 += qt.dll
    9766  qt.dll_INST = $(INST_BIN)
    9867  qt.dll_SOURCES += \
    9968        $(VBOX_DLL_QT)=>$(not-dir $(VBOX_DLL_QT))
    10069 endif
    101 endif
    102 
    103 
    104 #
    105 # VBoxHlp - helper DLL for OS/2.
    106 #
    107 VBoxHlp_ASTOOL      = NASM
    108 VBoxHlp_ASFLAGS     = -f obj
    109 VBoxHlp_DEFS        = IN_RING3 IN_VBOXHLP
    110 VBoxHlp_CXXFLAGS    = -fno-exceptions
    111 VBoxHlp_LDFLAGS     = -nostdlib -los2
    112 VBoxHlp_LDFLAGS    += -Zlinker option -Zlinker manyautodata
    113 VBoxHlp_SOURCES     = \
    114         src/os2/VBoxHlp.asm \
    115         src/os2/VBoxHlp.cpp
     70endif # OS/2
    11671
    11772
     
    152107
    153108#
     109# Note: I'm doing this right here because the GUI will _not_ run
     110#       without that file which might be annoying for developers!
     111#
     112## @todo is is an ugly hack, change into an install target or make the root Makefile do this!
     113ifndef VBOX_OSE
     114 ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # linux only, yea, right.
     115$(VBOX_LICENSE_BIN): $(VBOX_LICENSE_SRC)
     116        $(call MSG_GENERATE,,$@)
     117        $(QUIET)$(CP) $< $@
     118
     119$(PATH_BIN)/VirtualBox3: $(VBOX_LICENSE_BIN)
     120 endif
     121endif
     122
     123
     124#
     125# Include Qt project file, we'll use FORMS, TRANSLATIONS and IMAGES
     126# in the VirtualBox(3) setup below.
     127#
     128SAVED_TEMPLATE := $(TEMPLATE)
     129include $(PATH_SUB_CURRENT)/VBoxUI.pro
     130
     131
     132# Import images from VBoxUI.pro and add some additional ones
     133# that differs between OSE and PEUL.
     134VirtualBox_QT_IMAGES := $(IMAGES)
     135ifdef VBOX_OSE
     136 VirtualBox_QT_IMAGES += \
     137        images/OSE/about.png \
     138        images/OSE/about_tile.png \
     139        images/OSE/about_16px.png \
     140        images/OSE/VirtualBox_16px.png \
     141        images/OSE/VirtualBox_20px.png \
     142        images/OSE/VirtualBox_32px.png \
     143        images/OSE/VirtualBox_40px.png \
     144        images/OSE/VirtualBox_48px.png \
     145        images/OSE/VirtualBox_64px.png \
     146        images/OSE/VirtualBox_cube_42px.png
     147else
     148 VirtualBox_QT_IMAGES += \
     149        images/NonOSE/about.png \
     150        images/NonOSE/about_16px.png \
     151        images/NonOSE/VirtualBox_16px.png \
     152        images/NonOSE/VirtualBox_20px.png \
     153        images/NonOSE/VirtualBox_32px.png \
     154        images/NonOSE/VirtualBox_40px.png \
     155        images/NonOSE/VirtualBox_48px.png \
     156        images/NonOSE/VirtualBox_64px.png \
     157        images/NonOSE/VirtualBox_cube_42px.png
     158endif
     159
     160
     161
     162#
    154163# VirtualBox - The GUI program.
    155164#
    156165VirtualBox_TEMPLATE = VBOXQTGUIEXE
    157166VirtualBox_NAME     = VirtualBox3
     167ifdef USE_KBUILD_QT3_UNIT
     168 USES += qt3
     169 VirtualBox_USES    = qt3
     170 VirtualBox_SDKS   += QT3
     171 VirtualBox_QTTOOL  = QT3
     172endif
    158173VirtualBox_SDKS.win = WINPSDK DXSDK
    159174#ifeq ($(filter-out freebsd linux netbsd openbsd os2 solaris,$(KBUILD_TARGET)),) - later
    160175ifeq ($(filter-out freebsd linux netbsd openbsd os2,$(KBUILD_TARGET)),) # X11 + os2
    161 VirtualBox_SDKS += LIBSDL
     176 VirtualBox_SDKS += LIBSDL
    162177endif
    163178
    164179ifeq ($(KBUILD_TARGET),darwin)
    165 # For the launch trick we need different inode numbers.
    166 VirtualBox_INST = $(INST_BIN)VirtualBox3 $(INST_BIN)VirtualBoxVM3
    167 
    168  # For testing iChat Theater stuff change
    169  # the sdk path
     180 # For the launch trick we need different inode numbers.
     181 VirtualBox_INST = $(INST_BIN)VirtualBox3 $(INST_BIN)VirtualBoxVM3
     182 # For testing iChat Theater stuff change the sdk path (HACK ALERT)
    170183 ifdef VBOX_WITH_ICHAT_THEATER
    171184  VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk
    172185 endif
    173 
    174 endif
    175 
    176 ifndef VBOX_OSE
    177 ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # linux only, yea, right.
    178 # Note: I'm doing this right here because the GUI will _not_ run
    179 #       without that file which might be annoying for developers!
    180 $(VBOX_LICENSE_BIN): $(VBOX_LICENSE_SRC)
    181         $(call MSG_GENERATE,,$@)
    182         $(QUIET)$(CP) $< $@
    183 
    184 $(PATH_BIN)/VirtualBox3: $(VBOX_LICENSE_BIN)
    185 endif
    186 endif
    187 
    188 # Each nls/VirtualBox_xx_YY.ts file must have a qt_xx_YY.ts counterpart
    189 VirtualBox_QT_TRANSLATIONS_QT := \
    190         $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts,\
    191                 $(filter nls/VirtualBox_%.ts,$(VirtualBox_QT_TRANSLATIONS)))
    192 
    193 # QDesigner UI sources are imported from VBoxUI.pro as VirtualBox_QT_UISRC
     186endif # darwin
     187
     188# Import translation sources
     189ifdef USE_KBUILD_QT3_UNIT
     190 VirtualBox3_QT_TRANSLATIONS := $(TRANSLATIONS) \
     191        $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts, $(filter nls/VirtualBox_%.ts,$(TRANSLATIONS)))
     192else
     193 VirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS)
     194 # Each nls/VirtualBox_xx_YY.ts file must have a qt_xx_YY.ts counterpart
     195 VirtualBox_QT_TRANSLATIONS_QT := \
     196        $(patsubst nls/VirtualBox_%.ts,nls/qt_%.ts,\
     197                $(filter nls/VirtualBox_%.ts,$(VirtualBox_QT_TRANSLATIONS)))
     198endif
     199VirtualBox_LRCFLAGS = -nocompress
     200VirtualBox_QT_TRANSLATIONS_INST = $(INST_BIN)nls3/
     201
     202# QDesigner UI sources are imported from VBoxUI.pro.
     203## @todo move down.
     204ifndef VBOX_WITH_REGISTRATION
     205 FORMS := $(filter-out ui/VBoxRegistrationDlg.ui,$(FORMS))
     206endif
     207ifdef USE_KBUILD_QT3_UNIT
     208 $(eval VirtualBox_SOURCES += $(FORMS) )
     209else
     210 VirtualBox_QT_UISRCS := $(FORMS)
     211endif
    194212
    195213# Headers containing definitions of classes that use the Q_OBJECT macro
     
    216234VirtualBox_QT_MOCSRCS = src/VBoxSelectorWnd.cpp
    217235ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
    218 VirtualBox_QT_MOCSRCS += src/VBoxGlobal.cpp
     236 VirtualBox_QT_MOCSRCS += src/VBoxGlobal.cpp
    219237endif
    220238ifdef VBOX_WITH_XPCOM
    221 VirtualBox_QT_MOCSRCS += src/COMDefs.cpp
     239 VirtualBox_QT_MOCSRCS += src/COMDefs.cpp
    222240endif
    223241
    224242# UI headers (ui.h) containing local definitions of classes that use the Q_OBJECT macro
    225 VirtualBox_QT_MOCUIHDRS = \
     243ifdef USE_KBUILD_QT3_UNIT
     244## @todo move up
     245 VirtualBox_QT_MOCSRCS += \
    226246        ui/VBoxVMSettingsDlg.ui.h \
    227247        ui/VBoxVMLogViewer.ui.h \
     
    229249        ui/VBoxHardDiskSettings.ui.h
    230250
    231 
    232 # All generated sources. Note: this list MUST be in sync with Qt source
    233 # generation rules defined somewhere below!
    234 VirtualBox_GENSRCS = \
    235         $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCHDRS))), $(PATH_VirtualBox)/moc/moc_$(moc).cpp) \
    236         $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS))), $(PATH_VirtualBox)/ui/$(ui).cpp $(PATH_VirtualBox)/moc/moc_$(ui).cpp) \
    237         $(PATH_VirtualBox)/ui/vbox_image_collection.cpp
    238 
    239 # All generated headers. Note: this list MUST be in sync with Qt source
    240 # generation rules defined somewhere below!
    241 VirtualBox_GENHDRS = \
    242         $(foreach mocui,$(notdir $(basename $(VirtualBox_QT_MOCUIHDRS))), $(PATH_VirtualBox)/moc/$(mocui).moc) \
    243         $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCSRCS))), $(PATH_VirtualBox)/moc/$(moc).moc) \
    244         $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS))), $(PATH_VirtualBox)/ui/$(ui).h)
    245 
    246 # All existing .ui.h files for known .ui sources
    247 VirtualBox_QT_UIHDRS = \
    248         $(wildcard $(addsuffix .h,$(VirtualBox_QT_UISRCS)))
    249 
    250 # All header files
    251 VirtualBox_HEADERS = \
    252         $(wildcard include/*.h) \
    253         $(VirtualBox_GENHDRS) \
    254         $(VirtualBox_QT_UIHDRS)
    255 
    256 
    257 VirtualBox_SOURCES = \
    258         $(VirtualBox_GENSRCS) \
     251else # !USE_KBUILD_QT3_UNIT
     252 VirtualBox_QT_MOCUIHDRS = \
     253        ui/VBoxVMSettingsDlg.ui.h \
     254        ui/VBoxVMLogViewer.ui.h \
     255        ui/VBoxSharedFoldersSettings.ui.h \
     256        ui/VBoxHardDiskSettings.ui.h
     257
     258 # All generated sources. Note: this list MUST be in sync with Qt source
     259 # generation rules defined somewhere below!
     260 VirtualBox_GENSRCS = \
     261        $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCHDRS))), $(PATH_VirtualBox)/moc/moc_$(moc).cpp) \
     262        $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS))), $(PATH_VirtualBox)/ui/$(ui).cpp $(PATH_VirtualBox)/moc/moc_$(ui).cpp) \
     263        $(PATH_VirtualBox)/ui/vbox_image_collection.cpp
     264
     265 # All generated headers. Note: this list MUST be in sync with Qt source
     266 # generation rules defined somewhere below!
     267 VirtualBox_GENHDRS = \
     268        $(foreach mocui,$(notdir $(basename $(VirtualBox_QT_MOCUIHDRS))), $(PATH_VirtualBox)/moc/$(mocui).moc) \
     269        $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCSRCS))), $(PATH_VirtualBox)/moc/$(moc).moc) \
     270        $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS))), $(PATH_VirtualBox)/ui/$(ui).h)
     271
     272 # All existing .ui.h files for known .ui sources
     273 VirtualBox_QT_UIHDRS = \
     274        $(wildcard $(addsuffix .h,$(VirtualBox_QT_UISRCS)))
     275
     276 # All header files
     277 VirtualBox_HEADERS = \
     278        $(wildcard include/*.h) \
     279        $(VirtualBox_GENHDRS) \
     280        $(VirtualBox_QT_UIHDRS)
     281
     282 VirtualBox_SOURCES += $(VirtualBox_GENSRCS)
     283endif # !USE_KBUILD_QT3_UNIT
     284
     285VirtualBox_SOURCES += \
    259286        src/main.cpp \
    260287        src/COMDefs.cpp \
     
    280307
    281308ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11
    282 VirtualBox_SOURCES += \
     309 VirtualBox_SOURCES += \
    283310        src/linux/XKeyboard-new.cpp
    284311endif
     
    300327endif
    301328
     329ifdef USE_KBUILD_QT3_UNIT
     330 ## @todo deal with QT_IMAGES...
     331 VirtualBox_SOURCES += \
     332        $(PATH_VirtualBox)/ui/vbox_image_collection.cpp
     333 VirtualBox_BLDDIRS += $(PATH_VirtualBox)/ui
     334endif
     335
    302336ifndef VBOX_OSE
    303 VirtualBox_SOURCES += src/VBoxAboutNonOSEDlg.cpp
    304 VirtualBox_QT_MOCHDRS += include/VBoxAboutNonOSEDlg.h
     337 VirtualBox_SOURCES += src/VBoxAboutNonOSEDlg.cpp
     338 VirtualBox_QT_MOCHDRS += include/VBoxAboutNonOSEDlg.h
    305339endif
    306340# OSE version is always necessary for lupdate/lrelease
    307341VirtualBox_QT_UISRCS += ui/VBoxAboutDlg.ui
    308 
    309 ifneq ($(KBUILD_TARGET),win)
    310 src/HappyHttp.cpp_CXXFLAGS += -fexceptions
    311 src/VBoxDownloaderWgt.cpp_CXXFLAGS += -fexceptions
    312 src/VBoxNetworkFramework.cpp_CXXFLAGS += -fexceptions
    313 endif
    314 src/HappyHttp.cpp_CXXFLAGS.linux += -O2
    315 
    316 ## @todo how to detect what tool is used?
    317 ## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use
    318 #  more generic -Wno-extra
    319 ifdef VBOX_WITH_XPCOM
    320 src/COMDefs.cpp_CXXFLAGS  = $(VBOX_GCC_Wno-extra)
    321 endif
    322342
    323343VirtualBox_DEFS           = VBOX_GUI_SEPARATE_VM_PROCESS
     
    336356#endif
    337357ifdef VBOX_WITH_ICHAT_THEATER
    338  VirtualBox_DEFS.darwin += VBOX_WITH_ICHAT_THEATER
     358 VirtualBox_DEFS.darwin  += VBOX_WITH_ICHAT_THEATER
    339359endif
    340360ifneq ($(KBUILD_TYPE),release)
     
    367387VirtualBox_INCS           = \
    368388        ./include \
     389        $(PATH_VirtualBox)/include
     390ifndef USE_KBUILD_QT3_UNIT
     391 VirtualBox_INCS         += \
    369392        $(PATH_VirtualBox)/ui \
    370         $(PATH_VirtualBox)/moc \
    371         $(PATH_VirtualBox)/include \
    372 
     393        $(PATH_VirtualBox)/moc
     394endif
    373395
    374396ifeq ($(KBUILD_TYPE),release)
     
    405427endif
    406428
    407 WRAPPERSFILE        = $(PATH_VirtualBox)/include/COMWrappers.h
    408 WRAPPERSINCFILE     = include/COMDefs.h
    409 WRAPPERSTEMPLATE    = include/COMWrappers.xsl
    410 XIDLFILE            = ../../Main/idl/VirtualBox.xidl
    411 
    412 VirtualBox_INTERMEDIATES += $(WRAPPERSFILE)
     429# Some flag hacks (should go away).
     430ifneq ($(KBUILD_TARGET),win)
     431 src/HappyHttp.cpp_CXXFLAGS += -fexceptions
     432 src/VBoxDownloaderWgt.cpp_CXXFLAGS += -fexceptions
     433 src/VBoxNetworkFramework.cpp_CXXFLAGS += -fexceptions
     434endif
     435src/HappyHttp.cpp_CXXFLAGS.linux += -O2
     436
     437## @todo how to detect what tool is used?
     438## @todo GCC3 seems to lack -Wno-missing-base-class-initializer, so we use more generic -Wno-extra
     439## @todo r=bird: see VirtualBox4.
     440ifdef VBOX_WITH_XPCOM
     441 src/COMDefs.cpp_CXXFLAGS = $(VBOX_GCC_Wno-extra)
     442endif
     443
     444
     445#
     446# Other stuff
     447#
     448VBOX_WRAPPERS_FILE3      = $(PATH_VirtualBox)/include/COMWrappers.h
     449VirtualBox_BLDDIRS      += $(PATH_VirtualBox)/include/
     450VirtualBox_INTERMEDIATES+= $(VBOX_WRAPPERS_FILE3)
     451
     452VBOX_WRAPPERS_INC_FILE3 := $(PATH_SUB_CURRENT)/include/COMDefs.h
     453VBOX_WRAPPERS_TEMPLATE3 := $(PATH_SUB_CURRENT)/include/COMWrappers.xsl
     454VBOX_WRAPPERS_XIDLFILE3 := $(PATH_SUB_CURRENT)/../../Main/idl/VirtualBox.xidl
    413455
    414456
     
    417459        $(VirtualBox_GENSRCS) \
    418460        $(VirtualBox_GENHDRS) \
    419         $(WRAPPERSFILE) \
     461        $(VBOX_WRAPPERS_FILE3) \
    420462        $(PATH_BIN)/vboxkeyboard3.tar.gz
    421463
     
    474516                --output $@ $<
    475517
     518
     519ifndef USE_KBUILD_QT3_UNIT
    476520#
    477521# Translation installation
     
    481525VirtualBox.nls_SOURCES += $(patsubst %.ts,$(PATH_VirtualBox)/nls/%.qm,$(notdir $(VirtualBox_QT_TRANSLATIONS_QT)))
    482526VirtualBox.nls_MODE = 644
    483 
    484 
    485 #
    486 # Testcase for the darwin keyboard routines.
    487 #
     527endif
     528
     529
    488530ifdef VBOX_WITH_TESTCASES
    489 PROGRAMS.darwin += tstDarwinKeyboard
    490 tstDarwinKeyboard_TEMPLATE = VBOXR3TSTEXE
    491 tstDarwinKeyboard_NAME = tstDarwinKeyboard3
    492 tstDarwinKeyboard_INCS = include
    493 tstDarwinKeyboard_SOURCES = \
    494         src/darwin/tstDarwinKeyboard.cpp \
    495         src/darwin/DarwinKeyboard.cpp
    496 tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon
    497 tstDarwinKeyboard_LIBS = \
    498         $(LIB_RUNTIME)
    499 endif
     531 #
     532 # Testcase for the darwin keyboard routines.
     533 #
     534 PROGRAMS.darwin += tstDarwinKeyboard
     535 tstDarwinKeyboard_TEMPLATE = VBOXR3TSTEXE
     536 tstDarwinKeyboard_NAME = tstDarwinKeyboard3
     537 tstDarwinKeyboard_INCS = include
     538 tstDarwinKeyboard_SOURCES = \
     539        src/darwin/tstDarwinKeyboard.cpp \
     540        src/darwin/DarwinKeyboard.cpp
     541 tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon
     542 tstDarwinKeyboard_LIBS = \
     543        $(LIB_RUNTIME)
     544endif
     545
     546
     547#
     548# Restore / reset things to avoid possible conflicts with kBuild (VBoxUI.pro).
     549#
     550TEMPLATE := $(SAVED_TEMPLATE)
     551LANGUAGE :=
     552FORMS :=
     553TRANSLATIONS :=
     554IMAGES :=
    500555
    501556
    502557
    503558# Commit the magic.
    504 # (note: before custom rules that make usage of generated variables!).
     559# (note: before custom rules that make use of generated variables!).
    505560include $(KBUILD_PATH)/footer.kmk
    506561
    507562
     563
     564ifndef USE_KBUILD_QT3_UNIT
    508565
    509566#
     
    575632define def_qt_gen_src_ui
    576633
    577 $(eval uisrc  := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).cpp)
    578634$(eval uihdr  := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).h)
    579635$(eval mocinc := $(PATH_$(target))/moc/$(notdir $(basename $(uifile))).moc)
     636$(eval uisrc  := $(PATH_$(target))/ui/$(notdir $(basename $(uifile))).cpp)
    580637$(eval mocsrc := $(PATH_$(target))/moc/moc_$(notdir $(basename $(uifile))).cpp)
    581638
     
    652709$(foreach target,VirtualBox,$(eval $(def_qt_gen_src)))
    653710
    654 
    655 # Generate COM Wrappers
    656 $(WRAPPERSINCFILE): $(WRAPPERSFILE)
    657 
    658 $(WRAPPERSFILE): $(XIDLFILE) $(WRAPPERSTEMPLATE) | $(call DIRDEP,$(PATH_VirtualBox)/include/)
    659         $(call MSG_TOOL,xsltproc,VirtualBox,$<,$@)
    660         $(QUIET)$(VBOX_XSLTPROC) -o $@ $(WRAPPERSTEMPLATE) $<
    661 
    662 $(call DIRDEP,$(PATH_VirtualBox)/include/):
    663         $(call MSG_MKDIR,$@)
    664         $(QUIET)$(MKDIR) -p $@
     711endif # !USE_KBUILD_QT3_UNIT
    665712
    666713# static images imported from VBoxUI.pro as VirtualBox_QT_IMAGES
    667 $(PATH_VirtualBox)/ui/vbox_image_collection.txt: VBoxUI.pro $(VirtualBox_QT_IMAGES)
     714## @todo figure out something for QT_IMAGES... (qt3 unit)
     715$(PATH_VirtualBox)/ui/vbox_image_collection.txt: VBoxUI.pro $(VirtualBox_QT_IMAGES) | $(call DIRDEP,$(PATH_VirtualBox)/ui)
    668716        $(RM) -f $@
    669717        $(APPEND) -v $@ VirtualBox_QT_IMAGES
     
    676724OTHER_CLEAN += $(PATH_VirtualBox)/ui/vbox_image_collection.txt
    677725
     726
     727#
     728# Generate COM Wrappers
     729#
     730$(VBOX_WRAPPERS_INC_FILE3): $(VBOX_WRAPPERS_FILE3)
     731
     732$(VBOX_WRAPPERS_FILE3): $(VBOX_WRAPPERS_XIDLFILE3) $(VBOX_WRAPPERS_TEMPLATE3) | $(call DIRDEP,$(PATH_VirtualBox)/include/)
     733        $(call MSG_TOOL,xsltproc,VirtualBox,$<,$@)
     734        $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_WRAPPERS_TEMPLATE3) $<
     735
     736ifdef USE_KBUILD_QT3_UNIT
     737# alias for generating the COM Wrappers file.
     738testwrappers:: $(VBOX_WRAPPERS_FILE3)
     739
     740
     741#
     742# Update all known NLS translation (.ts) files in the nls/ subdirectory.
     743#
     744# NOTE: This target is intened to be run only by the GUI maintainer shortly
     745# before a new product release. VirtualBox_xx_YY.ts is a template for new
     746# languages and should never be actually translated or installed.
     747#
     748updatenls:: \
     749                $(VirtualBox4_SOURCES) \
     750                $(wildcard include/*.h)
     751        $(call MSG_L1,lupdate all languages (nls/*.ts))
     752        $(QUIET)$(TOOL_QT3_LUPDATE) \
     753                $^ \
     754                -ts \
     755                $(filter-out nls/qt_%.ts,$(VirtualBox4_QT_TRANSLATIONS)) \
     756                nls/VirtualBox_xx_YY.ts
     757
     758
     759
     760
     761else # !USE_KBUILD_QT3_UNIT
    678762
    679763#
     
    691775# single one changes.
    692776#$(patsubst %,$(PATH_VirtualBox)/ui/%.cpp,$(notdir $(basename $(VirtualBox_QT_UISRCS)))) : $(VirtualBox_GENHDRS)
     777
     778
    693779
    694780
     
    704790        $(call MSG_L1,lupdate all languages (nls/*.ts))
    705791        $(QUIET)$(VBOX_LUPDATE) $^ -ts $(VirtualBox_QT_TRANSLATIONS) nls/VirtualBox_xx_YY.ts
     792
    706793
    707794
     
    727814        @echo $(VirtualBox_HEADERS) | $(SED) -e "s/ /\n/g"
    728815
    729 testwrappers: $(WRAPPERSFILE)
    730 
     816testwrappers: $(VBOX_WRAPPERS_FILE3)
     817
     818endif # !USE_KBUILD_QT3_UNIT
     819
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