globals.mk 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. #
  2. # Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
  3. # All rights reserved.
  4. # This component and the accompanying materials are made available
  5. # under the terms of the License "Eclipse Public License v1.0"
  6. # which accompanies this distribution, and is available
  7. # at the URL "http://www.eclipse.org/legal/epl-v10.html".
  8. #
  9. # Initial Contributors:
  10. # Nokia Corporation - initial contribution.
  11. #
  12. # Contributors:
  13. #
  14. # Description:
  15. # global include file : this is included by all generated makefiles
  16. # 1) include all the common tools
  17. # 2) add global targets such as CLEAN and REALLYCLEAN
  18. # 3) specify the top level dependencies between targets
  19. # INPUTS : assumes OSTYPE and FLMHOME are set.
  20. #
  21. ifeq ($(SYMBIAN_FLM_GLOBALS_MK),)
  22. SYMBIAN_FLM_GLOBALS_MK:=1
  23. # get the common tools
  24. include $(FLMHOME)/flmtools.mk
  25. # initialise the list of created directories
  26. makepathLIST:=
  27. # set the variables TOOLPLATFORMDIR and DOTEXE
  28. ifeq ($(filter win,$(HOSTPLATFORM)),win)
  29. DOTEXE:=.exe
  30. TOOLPLATFORMDIR:=
  31. else
  32. DOTEXE:=
  33. # For the time being tools are all 32-bit
  34. TOOLPLATFORMDIR:=/$(HOSTPLATFORM32_DIR)
  35. endif
  36. # addglobal(GlobalTargetName)
  37. SYMBIAN_GLOBAL_TARGETS:=
  38. define sgt_addcmds
  39. .PHONY:: $1
  40. $(if $(filter win,$(HOSTPLATFORM)),,$(call lowercase,$1):: $1)
  41. SYMBIAN_GLOBAL_TARGETS:=$$(SYMBIAN_GLOBAL_TARGETS) $(1)
  42. endef
  43. define addglobal
  44. $(eval $(call sgt_addcmds,$(1)))
  45. endef
  46. ALLTARGET:=ALL
  47. .PHONY:: $(ALLTARGET)
  48. $(ALLTARGET):: BUILD
  49. # Global targets should generally be double colon rules because
  50. # they allow horizontal states to be placed into the build system.
  51. # e.g the "EXPORTED" state.
  52. $(call addglobal,BUILD)
  53. $(call addglobal,CLEAN)
  54. $(call addglobal,CLEANEXPORT)
  55. $(call addglobal,EXPORT)
  56. $(call addglobal,FINAL)
  57. $(call addglobal,FREEZE)
  58. $(call addglobal,LIBRARY)
  59. $(call addglobal,LISTING)
  60. $(call addglobal,MAKEFILE)
  61. $(call addglobal,PREPROCESS)
  62. $(call addglobal,REALLYCLEAN)
  63. $(call addglobal,BITMAP)
  64. $(call addglobal,RESOURCE)
  65. $(call addglobal,ROMFILE)
  66. $(call addglobal,TARGET)
  67. $(call addglobal,WHAT)
  68. $(call addglobal,WHATEXPORTS)
  69. $(call addglobal,WHATARMV5)
  70. $(call addglobal,WHATWINSCW)
  71. $(call addglobal,WHATTOOLS2)
  72. $(call addglobal,WHATTOOLS)
  73. $(call addglobal,WHATTEM)
  74. $(call addglobal,WHATRESOURCES)
  75. $(call addglobal,WHATBITMAP)
  76. $(call addglobal,WHATGNUEM)
  77. $(call addglobal,WHATSTRINGTABLE)
  78. # Ignore errors in some rules so as to "keep going"
  79. # so if one export fails then that won't stop unrelated
  80. # .cpp files from building. (.cpp files must all depend on EXPORT
  81. # so that parallel builds work)
  82. .IGNORE: EXPORT BITMAP RESOURCE LIBRARY
  83. # dependencies between top-level targets
  84. BUILD:: EXPORT MAKEFILE BITMAP RESOURCE LIBRARY TARGET FINAL
  85. MAKEFILE:: EXPORT
  86. BITMAP:: MAKEFILE
  87. RESOURCE:: BITMAP
  88. LIBRARY:: RESOURCE
  89. TARGET:: LIBRARY
  90. FINAL:: TARGET
  91. .PHONY:: EXPORT
  92. WHAT:: WHATEXPORTS WHATARMV5 WHATWINSCW WHATTOOLS2 WHATTEM WHATGNUEM WHATRESOURCES WHATBITMAP WHATSTRINGTABLE
  93. REALLYCLEAN:: CLEAN CLEANEXPORT
  94. # Create one of every double colon rule
  95. WHATBITMAP::
  96. WHATRESOURCES::
  97. WHATSTRINGTABLE::
  98. WHATTEM::
  99. WHATGNUEM::
  100. WHATTOOLS2::
  101. WHATWINSCW::
  102. WHATARMV5::
  103. WHATEXPORTS::
  104. LISTING::
  105. PREPROCESS::
  106. CLEAN::
  107. CLEANEXPORT::
  108. REALLYCLEAN::
  109. EXPORT::
  110. RESOURCE::
  111. BITMAP::
  112. # put known resource header to resource header dependencies here
  113. eikcdlg_DEPENDS:=eikcore.rsg eikcoctl.rsg
  114. eikmisc_DEPENDS:=eikcore.rsg
  115. eikfile_DEPENDS:=eikcoctl.rsg
  116. eikir_DEPENDS:=eikcoctl.rsg
  117. eikprint_DEPENDS:=eikcoctl.rsg
  118. # For users of SBSv2 who wish to add in their own global settings
  119. # without modifying this file:
  120. -include $(FLMHOME)/user/globals.mk
  121. endif