summaryrefslogtreecommitdiffstats
path: root/config.profiles/symbian/qtconfig.flm
blob: 56c3d6bc72249e9a7e9f3ea201a96f950f985076 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# /****************************************************************************
# **
# ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
# ** Contact:
# **
# ****************************************************************************/

# FLM to build Qt tools.

QT_ROOT:= ../..
TARGETDIR:=$(EPOCROOT)/$(INSTALLPATH)
MKSPECDIR:=$(EPOCROOT)/$(INSTALLPATH)/qt
SOURCEDIR:=$(EXTENSION_ROOT)/$(QT_ROOT)/bin
TOOLSSRCDIR:=$(EXTENSION_ROOT)/$(QT_ROOT)/src/tools
LANGUAGETOOLDIR:=$(EXTENSION_ROOT)/$(QT_ROOT)/tools/linguist
CONFIGURE_APP:=configure$(DOTEXE)

$(call makepath,$(TARGETDIR))

ifneq ($(filter linux,$(HOSTPLATFORM)),)
PLATFORM:=$(PLATFORM.LINUX)
else
PLATFORM:=$(PLATFORM.WIN32)
endif

TARGET_TOOLS:=$(TARGETDIR)/qmake$(DOTEXE) $(TARGETDIR)/moc$(DOTEXE) $(TARGETDIR)/rcc$(DOTEXE) $(TARGETDIR)/uic$(DOTEXE) $(TARGETDIR)/lrelease$(DOTEXE)
QT_TOOLS:= $(TOOLSSRCDIR)/uic $(TOOLSSRCDIR)/moc $(TOOLSSRCDIR)/rcc $(LANGUAGETOOLDIR)/lrelease
SOURCE_TOOLS:=$(SOURCEDIR)/qmake$(DOTEXE) $(SOURCEDIR)/moc$(DOTEXE) $(SOURCEDIR)/rcc$(DOTEXE) $(SOURCEDIR)/uic$(DOTEXE) $(SOURCEDIR)/lrelease$(DOTEXE)

define QtConfiguration
ifneq ($(filter linux,$(HOSTPLATFORM)),)
$(TARGET_TOOLS): $(QT_TOOLS)
else
$(TARGET_TOOLS): $(SOURCEDIR)/qmake$(DOTEXE)
endif
	$(call startrule,qtconf_deploy) \
	$(GNUCP) $(SOURCEDIR)/$$(notdir $$@) $$@ \
	$(call endrule,qtconf_deploy)

ifneq ($(filter linux,$(HOSTPLATFORM)),)
$(QT_TOOLS): $(TOOLSSRCDIR)/bootstrap
	$(call startrule,qtconf_tools_build) \
	cd $$@; \
	$(GNUMAKE38); \
	cd .. \
	$(call endrule,qtconf_tools_build)

$(TOOLSSRCDIR)/bootstrap:$(SOURCEDIR)/qmake$(DOTEXE)
	$(call startrule,qtconf_bootstrap_build) \
	cd $(TOOLSSRCDIR)/bootstrap; \
	$(GNUMAKE38); \
	cd .. \
	$(call endrule,qtconf_bootstrap_build)
endif


$(SOURCEDIR)/qmake$(DOTEXE): $(EXTENSION_ROOT)/$(QT_ROOT)/$(CONFIGURE_APP)
	$(call startrule,qtconf) \
	cd $(EXTENSION_ROOT)/$(QT_ROOT) && unset INCLUDE && unset LIB && $(EXTENSION_ROOT)/$(QT_ROOT)/$(CONFIGURE_APP) -platform $(PLATFORM) -xplatform $(XPLATFORM) $(OPTIONS) \
	$(call endrule,qtconf)
	$(call startrule,headerexport) \
	cd $(EXTENSION_ROOT)/$(QT_ROOT)/config.profiles/symbian && \
	perl headerexport -base-dir $(EXTENSION_ROOT)/$(QT_ROOT) -outdir $(EPOCROOT)/epoc32/include/
	$(call endrule,headerexport)
	$(call startrule,mkspecexport) \
	$(GNUCP) -R $(EXTENSION_ROOT)/$(QT_ROOT)/mkspecs $(MKSPECDIR)
	$(call endrule,mkspecexport)

WHAT::
	$(call startrawoutput) \
	echo "$(call whatLogOpen)"; \
	perl headerexport -base-dir $(EXTENSION_ROOT)/$(QT_ROOT) -outdir $(EPOCROOT)/epoc32/include/ -what | \
		(read -r LINE; \
		while [ $$$$? -eq 0 ]; do \
			echo "$(call whatLogItem,,$$$$LINE)"; \
			read -r LINE; \
		done; \
		); \
	echo "$(call whatLogClose)" \
	$(call endrawoutput)
endef

# Here a variable named "done_<sanitised $SISFILE>" gets created
GUARD:=done_$(call sanitise,$(TARGETDIR)/qmake$(DOTEXE))
# If variable "done_..." not set, set it to 1, so that
# UREL and UDEB do not execute makesis twice on the same target
ifeq ($($(GUARD)),)
$(GUARD):=1
ifneq ($(filter linux,$(HOSTPLATFORM)),)
EXPORT:: $(QT_TOOLS) $(TARGET_TOOLS)
else
EXPORT:: $(TARGET_TOOLS)
endif
$(eval $(call QtConfiguration))
$(eval $(call whatmacro,$(TARGET_TOOLS)))
ifeq ($(OSTYPE),unix)
$(eval $(call GenerateStandardCleanTarget,$(QT_TOOLS) $(TARGET_TOOLS) $(SOURCE_TOOLS),$(TARGETDIR)))
else
$(eval $(call GenerateStandardCleanTarget,$(TARGET_TOOLS) $(SOURCE_TOOLS),$(TARGETDIR)))
endif
endif