|
1 # /**************************************************************************** |
|
2 # ** |
|
3 # ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 # ** Contact: |
|
5 # ** |
|
6 # ****************************************************************************/ |
|
7 |
|
8 # FLM to build Qt tools. |
|
9 |
|
10 QT_ROOT:=../../.. |
|
11 TARGETDIR:=$(EPOCROOT)/$(INSTALLPATH) |
|
12 SOURCEDIR:=$(EXTENSION_ROOT)/$(QT_ROOT)/bin |
|
13 TOOLSSRCDIR:=$(EXTENSION_ROOT)/$(QT_ROOT)/src/tools |
|
14 LANGUAGETOOLSDIR:=$(EXTENSION_ROOT)/$(QT_ROOT)/tools/linguist |
|
15 CONFIGURE_APP:=configure$(DOTEXE) |
|
16 |
|
17 $(call makepath,$(TARGETDIR)) |
|
18 |
|
19 ifeq ($(OSTYPE),unix) |
|
20 PLATFORM:=$(PLATFORM.LINUX) |
|
21 ifeq ($(XPLATFORM), symbian-sbsv2) |
|
22 CONFIGURE_APP:=configure_symbian |
|
23 endif |
|
24 else |
|
25 PLATFORM:=$(PLATFORM.WIN32) |
|
26 endif |
|
27 |
|
28 TARGET_TOOLS:=$(TARGETDIR)/qmake$(DOTEXE) $(TARGETDIR)/moc$(DOTEXE) $(TARGETDIR)/rcc$(DOTEXE) $(TARGETDIR)/uic$(DOTEXE) $(TARGETDIR)/lrelease$(DOTEXE) |
|
29 QT_TOOLS:= $(TOOLSSRCDIR)/uic $(TOOLSSRCDIR)/moc $(TOOLSSRCDIR)/rcc $(LANGUAGETOOLSDIR)/lrelease |
|
30 SOURCE_TOOLS:=$(SOURCEDIR)/qmake$(DOTEXE) $(SOURCEDIR)/moc$(DOTEXE) $(SOURCEDIR)/rcc$(DOTEXE) $(SOURCEDIR)/uic$(DOTEXE) $(SOURCEDIR)/lrelease$(DOTEXE) |
|
31 |
|
32 define QtConfiguration |
|
33 ifeq ($(OSTYPE),unix) |
|
34 $(TARGET_TOOLS): $(QT_TOOLS) |
|
35 else |
|
36 $(TARGET_TOOLS): $(SOURCEDIR)/qmake$(DOTEXE) |
|
37 endif |
|
38 $(call startrule,qtconf_deploy) \ |
|
39 $(GNUCP) $(SOURCEDIR)/$$(notdir $$@) $$@ \ |
|
40 $(call endrule,qtconf_deploy) |
|
41 |
|
42 ifeq ($(OSTYPE),unix) |
|
43 $(QT_TOOLS): $(TOOLSSRCDIR)/bootstrap |
|
44 $(call startrule,qtconf_tools_build) \ |
|
45 cd $$@; \ |
|
46 $(GNUMAKE38); \ |
|
47 cd .. \ |
|
48 $(call endrule,qtconf_tools_build) |
|
49 |
|
50 $(TOOLSSRCDIR)/bootstrap:$(SOURCEDIR)/qmake$(DOTEXE) |
|
51 $(call startrule,qtconf_bootstrap_build) \ |
|
52 cd $(TOOLSSRCDIR)/bootstrap; \ |
|
53 $(GNUMAKE38); \ |
|
54 cd .. \ |
|
55 $(call endrule,qtconf_bootstrap_build) |
|
56 endif |
|
57 |
|
58 |
|
59 $(SOURCEDIR)/qmake$(DOTEXE): $(EXTENSION_ROOT)/$(QT_ROOT)/$(CONFIGURE_APP) |
|
60 $(call startrule,qtconf) \ |
|
61 cd $(EXTENSION_ROOT)/$(QT_ROOT) && unset INCLUDE && unset LIB && $(EXTENSION_ROOT)/$(QT_ROOT)/$(CONFIGURE_APP) -platform $(PLATFORM) -xplatform $(XPLATFORM) $(OPTIONS) \ |
|
62 $(call endrule,qtconf) |
|
63 $(call startrule,syncqt) \ |
|
64 cd $(EXTENSION_ROOT)/$(QT_ROOT)/bin/ && \ |
|
65 perl syncqt -base-dir $(EXTENSION_ROOT)/$(QT_ROOT) -copy -oneway -outdir $(EPOCROOT)/epoc32/include/ -outsubdir mw |
|
66 $(call endrule,syncqt) |
|
67 $(call startrule,mkspecexport) \ |
|
68 $(GNUCP) -R $(EXTENSION_ROOT)/$(QT_ROOT)/mkspecs $(TARGETDIR) |
|
69 $(call endrule,mkspecexport) |
|
70 endef |
|
71 |
|
72 # Here a variable named "done_<sanitised $SISFILE>" gets created |
|
73 GUARD:=done_$(call sanitise,$(TARGETDIR)/qmake$(DOTEXE)) |
|
74 # If variable "done_..." not set, set it to 1, so that |
|
75 # UREL and UDEB do not execute makesis twice on the same target |
|
76 ifeq ($($(GUARD)),) |
|
77 $(GUARD):=1 |
|
78 ifeq ($(OSTYPE),unix) |
|
79 ALL:: $(QT_TOOLS) $(TARGET_TOOLS) |
|
80 else |
|
81 ALL:: $(TARGET_TOOLS) |
|
82 endif |
|
83 $(eval $(call QtConfiguration)) |
|
84 $(eval $(call whatmacro,$(TARGET_TOOLS))) |
|
85 ifeq ($(OSTYPE),unix) |
|
86 $(eval $(call GenerateStandardCleanTarget,$(QT_TOOLS) $(TARGET_TOOLS) $(SOURCE_TOOLS),$(TARGETDIR))) |
|
87 else |
|
88 $(eval $(call GenerateStandardCleanTarget,$(TARGET_TOOLS) $(SOURCE_TOOLS),$(TARGETDIR))) |
|
89 endif |
|
90 endif |