- Timestamp:
- Sep 8, 2008 12:05:35 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/units/qt4.kmk
r1761 r1767 51 51 52 52 # SDK Specific Properties 53 # PATH_SDK_QT4 - The general Qt4 root directory. 54 # PATH_SDK_QT4_INC - The include directory. 55 # PATH_SDK_QT4_LIB.amd64 - The lib directory for AMD64. 56 # PATH_SDK_QT4_LIB.x86 - The lib directory for X86. 57 # PATH_SDK_QT4_LIB - The lib directory for KBUILD_TARGET. 53 58 ifndef PATH_SDK_QT4 54 59 PATH_SDK_QT4 := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*))) … … 60 65 else ifeq ($(KBUILD_TARGET),win) 61 66 # No idea here yet... 67 else ifeq ($(KBUILD_TARGET),ose) 68 # No port... 62 69 else 63 70 # The Unices. Includes and esp. libs are tricky, so override the PATH_SDK_QT4_LIB* stuff if it doesn't work. 64 PATH_SDK_QT4 := $(patsubst %/bin/qt3to4,%,$(firstword $(wildcard /usr/bin/qt3to4 /usr/local/bin/qt3to4 /usr/qt/4/bin/qt3to4 /usr/share/qt4/bin/qt3to4))) 71 # Try find the general root of thing by looking for the qt3to4 program, if not found, then look for rcc. 72 PATH_SDK_QT4 := $(patsubst %/bin/qt3to4,%,$(firstword $(wildcard \ 73 /usr/bin/qt3to4 \ 74 /usr/local/bin/qt3to4 \ 75 /usr/qt/4/bin/qt3to4 \ 76 /usr/share/qt4/bin/qt3to4 \ 77 ))) 78 ifeq ($(PATH_SDK_QT4),) 79 PATH_SDK_QT4 := $(patsubst %/bin/qt3to4,%,$(firstword $(wildcard \ 80 /usr/bin/rcc \ 81 /usr/local/bin/rcc \ 82 /usr/qt/4/bin/rcc \ 83 /usr/share/qt4/bin/rcc \ 84 ))) 85 endif 65 86 ifneq ($(PATH_SDK_QT4),) 87 export PATH_SDK_QT4 88 89 # Locate the include files. 66 90 ifeq ($(PATH_SDK_QT4_INC),) 67 PATH_SDK_QT4_INC := $(patsubst %/QtCore/qglobal.h,%,$(firstword $(wildcard $(PATH_SDK_QT4)/include/QtCore/qglobal.h $(PATH_SDK_QT4)/include/qt4/QtCore/qglobal.h /usr/include/qt4/QtCore/qtglobal.h))) 91 PATH_SDK_QT4_INC := $(patsubst %/QtCore/qglobal.h,%,$(firstword $(wildcard \ 92 $(PATH_SDK_QT4)/include/QtCore/qglobal.h \ 93 $(PATH_SDK_QT4)/include/qt4/QtCore/qglobal.h \ 94 /usr/include/qt4/QtCore/qtglobal.h \ 95 /usr/local/include/qt4/QtCore/qtglobal.h \ 96 ))) 68 97 endif 98 99 # Now for the libraries (mostly for helping out finding the KBUILD_TARGET libs). 69 100 ifeq ($(PATH_SDK_QT4_LIB.x86),) 70 101 PATH_SDK_QT4_LIB.x86 := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \ … … 78 109 $(PATH_SDK_QT4)/lib/qt4/libQtCore$(SUFF_DLL) \ 79 110 ))) 111 ifneq ($(PATH_SDK_QT4_LIB.x86),) 112 export PATH_SDK_QT4_LIB.x86 113 endif 80 114 endif 81 115 ifeq ($(PATH_SDK_QT4_LIB.amd64),) … … 93 127 $(PATH_SDK_QT4)/lib/qt4/libQtCore$(SUFF_DLL) \ 94 128 ))) 129 ifneq ($(PATH_SDK_QT4_LIB.amd64),) 130 export PATH_SDK_QT4_LIB.amd64 131 endif 95 132 endif 133 134 # And finally, the library path for KBUILD_TARGET. 96 135 ifeq ($(PATH_SDK_QT4_LIB),) 97 136 PATH_SDK_QT4_LIB := $(PATH_SDK_QT4_LIB.$(KBUILD_TARGET)) 98 137 ifeq ($(PATH_SDK_QT4_LIB),) 99 138 PATH_SDK_QT4_LIB := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \ 100 $(PATH_SDK_QT4)/lib/libQtCore$(SUFF_DLL) \ 101 $(PATH_SDK_QT4)/lib/qt4/libQtCore$(SUFF_DLL) \ 102 /usr/lib/libQtCore$(SUFF_DLL) \ 103 /usr/lib/qt4/libQtCore$(SUFF_DLL) \ 104 /usr/local/lib/libQtCore$(SUFF_DLL) \ 105 /usr/local/lib/qt4/libQtCore$(SUFF_DLL) \ 106 ))) 139 $(PATH_SDK_QT4)/lib/libQtCore$(SUFF_DLL) \ 140 $(PATH_SDK_QT4)/lib/qt4/libQtCore$(SUFF_DLL) \ 141 /usr/lib/libQtCore$(SUFF_DLL) \ 142 /usr/lib/qt4/libQtCore$(SUFF_DLL) \ 143 /usr/local/lib/libQtCore$(SUFF_DLL) \ 144 /usr/local/lib/qt4/libQtCore$(SUFF_DLL) \ 145 ))) 146 endif 147 ifneq ($(PATH_SDK_QT4_LIB),) 148 export PATH_SDK_QT4_LIB 107 149 endif 108 150 endif 151 109 152 endif 110 153 endif # Unices … … 149 192 150 193 # Tool Specific Properties 151 ifndef PATH_TOOL_QT4 152 PATH_TOOL_QT4 := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS_BLD)/qt/v4*))) 153 ifeq ($(PATH_TOOL_QT4),) 154 PATH_TOOL_QT4 := $(patsubst %/bin/qt3to4,%,$(firstword $(wildcard /usr/lib/qt4/bin/qt3to4 /usr/qt/4/bin/qt3to4 /usr/share/qt4/bin/qt3to4 /usr/local/bin/qt3to4 /usr/bin/qt3to4))) 194 # PATH_TOOL_QT4 - Obsolete. 195 # PATH_TOOL_QT4_BIN - The 196 # TOOL_QT4_BIN_SUFF - 197 if !defined(PATH_TOOL_QT4_BIN) && defined(PATH_TOOL_QT4) 198 PATH_TOOL_QT4_BIN := $(PATH_TOOL_QT4)/bin 199 endif 200 ifndef PATH_TOOL_QT4_BIN 201 PATH_TOOL_QT4_BIN := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS_BLD)/qt/v4*/bin))) 202 ifeq ($(PATH_TOOL_QT4_BIN),) 203 ifdef TOOL_QT4_BIN_SUFF 204 TOOL_QT4_BIN_SUFF := $(TOOL_QT4_BIN_SUFF) 205 endif 206 # Try looking for qt3to4 first, then try moc-qt4/moc. 207 PATH_TOOL_QT4_BIN := $(patsubst %/qt3to4,%,$(firstword $(wildcard \ 208 /usr/lib/qt4/bin/qt3to4 \ 209 /usr/qt/4/bin/qt3to4 \ 210 /usr/share/qt4/bin/qt3to4 \ 211 /usr/local/bin/qt3to4 \ 212 /usr/bin/qt3to4\ 213 ))) 214 ifeq ($(PATH_TOOL_QT4_BIN),) 215 ifeq ($(TOOL_QT4_BIN_SUFF),) 216 PATH_TOOL_QT4_BIN := $(patsubst %/moc-qt4,%,$(firstword $(wildcard \ 217 /usr/lib/qt4/bin/moc-qt4 \ 218 /usr/qt/4/bin/moc-qt4 \ 219 /usr/share/qt4/bin/moc-qt4 \ 220 /usr/local/bin/moc-qt4 \ 221 /usr/bin/moc-qt4 \ 222 ))) 223 endif 224 ifneq ($(PATH_TOOL_QT4_BIN),) 225 export TOOL_QT4_BIN_SUFF := -qt4 226 else 227 PATH_TOOL_QT4_BIN := $(patsubst %/moc$(TOOL_QT4_BIN_SUFF),%,$(firstword $(wildcard \ 228 /usr/lib/qt4/bin/moc$(TOOL_QT4_BIN_SUFF) \ 229 /usr/qt/4/bin/moc$(TOOL_QT4_BIN_SUFF) \ 230 /usr/share/qt4/bin/moc$(TOOL_QT4_BIN_SUFF) \ 231 /usr/local/bin/moc$(TOOL_QT4_BIN_SUFF) \ 232 /usr/bin/moc$(TOOL_QT4_BIN_SUFF) \ 233 ))) 234 endif 235 endif 155 236 endif 156 237 # If not found, we'll enter the 'pathless' mode. 157 238 else 158 239 # Resolve any fancy stuff once and for all. 159 PATH_TOOL_QT4 := $(PATH_TOOL_QT4)240 PATH_TOOL_QT4_BIN := $(PATH_TOOL_QT4_BIN) 160 241 endif 161 242 ifneq ($(PATH_TOOL_QT4),) 162 PATH_TOOL_QT4_BIN ?= $(PATH_TOOL_QT4)/bin 163 TOOL_QT4_MOC ?= $(PATH_TOOL_QT4_BIN)/moc$(HOST_SUFF_EXE) 164 TOOL_QT4_UIC ?= $(PATH_TOOL_QT4_BIN)/uic$(HOST_SUFF_EXE) 165 TOOL_QT4_RCC ?= $(PATH_TOOL_QT4_BIN)/rcc$(HOST_SUFF_EXE) 166 TOOL_QT4_LRC ?= $(PATH_TOOL_QT4_BIN)/lrelease$(HOST_SUFF_EXE) 167 TOOL_QT4_LUPDATE ?= $(PATH_TOOL_QT4_BIN)/lupdate$(HOST_SUFF_EXE) 243 TOOL_QT4_MOC ?= $(PATH_TOOL_QT4_BIN)/moc$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE) 244 TOOL_QT4_UIC ?= $(PATH_TOOL_QT4_BIN)/uic$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE) 245 TOOL_QT4_RCC ?= $(PATH_TOOL_QT4_BIN)/rcc$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE) 246 TOOL_QT4_LRC ?= $(PATH_TOOL_QT4_BIN)/lrelease$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE) 247 TOOL_QT4_LUPDATE ?= $(PATH_TOOL_QT4_BIN)/lupdate$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE) 168 248 else 169 249 # Pathless, relies on the environment. 170 TOOL_QT4_MOC ?= moc$( HOST_SUFF_EXE)171 TOOL_QT4_UIC ?= uic$( HOST_SUFF_EXE)172 TOOL_QT4_RCC ?= rcc$( HOST_SUFF_EXE)173 TOOL_QT4_LRC ?= lrelease$( HOST_SUFF_EXE)174 TOOL_QT4_LUPDATE ?= lupdate$( HOST_SUFF_EXE)250 TOOL_QT4_MOC ?= moc$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE) 251 TOOL_QT4_UIC ?= uic$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE) 252 TOOL_QT4_RCC ?= rcc$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE) 253 TOOL_QT4_LRC ?= lrelease$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE) 254 TOOL_QT4_LUPDATE ?= lupdate$(TOOL_QT4_BIN_SUFF)$(HOST_SUFF_EXE) 175 255 endif 176 256 … … 906 986 endef # def_unit_qt4_target_pre 907 987 988 989 # 990 # Rule for debugging. 991 # 992 unit-qt4-show-vars: 993 @$(ECHO) 'The Qt4 SDK variables:' 994 @$(ECHO) ' PATH_SDK_QT4 = "$(PATH_SDK_QT4)"' 995 @$(ECHO) ' PATH_SDK_QT4_INC = "$(PATH_SDK_QT4_INC)"' 996 @$(ECHO) ' PATH_SDK_QT4_LIB = "$(PATH_SDK_QT4_LIB)"' 997 @$(ECHO) ' PATH_SDK_QT4_LIB.amd64 = "$(PATH_SDK_QT4_LIB.amd64)"' 998 @$(ECHO) ' PATH_SDK_QT4_LIB.x86 = "$(PATH_SDK_QT4_LIB.x86)"' 999 @$(ECHO) 'The Qt4 TOOL variables:' 1000 @$(ECHO) ' PATH_TOOL_QT4_BIN = "$(PATH_TOOL_QT4_BIN)"' 1001 @$(ECHO) ' TOOL_QT4_BIN_SUFF = "$(TOOL_QT4_BIN_SUFF)"' 1002 @$(ECHO) ' TOOL_QT4_MOC = "$(TOOL_QT4_MOC)"' 1003 @$(ECHO) ' TOOL_QT4_UIC = "$(TOOL_QT4_UIC)"' 1004 @$(ECHO) ' TOOL_QT4_RCC = "$(TOOL_QT4_RCC)"' 1005 @$(ECHO) ' TOOL_QT4_LRC = "$(TOOL_QT4_LRC)"' 1006 @$(ECHO) ' TOOL_QT4_LUPDATE = "$(TOOL_QT4_LUPDATE)"' 1007
Note:
See TracChangeset
for help on using the changeset viewer.