VirtualBox

Changeset 12173 in vbox


Ignore:
Timestamp:
Sep 6, 2008 4:24:33 AM (16 years ago)
Author:
vboxsync
Message:

Makefiles: Moved the Qt4 templates to Config.kmk and the qt4-bin install target to the root makefile.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r12169 r12173  
    28592859
    28602860#
     2861# Qt 4
     2862# Qt 4
     2863# Qt 4
     2864#
     2865
     2866# Guess VBOX_WITH_QT4_SUN
     2867ifndef VBOX_WITH_QT4_SUN
     2868 ifndef VBOX_OSE
     2869  if1of ($(KBUILD_TARGET), darwin solaris win)
     2870   VBOX_WITH_QT4_SUN := 1
     2871  endif
     2872 endif
     2873endif
     2874
     2875#
     2876# Handmade configuration of qt4 - very annoying, this needs to
     2877# be cleaned up properly later some time (not important now).
     2878#
     2879ifeq ($(VBOX_PATH_QT4),)
     2880 ifeq ($(KBUILD_TARGET),darwin)
     2881  VBOX_PATH_QT4 := $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
     2882  ifeq ($(VBOX_PATH_QT4),)
     2883   ifneq ($(wildcard /Library/Frameworks/QtCore.framework),)
     2884    # Using the global installation (for OSE).
     2885    VBOX_PATH_QT4 ?= /usr
     2886    VBOX_PATH_QT4_FRAMEWORKS ?= /Library/Frameworks
     2887   endif
     2888  endif
     2889 else if1of ($(KBUILD_TARGET),win)
     2890  VBOX_PATH_QT4 ?= $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
     2891 else if1of ($(KBUILD_TARGET),solaris)
     2892  VBOX_PATH_QT4 ?= $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
     2893  ifneq ($(VBOX_PATH_QT4),)
     2894   VBOX_WITH_QT4_SUN = 1
     2895  endif
     2896 endif
     2897endif
     2898ifeq ($(VBOX_PATH_QT4),)
     2899 if1of ($(USERNAME), bird)
     2900  # gentoo (64-bit)
     2901  VBOX_PATH_QT4          ?= /usr
     2902  VBOX_PATH_QT4_LIB      ?= /usr/lib/qt4
     2903 endif
     2904endif
     2905VBOX_PATH_QT4            ?= /usr
     2906VBOX_PATH_QT4_LIB        ?= $(VBOX_PATH_QT4)/lib
     2907
     2908# Hack LD_LIBRARY_PATH for stuff in tools.
     2909ifdef VBOX_WITH_QT4_SUN
     2910 if1of ($(KBUILD_TARGET), linux)
     2911  export LD_LIBRARY_PATH := $(VBOX_PATH_QT4_LIB):$(LD_LIBRARY_PATH)
     2912 endif
     2913endif
     2914
     2915
     2916#
     2917# Template for building Qt GUI executables.
     2918#
     2919TEMPLATE_VBOXQT4GUIEXE = VBox Qt4 GUI Executable
     2920USES += qt4
     2921TEMPLATE_VBOXQT4GUIEXE_USES = qt4
     2922TEMPLATE_VBOXQT4GUIEXE_QTTOOL = QT4
     2923TEMPLATE_VBOXQT4GUIEXE_MOCTOOL = QT4
     2924TEMPLATE_VBOXQT4GUIEXE_UICTOOL = QT4
     2925TEMPLATE_VBOXQT4GUIEXE_RCCTOOL = QT4
     2926TEMPLATE_VBOXQT4GUIEXE_LRCTOOL = QT4
     2927TEMPLATE_VBOXQT4GUIEXE_SDKS = QT4
     2928ifdef VBOX_WITH_QT4_SUN
     2929 ifneq ($(KBUILD_TARGET),darwin) ## @todo The next darwin build should also make use the prefix just to make things more uniform.
     2930  TEMPLATE_VBOXQT4GUIEXE_QT_PREFIX = VBox
     2931 endif
     2932endif
     2933TEMPLATE_VBOXQT4GUIEXE_DEFS = IN_RING3 QT_NO_DEBUG QT_THREAD_SUPPORT QT_SHARED HAVE_CONFIG_H $(ARCH_BITS_DEFS)
     2934
     2935ifeq ($(KBUILD_TARGET),win)
     2936 TEMPLATE_VBOXQT4GUIEXE_TOOL = $(VBOX_VCC_TOOL)
     2937 TEMPLATE_VBOXQT4GUIEXE_DEFS += \
     2938    _WIN32_WINNT=0x0500 UNICODE _UNICODE \
     2939    QT_DLL _CRT_SECURE_NO_DEPRECATE \
     2940    $(QMAKE_PRL_DEFINES)
     2941 ## @todo VCC70 flags?
     2942 ifdef VBOX_USE_VCC80
     2943  TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \
     2944        -nologo -Zm200 -W3 -MD -Zi -EHsc -Zc:wchar_t-
     2945  TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.debug = -RTCsu
     2946 else
     2947  TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \
     2948        -nologo -Zm200 -W3 -MD -Zi -GX
     2949  TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.debug = -GZ
     2950 endif
     2951 TEMPLATE_VBOXQT4GUIEXE_INCS += \
     2952        $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC)
     2953 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS = \
     2954        /NOD /NOLOGO /INCREMENTAL:NO /MAPINFO:EXPORTS /DEBUG \
     2955        /DELAYLOAD:oleaut32.dll
     2956 TEMPLATE_VBOXQT4GUIEXE_SDKS += WINPSDK
     2957 TEMPLATE_VBOXQT4GUIEXE_LIBS = \
     2958        $(VBOX_LIBS_QT4) \
     2959        $(LIB_RUNTIME) \
     2960        $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcprt.lib \
     2961        $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcrt.lib \
     2962        $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/oldnames.lib \
     2963        $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib \
     2964        $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls.lib
     2965 TEMPLATE_VBOXQT4GUIEXE_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS)
     2966
     2967else # the gcc guys:
     2968 TEMPLATE_VBOXQT4GUIEXE_TOOL = $(VBOX_GCC_TOOL)
     2969 TEMPLATE_VBOXQT4GUIEXE_DEFS.linux = _REENTRANT
     2970
     2971 TEMPLATE_VBOXQT4GUIEXE_DEFS.solaris = _REENTRANT
     2972
     2973 TEMPLATE_VBOXQT4GUIEXE_INCS += \
     2974        $(LIB_SDL_INC)
     2975 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \
     2976        -g -pipe -Wall -W -frtti -fno-exceptions -Wno-non-virtual-dtor \
     2977        -Wno-long-long -fshort-wchar -fno-strict-aliasing \
     2978        $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden)
     2979 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.x86 = -m32
     2980 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.amd64 = -m64
     2981 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.linux = -pthread
     2982 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.x86 = -m32
     2983 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.amd64 = -m64
     2984 TEMPLATE_VBOXQT4GUIEXE_LIBS = \
     2985        $(VBOX_LIBS_QT4) \
     2986        $(LIB_SDL) \
     2987        $(LIB_RUNTIME) \
     2988        $(LIB_REM) \
     2989        $(LIB_VMM)
     2990
     2991 ifeq ($(KBUILD_TARGET),linux)
     2992  TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += $(VBOX_LD_as_needed)
     2993  TEMPLATE_VBOXQT4GUIEXE_LIBS += \
     2994    $(VBOX_XCURSOR_LIBS) \
     2995        Xext
     2996  TEMPLATE_VBOXQT4GUIEXE_LIBPATH += \
     2997    $(VBOX_LIBPATH_X11)
     2998 else ifeq ($(KBUILD_TARGET),darwin)
     2999  TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.darwin += -bind_at_load
     3000  TEMPLATE_VBOXQT4GUIEXE_LIBS +=
     3001  TEMPLATE_VBOXQT4GUIEXE_LIBPATH +=
     3002 else
     3003  TEMPLATE_VBOXQT4GUIEXE_INCS += \
     3004        $(VBOX_XCURSOR_INCS)
     3005  TEMPLATE_VBOXQT4GUIEXE_LIBS += \
     3006    $(VBOX_XCURSOR_LIBS) \
     3007        Xext \
     3008        X11 \
     3009        m \
     3010        $(LIB_PTHREAD)
     3011  TEMPLATE_VBOXQT4GUIEXE_LIBPATH += \
     3012        $(VBOX_LIBPATH_X11)
     3013  ifeq ($(KBUILD_TARGET),freebsd)
     3014   TEMPLATE_VBOXQT4GUIEXE_INCS += \
     3015        /usr/include \
     3016        /usr/X11R6/include \
     3017        /usr/local/include
     3018  endif
     3019  ifeq ($(KBUILD_TARGET),solaris)
     3020   TEMPLATE_VBOXQT4GUIEXE_LIBS += \
     3021        rt socket nsl
     3022  endif
     3023 endif
     3024 # Assume the Qt shared objects are in the same directory as the executable, on Solaris too.
     3025 ifdef VBOX_WITH_RUNPATH
     3026  TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)'
     3027 else ifdef VBOX_WITH_ORIGIN
     3028  TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)'
     3029 endif
     3030
     3031endif
     3032
     3033# Add COM/XPCOM stuff
     3034TEMPLATE_VBOXQT4GUIEXE_LIBS += \
     3035        $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB)
     3036ifdef VBOX_WITH_XPCOM
     3037 ## @todo may be worth creating the VBOX_XPCOM SDK def, or just a SDK_VBOXXPCOM.
     3038 TEMPLATE_VBOXQT4GUIEXE_DEFS += VBOX_WITH_XPCOM
     3039 ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
     3040  TEMPLATE_VBOXQT4GUIEXE_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
     3041 endif
     3042 TEMPLATE_VBOXQT4GUIEXE_INCS += \
     3043        $(VBOX_XPCOM_INCS)
     3044 TEMPLATE_VBOXQT4GUIEXE_LIBS += \
     3045        $(LIB_XPCOM)
     3046else  # COM
     3047 TEMPLATE_VBOXQT4GUIEXE_INCS += \
     3048        $(VBOX_PATH_SDK)/bindings/mscom/include
     3049endif # COM
     3050
     3051#
     3052# Template for building Qt4 GUI components.
     3053#
     3054TEMPLATE_VBOXQT4GUI = VBox Qt4 GUI Components
     3055TEMPLATE_VBOXQT4GUI_EXTENDS = VBOXQT4GUIEXE
     3056TEMPLATE_VBOXQT4GUI_LIBS = $(filter-out $(QTMAIN),$(TEMPLATE_VBOXQT4GUIEXE_LIBS))
     3057ifeq ($(KBUILD_TARGET),darwin)
     3058 TEMPLATE_VBOXQT4GUI_LDFLAGS.darwin += $(filter-out -bind_at_load,$(TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.darwin)) \
     3059        -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
     3060endif
     3061ifeq ($(filter-out solaris.x86 %.amd64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),)
     3062 ifneq ($(KBUILD_TARGET),win)
     3063  TEMPLATE_VBOXQT4GUI_DEFS     = PIC $(TEMPLATE_VBOXQT4GUIEXE_DEFS)
     3064  TEMPLATE_VBOXQT4GUI_CFLAGS   = -fPIC $(TEMPLATE_VBOXQT4GUIEXE_CFLAGS)
     3065  TEMPLATE_VBOXQT4GUI_CXXFLAGS = -fPIC $(TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS)
     3066  TEMPLATE_VBOXQT4GUI_LDFLAGS  = -fPIC $(TEMPLATE_VBOXQT4GUIEXE_LDFLAGS)
     3067 endif
     3068endif
     3069
     3070
     3071
     3072#
    28613073# Template for building build bldprogs.
    28623074#
  • trunk/Makefile.kmk

    r12142 r12173  
    138138 endif
    139139endif
     140
     141
     142ifdef VBOX_WITH_QT4_SUN
     143#
     144# Install our Qt DLLs / Shared Objects / Frameworks.
     145#
     146## @todo move to the root Makefile.kmk, and remove qt4-bin from INSTALLS below.
     147 INSTALLS += qt4-bin
     148 qt4-bin_MODE = 644
     149 ifeq ($(KBUILD_TARGET),darwin)
     150  qt4-bin_INST = $(INST_VIRTUALBOX)Contents/Frameworks/
     151  qt4-bin_SOURCES = \
     152        $(VBOX_PATH_QT4)/Frameworks/QtCore.framework/Versions/4/QtCore=>QtCore.framework/Versions/4/QtCore \
     153        $(VBOX_PATH_QT4)/Frameworks/QtGui.framework/Versions/4/QtGui=>QtGui.framework/Versions/4/QtGui
     154 else ifeq ($(KBUILD_TARGET),win)
     155  qt4-bin_INST = $(INST_BIN)
     156  qt4-bin_SOURCES = \
     157        $(VBOX_PATH_QT4_LIB)/VBoxQtCore4.dll \
     158        $(VBOX_PATH_QT4_LIB)/VBoxQtGui4.dll
     159 else
     160  qt4-bin_INST = $(INST_BIN)
     161  qt4-bin_SOURCES = \
     162        $(VBOX_PATH_QT4_LIB)/libVBoxQtCore.so.4 \
     163        $(VBOX_PATH_QT4_LIB)/libVBoxQtGui.so.4
     164 endif
     165endif # VBOX_WITH_QT4_SUN
    140166
    141167
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