qt4: heavily cleanup Makefile and add a generic way for configuring projects using...
[openwrt/svn-archive/archive.git] / Xorg / lib / qt4 / files / qmake.mk
1 #
2 # Copyright (C) 2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 QMAKE_SPECFILE:=$(STAGING_DIR)/usr/share/mkspecs/qws/linux-openwrt-g++
9
10 TARGET_INCDIRS+=$(STAGING_DIR)/include $(STAGING_DIR)/usr/include $(TOOLCHAIN_DIR)/include $(TOOLCHAIN_DIR)/usr/include
11 TARGET_LIBDIRS+=$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib $(TOOLCHAIN_DIR)/lib $(TOOLCHAIN_DIR)/usr/lib
12
13 define Build/Configure/Qmake
14 TARGET_CC="$(TARGET_CROSS)gcc" \
15 TARGET_CXX="$(TARGET_CROSS)g++" \
16 TARGET_AR="$(TARGET_CROSS)ar cqs" \
17 TARGET_OBJCOPY="$(TARGET_CROSS)objcopy" \
18 TARGET_RANLIB="$(TARGET_CROSS)ranlib" \
19 TARGET_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
20 TARGET_CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
21 TARGET_LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
22 TARGET_INCDIRS="$(TARGET_INCDIRS)" \
23 TARGET_LIBDIRS="$(TARGET_LIBDIRS)" \
24 STAGING_DIR_HOST="$(STAGING_DIR)/../host" \
25 qmake \
26 -spec $(QMAKE_SPECFILE) \
27 -o $(PKG_BUILD_DIR)/Makefile \
28 $(PKG_BUILD_DIR)/$(1).pro
29 endef