nss.gyp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. # This Source Code Form is subject to the terms of the Mozilla Public
  2. # License, v. 2.0. If a copy of the MPL was not distributed with this
  3. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  4. {
  5. 'includes': [
  6. 'coreconf/config.gypi'
  7. ],
  8. 'conditions': [
  9. [ 'mozpkix_only==0', {
  10. 'targets': [
  11. {
  12. 'target_name': 'nss_libs',
  13. 'type': 'none',
  14. 'dependencies': [
  15. 'lib/ckfw/builtins/builtins.gyp:nssckbi',
  16. 'lib/softoken/softoken.gyp:softokn3',
  17. ],
  18. 'conditions': [
  19. [ 'OS=="solaris" and target_arch=="sparc64"', {
  20. 'dependencies': [
  21. 'lib/freebl/freebl.gyp:freebl_64int_3',
  22. 'lib/freebl/freebl.gyp:freebl_64fpu_3',
  23. ],
  24. }, {
  25. 'dependencies': [
  26. 'lib/freebl/freebl.gyp:freebl3',
  27. ],
  28. }],
  29. [ 'moz_fold_libs==0', {
  30. 'dependencies': [
  31. 'lib/nss/nss.gyp:nss3',
  32. 'lib/smime/smime.gyp:smime3',
  33. 'lib/sqlite/sqlite.gyp:sqlite3',
  34. 'lib/ssl/ssl.gyp:ssl3',
  35. 'lib/util/util.gyp:nssutil3',
  36. ],
  37. }],
  38. [ 'OS=="linux"', {
  39. 'dependencies': [
  40. 'lib/freebl/freebl.gyp:freeblpriv3',
  41. ],
  42. }],
  43. [ 'OS=="linux" and mozilla_client==0', {
  44. 'dependencies': [
  45. 'lib/sysinit/sysinit.gyp:nsssysinit',
  46. ],
  47. }],
  48. [ 'disable_dbm==0', {
  49. 'dependencies': [
  50. 'lib/softoken/legacydb/legacydb.gyp:nssdbm3',
  51. ],
  52. }],
  53. ],
  54. },
  55. {
  56. 'target_name': 'nss_static_libs',
  57. 'type': 'none',
  58. 'dependencies': [
  59. 'cmd/lib/lib.gyp:sectool',
  60. 'lib/base/base.gyp:nssb',
  61. 'lib/certdb/certdb.gyp:certdb',
  62. 'lib/certhigh/certhigh.gyp:certhi',
  63. 'lib/ckfw/ckfw.gyp:nssckfw',
  64. 'lib/crmf/crmf.gyp:crmf',
  65. 'lib/cryptohi/cryptohi.gyp:cryptohi',
  66. 'lib/dev/dev.gyp:nssdev',
  67. 'lib/freebl/freebl.gyp:freebl',
  68. 'lib/jar/jar.gyp:jar',
  69. 'lib/libpkix/libpkix.gyp:libpkix',
  70. # mozpkix and mozpkix-testlib are static C++ libs
  71. 'lib/mozpkix/mozpkix.gyp:mozpkix',
  72. 'lib/mozpkix/mozpkix.gyp:mozpkix-testlib',
  73. 'lib/nss/nss.gyp:nss_static',
  74. 'lib/pk11wrap/pk11wrap.gyp:pk11wrap',
  75. 'lib/pkcs12/pkcs12.gyp:pkcs12',
  76. 'lib/pkcs7/pkcs7.gyp:pkcs7',
  77. 'lib/pki/pki.gyp:nsspki',
  78. 'lib/smime/smime.gyp:smime',
  79. 'lib/softoken/softoken.gyp:softokn',
  80. 'lib/ssl/ssl.gyp:ssl',
  81. 'lib/util/util.gyp:nssutil',
  82. ],
  83. 'conditions': [
  84. [ 'OS=="linux" and mozilla_client==0', {
  85. 'dependencies': [
  86. 'lib/sysinit/sysinit.gyp:nsssysinit_static',
  87. ],
  88. }],
  89. [ 'disable_dbm==0', {
  90. 'dependencies': [
  91. 'lib/dbm/src/src.gyp:dbm',
  92. 'lib/softoken/legacydb/legacydb.gyp:nssdbm',
  93. ],
  94. }],
  95. [ 'use_system_sqlite==0', {
  96. 'dependencies': [
  97. 'lib/sqlite/sqlite.gyp:sqlite',
  98. ],
  99. }],
  100. [ 'moz_fold_libs==1', {
  101. 'dependencies': [
  102. 'lib/nss/nss.gyp:nss3_static',
  103. 'lib/smime/smime.gyp:smime3_static',
  104. ],
  105. }],
  106. ],
  107. },
  108. {
  109. 'target_name': 'nss_cmds',
  110. 'type': 'none',
  111. 'dependencies': [
  112. 'cmd/certutil/certutil.gyp:certutil',
  113. 'cmd/modutil/modutil.gyp:modutil',
  114. 'cmd/pk12util/pk12util.gyp:pk12util',
  115. 'cmd/shlibsign/shlibsign.gyp:shlibsign',
  116. ],
  117. 'conditions': [
  118. [ 'comm_client==1', {
  119. 'dependencies': [
  120. 'cmd/smimetools/smimetools.gyp:cmsutil',
  121. 'cmd/atob/atob.gyp:atob',
  122. 'cmd/btoa/btoa.gyp:btoa',
  123. ],
  124. }],
  125. [ 'mozilla_client==0', {
  126. 'dependencies': [
  127. 'cmd/crlutil/crlutil.gyp:crlutil',
  128. 'cmd/pwdecrypt/pwdecrypt.gyp:pwdecrypt',
  129. 'cmd/signtool/signtool.gyp:signtool',
  130. 'cmd/signver/signver.gyp:signver',
  131. 'cmd/smimetools/smimetools.gyp:cmsutil',
  132. 'cmd/ssltap/ssltap.gyp:ssltap',
  133. 'cmd/symkeyutil/symkeyutil.gyp:symkeyutil',
  134. 'nss-tool/nss_tool.gyp:nss',
  135. 'nss-tool/nss_tool.gyp:hw-support',
  136. ],
  137. }],
  138. ],
  139. },
  140. ],
  141. }, { # else, i.e. mozpkix_only==1
  142. # Build only mozpkix.
  143. 'targets': [
  144. {
  145. 'target_name': 'nss_mozpkix_libs',
  146. 'type': 'none',
  147. 'dependencies': [
  148. # mozpkix and mozpkix-testlib are static C++ libs
  149. 'lib/mozpkix/mozpkix.gyp:mozpkix',
  150. 'lib/mozpkix/mozpkix.gyp:mozpkix-testlib',
  151. ],
  152. },
  153. ],
  154. }],
  155. [ 'disable_tests==0', {
  156. 'targets': [
  157. {
  158. 'target_name': 'nss_tests',
  159. 'type': 'none',
  160. 'dependencies': [
  161. 'cmd/addbuiltin/addbuiltin.gyp:addbuiltin',
  162. 'cmd/atob/atob.gyp:atob',
  163. 'cmd/bltest/bltest.gyp:bltest',
  164. 'cmd/btoa/btoa.gyp:btoa',
  165. 'cmd/chktest/chktest.gyp:chktest',
  166. 'cmd/crmftest/crmftest.gyp:crmftest',
  167. 'cmd/dbtest/dbtest.gyp:dbtest',
  168. 'cmd/derdump/derdump.gyp:derdump',
  169. 'cmd/digest/digest.gyp:digest',
  170. 'cmd/ecperf/ecperf.gyp:ecperf',
  171. 'cmd/fbectest/fbectest.gyp:fbectest',
  172. 'cmd/httpserv/httpserv.gyp:httpserv',
  173. 'cmd/listsuites/listsuites.gyp:listsuites',
  174. 'cmd/makepqg/makepqg.gyp:makepqg',
  175. 'cmd/multinit/multinit.gyp:multinit',
  176. 'cmd/nss-policy-check/nss-policy-check.gyp:nss-policy-check',
  177. 'cmd/ocspclnt/ocspclnt.gyp:ocspclnt',
  178. 'cmd/ocspresp/ocspresp.gyp:ocspresp',
  179. 'cmd/oidcalc/oidcalc.gyp:oidcalc',
  180. 'cmd/p7content/p7content.gyp:p7content',
  181. 'cmd/p7env/p7env.gyp:p7env',
  182. 'cmd/p7sign/p7sign.gyp:p7sign',
  183. 'cmd/p7verify/p7verify.gyp:p7verify',
  184. 'cmd/pk11ectest/pk11ectest.gyp:pk11ectest',
  185. 'cmd/pk11gcmtest/pk11gcmtest.gyp:pk11gcmtest',
  186. 'cmd/pk11mode/pk11mode.gyp:pk11mode',
  187. 'cmd/pk11importtest/pk11importtest.gyp:pk11importtest',
  188. 'cmd/pk1sign/pk1sign.gyp:pk1sign',
  189. 'cmd/pp/pp.gyp:pp',
  190. 'cmd/rsaperf/rsaperf.gyp:rsaperf',
  191. 'cmd/rsapoptst/rsapoptst.gyp:rsapoptst',
  192. 'cmd/sdrtest/sdrtest.gyp:sdrtest',
  193. 'cmd/selfserv/selfserv.gyp:selfserv',
  194. 'cmd/shlibsign/mangle/mangle.gyp:mangle',
  195. 'cmd/strsclnt/strsclnt.gyp:strsclnt',
  196. 'cmd/tests/tests.gyp:baddbdir',
  197. 'cmd/tests/tests.gyp:conflict',
  198. 'cmd/tests/tests.gyp:dertimetest',
  199. 'cmd/tests/tests.gyp:encodeinttest',
  200. 'cmd/tests/tests.gyp:nonspr10',
  201. 'cmd/tests/tests.gyp:remtest',
  202. 'cmd/tests/tests.gyp:secmodtest',
  203. 'cmd/tstclnt/tstclnt.gyp:tstclnt',
  204. 'cmd/vfychain/vfychain.gyp:vfychain',
  205. 'cmd/vfyserv/vfyserv.gyp:vfyserv',
  206. 'cmd/mpitests/mpitests.gyp:mpi_tests',
  207. 'gtests/certhigh_gtest/certhigh_gtest.gyp:certhigh_gtest',
  208. 'gtests/cryptohi_gtest/cryptohi_gtest.gyp:cryptohi_gtest',
  209. 'gtests/der_gtest/der_gtest.gyp:der_gtest',
  210. 'gtests/certdb_gtest/certdb_gtest.gyp:certdb_gtest',
  211. 'gtests/freebl_gtest/freebl_gtest.gyp:prng_gtest',
  212. 'gtests/freebl_gtest/freebl_gtest.gyp:blake2b_gtest',
  213. 'gtests/freebl_gtest/freebl_gtest.gyp:freebl_gtest',
  214. 'gtests/mozpkix_gtest/mozpkix_gtest.gyp:mozpkix_gtest',
  215. 'gtests/nss_bogo_shim/nss_bogo_shim.gyp:nss_bogo_shim',
  216. 'gtests/pkcs11testmodule/pkcs11testmodule.gyp:pkcs11testmodule',
  217. 'gtests/pk11_gtest/pk11_gtest.gyp:pk11_gtest',
  218. 'gtests/smime_gtest/smime_gtest.gyp:smime_gtest',
  219. 'gtests/softoken_gtest/softoken_gtest.gyp:softoken_gtest',
  220. 'gtests/ssl_gtest/ssl_gtest.gyp:ssl_gtest',
  221. 'gtests/util_gtest/util_gtest.gyp:util_gtest',
  222. 'lib/ckfw/builtins/testlib/builtins-testlib.gyp:nssckbi-testlib',
  223. ],
  224. 'conditions': [
  225. [ 'OS=="linux"', {
  226. 'dependencies': [
  227. 'cmd/lowhashtest/lowhashtest.gyp:lowhashtest',
  228. ],
  229. }],
  230. [ 'OS=="linux" and mozilla_client==0', {
  231. 'dependencies': [
  232. 'gtests/sysinit_gtest/sysinit_gtest.gyp:sysinit_gtest',
  233. ],
  234. }],
  235. [ 'disable_libpkix==0', {
  236. 'dependencies': [
  237. 'cmd/pkix-errcodes/pkix-errcodes.gyp:pkix-errcodes',
  238. ],
  239. }],
  240. [ 'disable_fips==0', {
  241. 'dependencies': [
  242. 'cmd/fipstest/fipstest.gyp:fipstest',
  243. ],
  244. }],
  245. ],
  246. },
  247. ],
  248. }],
  249. [ 'sign_libs==1', {
  250. 'targets': [
  251. {
  252. 'target_name': 'nss_sign_shared_libs',
  253. 'type': 'none',
  254. 'dependencies': [
  255. 'cmd/shlibsign/shlibsign.gyp:shlibsign',
  256. ],
  257. 'actions': [
  258. {
  259. 'action_name': 'shlibsign',
  260. 'msvs_cygwin_shell': 0,
  261. 'inputs': [
  262. '<(nss_dist_obj_dir)/lib/<(dll_prefix)freebl3.<(dll_suffix)',
  263. '<(nss_dist_obj_dir)/lib/<(dll_prefix)freeblpriv3.<(dll_suffix)',
  264. '<(nss_dist_obj_dir)/lib/<(dll_prefix)nssdbm3.<(dll_suffix)',
  265. '<(nss_dist_obj_dir)/lib/<(dll_prefix)softokn3.<(dll_suffix)',
  266. ],
  267. 'outputs': [
  268. '<(nss_dist_obj_dir)/lib/<(dll_prefix)freebl3.chk',
  269. '<(nss_dist_obj_dir)/lib/<(dll_prefix)freeblpriv3.chk',
  270. '<(nss_dist_obj_dir)/lib/<(dll_prefix)nssdbm3.chk',
  271. '<(nss_dist_obj_dir)/lib/<(dll_prefix)softokn3.chk'
  272. ],
  273. 'conditions': [
  274. ['OS!="linux"', {
  275. 'inputs/': [['exclude', 'freeblpriv']],
  276. 'outputs/': [['exclude', 'freeblpriv']]
  277. }],
  278. ['disable_dbm==1', {
  279. 'inputs/': [['exclude', 'nssdbm3']],
  280. 'outputs/': [['exclude', 'nssdbm3']]
  281. }],
  282. ],
  283. 'action': ['<(python)', '<(DEPTH)/coreconf/shlibsign.py', '<@(_inputs)']
  284. }
  285. ],
  286. },
  287. ],
  288. }],
  289. [ 'fuzz_tls==1', {
  290. 'targets': [
  291. {
  292. 'target_name': 'fuzz_warning',
  293. 'type': 'none',
  294. 'actions': [
  295. {
  296. 'action_name': 'fuzz_warning',
  297. 'action': ['cat', 'fuzz/warning.txt'],
  298. 'inputs': ['fuzz/warning.txt'],
  299. 'ninja_use_console': 1,
  300. 'outputs': ['dummy'],
  301. }
  302. ],
  303. },
  304. ],
  305. }],
  306. [ 'fuzz==1', {
  307. 'targets': [
  308. {
  309. 'target_name': 'fuzz',
  310. 'type': 'none',
  311. 'dependencies': [
  312. 'fuzz/fuzz.gyp:nssfuzz',
  313. ],
  314. },
  315. ],
  316. }],
  317. ],
  318. }