config.mk 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. #
  2. # This Source Code Form is subject to the terms of the Mozilla Public
  3. # License, v. 2.0. If a copy of the MPL was not distributed with this
  4. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  5. # Configuration information for building in the "Core Components" source module
  6. #######################################################################
  7. # [1.0] Master "Core Components" source and release <architecture> #
  8. # tags #
  9. #######################################################################
  10. ifndef MK_ARCH
  11. include $(CORE_DEPTH)/coreconf/arch.mk
  12. endif
  13. #######################################################################
  14. # [2.0] Master "Core Components" default command macros #
  15. # (NOTE: may be overridden in $(OS_TARGET)$(OS_RELEASE).mk) #
  16. #######################################################################
  17. ifndef MK_COMMAND
  18. include $(CORE_DEPTH)/coreconf/command.mk
  19. endif
  20. #######################################################################
  21. # [3.0] Master "Core Components" <architecture>-specific macros #
  22. # (dependent upon <architecture> tags) #
  23. # #
  24. # We are moving towards just having a $(OS_TARGET).mk file #
  25. # as opposed to multiple $(OS_TARGET)$(OS_RELEASE).mk files, #
  26. # one for each OS release. #
  27. #######################################################################
  28. TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD \
  29. AIX RISCOS WINNT WIN95 Linux Android
  30. ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET)))
  31. include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk
  32. else
  33. ifeq ($(OS_TARGET),SunOS)
  34. include $(CORE_DEPTH)/coreconf/SunOS5.mk
  35. else
  36. include $(CORE_DEPTH)/coreconf/$(OS_TARGET)$(OS_RELEASE).mk
  37. endif
  38. endif
  39. #######################################################################
  40. # [4.0] Master "Core Components" source and release <platform> tags #
  41. # (dependent upon <architecture> tags) #
  42. #######################################################################
  43. PLATFORM = $(OBJDIR_NAME)
  44. #######################################################################
  45. # [5.0] Master "Core Components" release <tree> tags #
  46. # (dependent upon <architecture> tags) #
  47. #######################################################################
  48. ifndef MK_TREE
  49. include $(CORE_DEPTH)/coreconf/tree.mk
  50. endif
  51. #######################################################################
  52. # [6.0] Master "Core Components" source and release <component> tags #
  53. # NOTE: A component is also called a module or a subsystem. #
  54. # (dependent upon $(MODULE) being defined on the #
  55. # command line, as an environment variable, or in individual #
  56. # makefiles, or more appropriately, manifest.mn) #
  57. #######################################################################
  58. ifndef MK_MODULE
  59. include $(CORE_DEPTH)/coreconf/module.mk
  60. endif
  61. #######################################################################
  62. # [7.0] Master "Core Components" release <version> tags #
  63. # (dependent upon $(MODULE) being defined on the #
  64. # command line, as an environment variable, or in individual #
  65. # makefiles, or more appropriately, manifest.mn) #
  66. #######################################################################
  67. ifndef MK_VERSION
  68. include $(CORE_DEPTH)/coreconf/version.mk
  69. endif
  70. #######################################################################
  71. # [8.0] Master "Core Components" macros to figure out #
  72. # binary code location #
  73. # (dependent upon <platform> tags) #
  74. #######################################################################
  75. ifndef MK_LOCATION
  76. include $(CORE_DEPTH)/coreconf/location.mk
  77. endif
  78. #######################################################################
  79. # [9.0] Master "Core Components" <component>-specific source path #
  80. # (dependent upon <user_source_tree>, <source_component>, #
  81. # <version>, and <platform> tags) #
  82. #######################################################################
  83. ifndef MK_SOURCE
  84. include $(CORE_DEPTH)/coreconf/source.mk
  85. endif
  86. #######################################################################
  87. # [10.0] Master "Core Components" include switch for support header #
  88. # files #
  89. # (dependent upon <tree>, <component>, <version>, #
  90. # and <platform> tags) #
  91. #######################################################################
  92. ifndef MK_HEADERS
  93. include $(CORE_DEPTH)/coreconf/headers.mk
  94. endif
  95. #######################################################################
  96. # [11.0] Master "Core Components" for computing program prefixes #
  97. #######################################################################
  98. ifndef MK_PREFIX
  99. include $(CORE_DEPTH)/coreconf/prefix.mk
  100. endif
  101. #######################################################################
  102. # [12.0] Master "Core Components" for computing program suffixes #
  103. # (dependent upon <architecture> tags) #
  104. #######################################################################
  105. ifndef MK_SUFFIX
  106. include $(CORE_DEPTH)/coreconf/suffix.mk
  107. endif
  108. #######################################################################
  109. # [13.0] Master "Core Components" for defining JDK #
  110. # (dependent upon <architecture>, <source>, and <suffix> tags)#
  111. #######################################################################
  112. ifdef NS_USE_JDK
  113. include $(CORE_DEPTH)/coreconf/jdk.mk
  114. endif
  115. #######################################################################
  116. # [14.0] Master "Core Components" rule set #
  117. #######################################################################
  118. ifndef MK_RULESET
  119. include $(CORE_DEPTH)/coreconf/ruleset.mk
  120. endif
  121. #######################################################################
  122. # Master "Core Components" macros for Hardware features #
  123. #######################################################################
  124. # NSS Build system does not properly support MozillaBuild 2 MSYS1
  125. # So we simply aren't going to enable AVX2 at all
  126. # Plus there seems to be an issue with it anyway for other reasons
  127. NSS_DISABLE_AVX2 = 1
  128. export NSS_DISABLE_AVX2
  129. #######################################################################
  130. # [15.0] Dependencies.
  131. #######################################################################
  132. -include $(MKDEPENDENCIES)
  133. #######################################################################
  134. # [16.0] Global environ ment defines
  135. #######################################################################
  136. ifdef NSS_ALLOW_UNSUPPORTED_CRITICAL
  137. DEFINES += -DNSS_ALLOW_UNSUPPORTED_CRITICAL
  138. endif
  139. ifdef BUILD_LIBPKIX_TESTS
  140. DEFINES += -DBUILD_LIBPKIX_TESTS
  141. endif
  142. ifdef NSS_DISABLE_LIBPKIX
  143. DEFINES += -DNSS_DISABLE_LIBPKIX
  144. endif
  145. ifdef NSS_DISABLE_DBM
  146. DEFINES += -DNSS_DISABLE_DBM
  147. endif
  148. ifdef NSS_DISABLE_AVX2
  149. DEFINES += -DNSS_DISABLE_AVX2
  150. endif
  151. ifdef NSS_DISABLE_CHACHAPOLY
  152. DEFINES += -DNSS_DISABLE_CHACHAPOLY
  153. endif
  154. ifdef NSS_PKIX_NO_LDAP
  155. DEFINES += -DNSS_PKIX_NO_LDAP
  156. endif
  157. # FIPS support requires startup tests to be executed at load time of shared modules.
  158. # For performance reasons, these tests are disabled by default.
  159. # When compiling binaries that must support FIPS mode,
  160. # you should define NSS_FORCE_FIPS
  161. #
  162. # NSS_NO_INIT_SUPPORT is always defined on platforms that don't support
  163. # executing the startup tests at library load time.
  164. ifndef NSS_FORCE_FIPS
  165. DEFINES += -DNSS_NO_INIT_SUPPORT
  166. endif
  167. ifdef NSS_SEED_ONLY_DEV_URANDOM
  168. DEFINES += -DSEED_ONLY_DEV_URANDOM
  169. endif
  170. ifdef NSS_PKCS1_AllowMissingParameters
  171. DEFINES += -DNSS_PKCS1_AllowMissingParameters
  172. endif
  173. # Avoid building object leak test code for optimized library
  174. ifndef BUILD_OPT
  175. ifdef PKIX_OBJECT_LEAK_TEST
  176. DEFINES += -DPKIX_OBJECT_LEAK_TEST
  177. endif
  178. endif
  179. # Avoid building with Neon acceleration on Arm32
  180. ifdef NSS_DISABLE_ARM32_NEON
  181. DEFINES += -DNSS_DISABLE_ARM32_NEON
  182. endif
  183. # Avoid building with PowerPC's Altivec acceleration
  184. ifdef NSS_DISABLE_ALTIVEC
  185. DEFINES += -DNSS_DISABLE_ALTIVEC
  186. endif
  187. # This allows all library and tools code to use the util function
  188. # implementations directly from libnssutil3, rather than the wrappers
  189. # in libnss3 which are present for binary compatibility only
  190. DEFINES += -DUSE_UTIL_DIRECTLY
  191. USE_UTIL_DIRECTLY = 1
  192. # Build with NO_NSPR_10_SUPPORT to avoid using obsolete NSPR features
  193. DEFINES += -DNO_NSPR_10_SUPPORT
  194. # Hide old, deprecated, TLS cipher suite names when building NSS
  195. DEFINES += -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES