Changeset 12172 in vbox
- Timestamp:
- Sep 6, 2008 4:23:45 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk
r12171 r12172 41 41 # Disable the debugger for now, this is another story. 42 42 VBOX_WITH_DEBUGGER_GUI := 43 44 # Guess VBOX_WITH_QT4_SUN45 ifndef VBOX_WITH_QT4_SUN46 ifndef VBOX_OSE47 if1of ($(KBUILD_TARGET), darwin solaris win)48 VBOX_WITH_QT4_SUN := 149 endif50 endif51 endif52 53 #54 # Handmade configuration of qt4 - very annoying, this needs to55 # be cleaned up properly later some time (not important now).56 #57 ifeq ($(VBOX_PATH_QT4),)58 ifeq ($(KBUILD_TARGET),darwin)59 VBOX_PATH_QT4 := $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))60 ifeq ($(VBOX_PATH_QT4),)61 ifneq ($(wildcard /Library/Frameworks/QtCore.framework),)62 # Using the global installation (for OSE).63 VBOX_PATH_QT4 ?= /usr64 VBOX_PATH_QT4_FRAMEWORKS ?= /Library/Frameworks65 endif66 endif67 else if1of ($(KBUILD_TARGET),win)68 VBOX_PATH_QT4 ?= $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))69 else if1of ($(KBUILD_TARGET),solaris)70 VBOX_PATH_QT4 ?= $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))71 ifneq ($(VBOX_PATH_QT4),)72 VBOX_WITH_QT4_SUN = 173 endif74 endif75 endif76 ifeq ($(VBOX_PATH_QT4),)77 if1of ($(USERNAME), bird)78 # gentoo (64-bit)79 VBOX_PATH_QT4 ?= /usr80 VBOX_PATH_QT4_LIB ?= /usr/lib/qt481 endif82 endif83 VBOX_PATH_QT4 ?= /usr84 VBOX_PATH_QT4_LIB ?= $(VBOX_PATH_QT4)/lib85 86 # Hack LD_LIBRARY_PATH for stuff in tools.87 ifdef VBOX_WITH_QT4_SUN88 if1of ($(KBUILD_TARGET), linux)89 export LD_LIBRARY_PATH := $(VBOX_PATH_QT4_LIB):$(LD_LIBRARY_PATH)90 endif91 endif92 93 94 ifdef VBOX_WITH_QT4_SUN95 #96 # Install our Qt DLLs / Shared Objects / Frameworks.97 #98 ## @todo move to the root Makefile.kmk, and remove qt4-bin from INSTALLS below.99 INSTALLS += qt4-bin100 qt4-bin_MODE = 644101 ifeq ($(KBUILD_TARGET),darwin)102 qt4-bin_INST = $(INST_VIRTUALBOX)Contents/Frameworks/103 qt4-bin_SOURCES = \104 $(VBOX_PATH_QT4)/Frameworks/QtCore.framework/Versions/4/QtCore=>QtCore.framework/Versions/4/QtCore \105 $(VBOX_PATH_QT4)/Frameworks/QtGui.framework/Versions/4/QtGui=>QtGui.framework/Versions/4/QtGui106 else ifeq ($(KBUILD_TARGET),win)107 qt4-bin_INST = $(INST_BIN)108 qt4-bin_SOURCES = \109 $(VBOX_PATH_QT4_LIB)/VBoxQtCore4.dll \110 $(VBOX_PATH_QT4_LIB)/VBoxQtGui4.dll111 else112 qt4-bin_INST = $(INST_BIN)113 qt4-bin_SOURCES = \114 $(VBOX_PATH_QT4_LIB)/libVBoxQtCore.so.4 \115 $(VBOX_PATH_QT4_LIB)/libVBoxQtGui.so.4116 endif117 endif # VBOX_WITH_QT4_SUN118 119 120 # Template copy from the qt3 stuff. Appended a "4" on the121 # relevant places.122 123 #124 # Template for building Qt GUI executables.125 #126 127 TEMPLATE_VBOXQT4GUIEXE = VBox Qt4 GUI Executable128 USES += qt4129 TEMPLATE_VBOXQT4GUIEXE_USES = qt4130 TEMPLATE_VBOXQT4GUIEXE_QTTOOL = QT4131 TEMPLATE_VBOXQT4GUIEXE_MOCTOOL = QT4132 TEMPLATE_VBOXQT4GUIEXE_UICTOOL = QT4133 TEMPLATE_VBOXQT4GUIEXE_RCCTOOL = QT4134 TEMPLATE_VBOXQT4GUIEXE_LRCTOOL = QT4135 TEMPLATE_VBOXQT4GUIEXE_SDKS = QT4136 ifdef VBOX_WITH_QT4_SUN137 ifneq ($(KBUILD_TARGET),darwin) ## @todo The next darwin build should also make use the prefix just to make things more uniform.138 TEMPLATE_VBOXQT4GUIEXE_QT_PREFIX = VBox139 endif140 endif141 TEMPLATE_VBOXQT4GUIEXE_DEFS = IN_RING3 QT_NO_DEBUG QT_THREAD_SUPPORT QT_SHARED HAVE_CONFIG_H $(ARCH_BITS_DEFS)142 143 ifeq ($(KBUILD_TARGET),win)144 TEMPLATE_VBOXQT4GUIEXE_TOOL = $(VBOX_VCC_TOOL)145 TEMPLATE_VBOXQT4GUIEXE_DEFS += \146 _WIN32_WINNT=0x0500 UNICODE _UNICODE \147 QT_DLL _CRT_SECURE_NO_DEPRECATE \148 $(QMAKE_PRL_DEFINES)149 ## @todo VCC70 flags?150 ifdef VBOX_USE_VCC80151 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \152 -nologo -Zm200 -W3 -MD -Zi -EHsc -Zc:wchar_t-153 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.debug = -RTCsu154 else155 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \156 -nologo -Zm200 -W3 -MD -Zi -GX157 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.debug = -GZ158 endif159 TEMPLATE_VBOXQT4GUIEXE_INCS += \160 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC)161 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS = \162 /NOD /NOLOGO /INCREMENTAL:NO /MAPINFO:EXPORTS /DEBUG \163 /DELAYLOAD:oleaut32.dll164 TEMPLATE_VBOXQT4GUIEXE_SDKS += WINPSDK165 TEMPLATE_VBOXQT4GUIEXE_LIBS = \166 $(VBOX_LIBS_QT4) \167 $(LIB_RUNTIME) \168 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcprt.lib \169 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcrt.lib \170 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/oldnames.lib \171 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib \172 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls.lib173 TEMPLATE_VBOXQT4GUIEXE_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS)174 175 else # the gcc guys:176 TEMPLATE_VBOXQT4GUIEXE_TOOL = $(VBOX_GCC_TOOL)177 TEMPLATE_VBOXQT4GUIEXE_DEFS.linux = _REENTRANT178 179 TEMPLATE_VBOXQT4GUIEXE_DEFS.solaris = _REENTRANT180 181 TEMPLATE_VBOXQT4GUIEXE_INCS += \182 $(LIB_SDL_INC)183 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \184 -g -pipe -Wall -W -frtti -fno-exceptions -Wno-non-virtual-dtor \185 -Wno-long-long -fshort-wchar -fno-strict-aliasing \186 $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden)187 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.x86 = -m32188 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.amd64 = -m64189 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.linux = -pthread190 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.x86 = -m32191 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.amd64 = -m64192 TEMPLATE_VBOXQT4GUIEXE_LIBS = \193 $(VBOX_LIBS_QT4) \194 $(LIB_SDL) \195 $(LIB_RUNTIME) \196 $(LIB_REM) \197 $(LIB_VMM)198 199 ifeq ($(KBUILD_TARGET),linux)200 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += $(VBOX_LD_as_needed)201 TEMPLATE_VBOXQT4GUIEXE_LIBS += \202 $(VBOX_XCURSOR_LIBS) \203 Xext204 TEMPLATE_VBOXQT4GUIEXE_LIBPATH += \205 $(VBOX_LIBPATH_X11)206 else ifeq ($(KBUILD_TARGET),darwin)207 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.darwin += -bind_at_load208 TEMPLATE_VBOXQT4GUIEXE_LIBS +=209 TEMPLATE_VBOXQT4GUIEXE_LIBPATH +=210 else211 TEMPLATE_VBOXQT4GUIEXE_INCS += \212 $(VBOX_XCURSOR_INCS)213 TEMPLATE_VBOXQT4GUIEXE_LIBS += \214 $(VBOX_XCURSOR_LIBS) \215 Xext \216 X11 \217 m \218 $(LIB_PTHREAD)219 TEMPLATE_VBOXQT4GUIEXE_LIBPATH += \220 $(VBOX_LIBPATH_X11)221 ifeq ($(KBUILD_TARGET),freebsd)222 TEMPLATE_VBOXQT4GUIEXE_INCS += \223 /usr/include \224 /usr/X11R6/include \225 /usr/local/include226 endif227 ifeq ($(KBUILD_TARGET),solaris)228 TEMPLATE_VBOXQT4GUIEXE_LIBS += \229 rt socket nsl230 endif231 endif232 # Assume the Qt shared objects are in the same directory as the executable, on Solaris too.233 ifdef VBOX_WITH_RUNPATH234 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)'235 else ifdef VBOX_WITH_ORIGIN236 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)'237 endif238 239 endif240 241 # Add COM/XPCOM stuff242 TEMPLATE_VBOXQT4GUIEXE_LIBS += \243 $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB)244 ifdef VBOX_WITH_XPCOM245 ## @todo may be worth creating the VBOX_XPCOM SDK def, or just a SDK_VBOXXPCOM.246 TEMPLATE_VBOXQT4GUIEXE_DEFS += VBOX_WITH_XPCOM247 ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP248 TEMPLATE_VBOXQT4GUIEXE_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP249 endif250 TEMPLATE_VBOXQT4GUIEXE_INCS += \251 $(VBOX_XPCOM_INCS)252 TEMPLATE_VBOXQT4GUIEXE_LIBS += \253 $(LIB_XPCOM)254 else # COM255 TEMPLATE_VBOXQT4GUIEXE_INCS += \256 $(VBOX_PATH_SDK)/bindings/mscom/include257 endif # COM258 259 #260 # Template for building Qt GUI components.261 #262 TEMPLATE_VBOXQT4GUI = VBox Qt GUI Components263 TEMPLATE_VBOXQT4GUI_EXTENDS = VBOXQT4GUIEXE264 TEMPLATE_VBOXQT4GUI_LIBS = $(filter-out $(QTMAIN),$(TEMPLATE_VBOXQT4GUIEXE_LIBS))265 ifeq ($(KBUILD_TARGET),darwin)266 TEMPLATE_VBOXQT4GUI_LDFLAGS.darwin += $(filter-out -bind_at_load,$(TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.darwin)) \267 -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)268 endif269 ifeq ($(filter-out solaris.x86 %.amd64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),)270 ifneq ($(KBUILD_TARGET),win)271 TEMPLATE_VBOXQT4GUI_DEFS = PIC $(TEMPLATE_VBOXQT4GUIEXE_DEFS)272 TEMPLATE_VBOXQT4GUI_CFLAGS = -fPIC $(TEMPLATE_VBOXQT4GUIEXE_CFLAGS)273 TEMPLATE_VBOXQT4GUI_CXXFLAGS = -fPIC $(TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS)274 TEMPLATE_VBOXQT4GUI_LDFLAGS = -fPIC $(TEMPLATE_VBOXQT4GUIEXE_LDFLAGS)275 endif276 endif277 278 43 279 44 #
Note:
See TracChangeset
for help on using the changeset viewer.