| 41 | | ## @todo |
| | 43 | |
| | 44 | # SDK Specific Properties |
| | 45 | ifndef PATH_SDK_QT4 |
| | 46 | PATH_SDK_QT4 := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*))) |
| | 47 | ifeq ($(PATH_SDK_QT4),) |
| | 48 | # If target == host, try look for Qt in the various platform specific places. |
| | 49 | ifeq ($(KBUILD_TARGET),$(KBUILD_HOST)) |
| | 50 | ifeq ($(KBUILD_TARGET),darwin) |
| | 51 | PATH_SDK_QT4 := $(patsubst %/Frameworks/QtCore.framework/Versions/4,%,$(firstword $(wildcard /Library/Frameworks/QtCore.framework/Versions/4))) |
| | 52 | else ifeq ($(KBUILD_TARGET),win) |
| | 53 | # No idea here yet... |
| | 54 | else |
| | 55 | # The Unices. Includes and esp. libs are tricky, so override the PATH_SDK_QT4_LIB* stuff if it doesn't work. |
| | 56 | PATH_SDK_QT4 := $(patsubst %/bin/qt3to4,%,$(firstword $(wildcard /usr/bin/qt3to4 /usr/local/bin/qt3to4 /usr/qt/4/bin/qt3to4))) |
| | 57 | ifneq ($(PATH_SDK_QT4),) |
| | 58 | ifeq ($(PATH_SDK_QT4_INC),) |
| | 59 | 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))) |
| | 60 | endif |
| | 61 | ifeq ($(PATH_SDK_QT4_LIB.x86),) |
| | 62 | PATH_SDK_QT4_LIB.x86 := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \ |
| | 63 | $(PATH_SDK_QT4)/lib32/libQtCore$(SUFF_DLL) \ |
| | 64 | $(PATH_SDK_QT4)/lib32/qt4/libQtCore$(SUFF_DLL) \ |
| | 65 | $(PATH_SDK_QT4)/lib/libQtCore$(SUFF_DLL) \ |
| | 66 | $(PATH_SDK_QT4)/lib/qt4/libQtCore$(SUFF_DLL) \ |
| | 67 | ))) |
| | 68 | endif |
| | 69 | ifeq ($(PATH_SDK_QT4_LIB.amd64),) |
| | 70 | PATH_SDK_QT4_LIB.amd64 := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \ |
| | 71 | $(PATH_SDK_QT4)/lib64/libQtCore$(SUFF_DLL) \ |
| | 72 | $(PATH_SDK_QT4)/lib64/qt4/libQtCore$(SUFF_DLL) \ |
| | 73 | $(PATH_SDK_QT4)/lib/amd64/libQtCore$(SUFF_DLL) \ |
| | 74 | $(PATH_SDK_QT4)/lib/libQtCore$(SUFF_DLL) \ |
| | 75 | $(PATH_SDK_QT4)/lib/qt4/libQtCore$(SUFF_DLL) \ |
| | 76 | ))) |
| | 77 | endif |
| | 78 | ifeq ($(PATH_SDK_QT4_LIB),) |
| | 79 | PATH_SDK_QT4_LIB := $(PATH_SDK_QT4_LIB.$(KBUILD_TARGET)) |
| | 80 | ifeq ($(PATH_SDK_QT4_LIB),) |
| | 81 | PATH_SDK_QT4_LIB := $(patsubst %/libQtCore$(SUFF_DLL),%,$(firstword $(wildcard \ |
| | 82 | $(PATH_SDK_QT4)/lib/libQtCore$(SUFF_DLL) \ |
| | 83 | $(PATH_SDK_QT4)/lib/qt4/libQtCore$(SUFF_DLL) \ |
| | 84 | ))) |
| | 85 | endif |
| | 86 | endif |
| | 87 | endif |
| | 88 | endif # Unices |
| | 89 | endif |
| | 90 | # Found it? |
| | 91 | ifeq ($(PATH_SDK_QT4),) |
| | 92 | $(warning kBuild: Couldn't find the Qt4 headers and libaries...) |
| | 93 | PATH_SDK_QT4 := $(PATH_DEVTOOLS_TRG)/qt/not-found |
| | 94 | endif |
| | 95 | endif |
| | 96 | else |
| | 97 | # Resolve any fancy stuff once and for all. |
| | 98 | PATH_SDK_QT4 := $(PATH_SDK_QT4) |
| | 99 | endif |
| | 100 | |
| | 101 | # Libraries can be in either Frameworks or lib depending on how you |
| | 102 | # build it on the mac. The .dmg installs into Frameworks but builds into lib. |
| | 103 | ifeq ($(KBUILD_TARGET),darwin) |
| | 104 | ifndef PATH_SDK_QT4_LIB |
| | 105 | ifneq ($(wildcard $(PATH_SDK_QT4)/Frameworks),) |
| | 106 | PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/Frameworks |
| | 107 | else |
| | 108 | PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/lib |
| | 109 | endif |
| | 110 | endif |
| | 111 | else |
| | 112 | PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/lib |
| | 113 | PATH_SDK_QT4_INC ?= $(PATH_SDK_QT4)/include |
| | 114 | endif |
| | 115 | |
| | 116 | # The bits that kBuild picks up. |
| | 117 | # (nothing here) |
| | 765 | # Deal with QT_MODULES and QT_PREFIX. |
| | 766 | local qt_modules := \ |
| | 767 | $($(target)_QT_MODULES.$(_bld_trg)) \ |
| | 768 | $($(target)_QT_MODULES.$(_bld_trg_arch)) \ |
| | 769 | $($(target)_QT_MODULES.$(_bld_trg).$(_bld_trg_arch)) \ |
| | 770 | $($(target)_QT_MODULES.$(_bld_trg_cpu)) \ |
| | 771 | $($(target)_QT_MODULES.$(_bld_type)) \ |
| | 772 | $($(target)_QT_MODULES) |
| | 773 | local qt_prefix := $(firstword \ |
| | 774 | $($(target)_QT_PREFIX.$(_bld_trg)) \ |
| | 775 | $($(target)_QT_PREFIX.$(_bld_trg_arch)) \ |
| | 776 | $($(target)_QT_PREFIX.$(_bld_trg).$(_bld_trg_arch)) \ |
| | 777 | $($(target)_QT_PREFIX.$(_bld_trg_cpu)) \ |
| | 778 | $($(target)_QT_PREFIX.$(_bld_type)) \ |
| | 779 | $($(target)_QT_PREFIX)) |
| | 780 | ifeq ($(bld_trg),darwin) |
| | 781 | $(eval $(target)_LDFLAGS += -F$(PATH_SDK_QT4_LIB) $(addprefix -framework Qt$(qt_prefix),$(qt_modules))) |
| | 782 | $(eval $(target)_INCS += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/$(qt_prefix)Qt$(module).framework/Versions/4/Headers)) |
| | 783 | else |
| | 784 | $(eval $(target)_LIBS += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/$(qt_prefix)Qt$(module)$(SUFF_DLL))) |
| | 785 | $(eval $(target)_INCS += $(addprefix $(PATH_SDK_QT_INC)/Qt,$(qt_modules))) |
| | 786 | endif |
| | 787 | $(eval $(target)_DEFS += $(foreach module,$(toupper $(qt_modules)), QT_$(module)_LIB)) |
| | 788 | |
| | 789 | |