summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Mielczarek <ted@mielczarek.org>2016-09-23 15:12:59 -0400
committerTed Mielczarek <ted@mielczarek.org>2016-09-23 15:12:59 -0400
commitf7964b0b3ebc488626bd43d6bfacb6a0cfbf4966 (patch)
tree2324237a8c0679165e556ac099d52e1c7b12249d
parent119320d52109b2796570735871b36d6f32c7ee08 (diff)
downloadnss-hg-f7964b0b3ebc488626bd43d6bfacb6a0cfbf4966.tar.gz
bug 1237872 - Add gyp build system for NSS. r=fkiefer
-rw-r--r--.gitignore2
-rw-r--r--.hgignore2
-rw-r--r--cmd/addbuiltin/addbuiltin.gyp24
-rw-r--r--cmd/atob/atob.gyp30
-rw-r--r--cmd/bltest/bltest.gyp35
-rw-r--r--cmd/btoa/btoa.gyp30
-rw-r--r--cmd/certcgi/certcgi.gyp33
-rw-r--r--cmd/certutil/certutil.gyp32
-rw-r--r--cmd/chktest/chktest.gyp32
-rw-r--r--cmd/crlutil/crlutil.gyp32
-rw-r--r--cmd/crmftest/crmftest.gyp25
-rw-r--r--cmd/dbtest/dbtest.gyp25
-rw-r--r--cmd/derdump/derdump.gyp30
-rw-r--r--cmd/digest/digest.gyp30
-rw-r--r--cmd/ecperf/ecperf.gyp35
-rw-r--r--cmd/ectest/ectest.gyp34
-rw-r--r--cmd/fipstest/fipstest.gyp31
-rw-r--r--cmd/httpserv/httpserv.gyp30
-rw-r--r--cmd/lib/exports.gyp27
-rw-r--r--cmd/lib/lib.gyp35
-rw-r--r--cmd/listsuites/listsuites.gyp24
-rw-r--r--cmd/lowhashtest/lowhashtest.gyp32
-rw-r--r--cmd/makepqg/makepqg.gyp25
-rw-r--r--cmd/modutil/modutil.gyp44
-rw-r--r--cmd/multinit/multinit.gyp24
-rw-r--r--cmd/ocspclnt/ocspclnt.gyp25
-rw-r--r--cmd/ocspresp/ocspresp.gyp24
-rw-r--r--cmd/oidcalc/oidcalc.gyp30
-rw-r--r--cmd/p7content/p7content.gyp24
-rw-r--r--cmd/p7env/p7env.gyp24
-rw-r--r--cmd/p7sign/p7sign.gyp24
-rw-r--r--cmd/p7verify/p7verify.gyp24
-rw-r--r--cmd/pk11gcmtest/pk11gcmtest.gyp24
-rw-r--r--cmd/pk11mode/pk11mode.gyp24
-rw-r--r--cmd/pk12util/pk12util.gyp30
-rw-r--r--cmd/pk1sign/pk1sign.gyp24
-rw-r--r--cmd/pkix-errcodes/pkix-errcodes.gyp24
-rw-r--r--cmd/platlibs.gypi78
-rw-r--r--cmd/pp/pp.gyp30
-rw-r--r--cmd/pwdecrypt/pwdecrypt.gyp25
-rw-r--r--cmd/rsaperf/rsaperf.gyp36
-rw-r--r--cmd/sdrtest/sdrtest.gyp25
-rw-r--r--cmd/selfserv/selfserv.gyp30
-rw-r--r--cmd/shlibsign/mangle/mangle.gyp31
-rw-r--r--cmd/shlibsign/shlibsign.gyp30
-rw-r--r--cmd/signtool/signtool.gyp33
-rw-r--r--cmd/signver/signver.gyp26
-rw-r--r--cmd/smimetools/smimetools.gyp25
-rw-r--r--cmd/ssltap/ssltap.gyp25
-rw-r--r--cmd/strsclnt/strsclnt.gyp30
-rw-r--r--cmd/symkeyutil/symkeyutil.gyp30
-rw-r--r--cmd/tests/tests.gyp91
-rw-r--r--cmd/tstclnt/tstclnt.gyp31
-rw-r--r--cmd/vfychain/vfychain.gyp30
-rw-r--r--cmd/vfyserv/vfyserv.gyp32
-rw-r--r--coreconf/check_cc_clang.py12
-rw-r--r--coreconf/config.gypi409
-rw-r--r--coreconf/detect_host_arch.py33
-rw-r--r--coreconf/empty.c1
-rw-r--r--coreconf/nsinstall/nsinstall.gyp21
-rw-r--r--coreconf/nspr_include_dir.py17
-rw-r--r--coreconf/nspr_lib_dir.py17
-rw-r--r--coreconf/pkg_config.py15
-rw-r--r--exports.gyp77
-rw-r--r--external_tests/common/common.gyp36
-rw-r--r--external_tests/common/gtest.gypi30
-rw-r--r--external_tests/der_gtest/der_gtest.gyp37
-rw-r--r--external_tests/google_test/google_test.gyp59
-rw-r--r--external_tests/nss_bogo_shim/nss_bogo_shim.gyp79
-rw-r--r--external_tests/pk11_gtest/pk11_gtest.gyp41
-rw-r--r--external_tests/ssl_gtest/ssl_gtest.gyp100
-rw-r--r--external_tests/util_gtest/util_gtest.gyp39
-rw-r--r--lib/base/base.gyp32
-rw-r--r--lib/base/exports.gyp33
-rw-r--r--lib/certdb/certdb.gyp34
-rw-r--r--lib/certdb/exports.gyp36
-rw-r--r--lib/certhigh/certhigh.gyp31
-rw-r--r--lib/certhigh/exports.gyp33
-rw-r--r--lib/ckfw/builtins/builtins.gyp61
-rw-r--r--lib/ckfw/builtins/exports.gyp25
-rw-r--r--lib/ckfw/ckfw.gyp34
-rw-r--r--lib/ckfw/exports.gyp44
-rw-r--r--lib/crmf/crmf.gyp39
-rw-r--r--lib/crmf/exports.gyp37
-rw-r--r--lib/cryptohi/cryptohi.gyp27
-rw-r--r--lib/cryptohi/exports.gyp37
-rw-r--r--lib/dbm/include/exports.gyp38
-rw-r--r--lib/dbm/include/include.gyp12
-rw-r--r--lib/dbm/src/src.gyp40
-rw-r--r--lib/dev/dev.gyp26
-rw-r--r--lib/dev/exports.gyp31
-rw-r--r--lib/freebl/exports.gyp48
-rw-r--r--lib/freebl/freebl.gyp393
-rw-r--r--lib/jar/exports.gyp27
-rw-r--r--lib/jar/jar.gyp76
-rw-r--r--lib/libpkix/include/exports.gyp38
-rw-r--r--lib/libpkix/include/include.gyp12
-rw-r--r--lib/libpkix/pkix/certsel/certsel.gyp24
-rw-r--r--lib/libpkix/pkix/certsel/exports.gyp26
-rw-r--r--lib/libpkix/pkix/checker/checker.gyp35
-rw-r--r--lib/libpkix/pkix/checker/exports.gyp37
-rw-r--r--lib/libpkix/pkix/crlsel/crlsel.gyp24
-rw-r--r--lib/libpkix/pkix/crlsel/exports.gyp26
-rw-r--r--lib/libpkix/pkix/params/exports.gyp28
-rw-r--r--lib/libpkix/pkix/params/params.gyp26
-rw-r--r--lib/libpkix/pkix/results/exports.gyp28
-rw-r--r--lib/libpkix/pkix/results/results.gyp26
-rw-r--r--lib/libpkix/pkix/store/exports.gyp25
-rw-r--r--lib/libpkix/pkix/store/store.gyp23
-rw-r--r--lib/libpkix/pkix/top/exports.gyp27
-rw-r--r--lib/libpkix/pkix/top/top.gyp25
-rw-r--r--lib/libpkix/pkix/util/exports.gyp28
-rw-r--r--lib/libpkix/pkix/util/util.gyp27
-rw-r--r--lib/libpkix/pkix_pl_nss/module/exports.gyp36
-rw-r--r--lib/libpkix/pkix_pl_nss/module/module.gyp41
-rw-r--r--lib/libpkix/pkix_pl_nss/pki/exports.gyp41
-rw-r--r--lib/libpkix/pkix_pl_nss/pki/pki.gyp39
-rw-r--r--lib/libpkix/pkix_pl_nss/system/exports.gyp37
-rw-r--r--lib/libpkix/pkix_pl_nss/system/system.gyp36
-rw-r--r--lib/nss/exports.gyp32
-rw-r--r--lib/nss/nss.gyp83
-rw-r--r--lib/pk11wrap/exports.gyp39
-rw-r--r--lib/pk11wrap/pk11wrap.gyp51
-rw-r--r--lib/pkcs12/exports.gyp29
-rw-r--r--lib/pkcs12/pkcs12.gyp29
-rw-r--r--lib/pkcs7/exports.gyp33
-rw-r--r--lib/pkcs7/pkcs7.gyp29
-rw-r--r--lib/pki/exports.gyp32
-rw-r--r--lib/pki/pki.gyp32
-rw-r--r--lib/smime/exports.gyp34
-rw-r--r--lib/smime/smime.gyp80
-rw-r--r--lib/softoken/exports.gyp38
-rw-r--r--lib/softoken/legacydb/legacydb.gyp66
-rw-r--r--lib/softoken/softoken.gyp71
-rw-r--r--lib/sqlite/exports.gyp25
-rw-r--r--lib/sqlite/sqlite.gyp50
-rw-r--r--lib/ssl/exports.gyp29
-rw-r--r--lib/ssl/ssl.gyp91
-rw-r--r--lib/sysinit/sysinit.gyp31
-rw-r--r--lib/util/exports.gyp67
-rw-r--r--lib/util/util.gyp59
-rw-r--r--lib/zlib/exports.gyp33
-rw-r--r--lib/zlib/zlib.gyp49
-rw-r--r--nss.gyp202
144 files changed, 5888 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index c55ef00a2..946f1418b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,8 @@
*OPT.OBJ/
*DBG.OBJ/
*DBG.OBJD/
+out/*
+*.pyc
*.bak
*.out
*.rej
diff --git a/.hgignore b/.hgignore
index 13ba3ed59..158259536 100644
--- a/.hgignore
+++ b/.hgignore
@@ -3,6 +3,8 @@ syntax: glob
*OPT.OBJ/*
*DBG.OBJ/*
*DBG.OBJD/*
+out/*
+*.pyc
*.bak
*.out
*.rej
diff --git a/cmd/addbuiltin/addbuiltin.gyp b/cmd/addbuiltin/addbuiltin.gyp
new file mode 100644
index 000000000..a8d1382e3
--- /dev/null
+++ b/cmd/addbuiltin/addbuiltin.gyp
@@ -0,0 +1,24 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'addbuiltin',
+ 'type': 'executable',
+ 'sources': [
+ 'addbuiltin.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/atob/atob.gyp b/cmd/atob/atob.gyp
new file mode 100644
index 000000000..af972c2e9
--- /dev/null
+++ b/cmd/atob/atob.gyp
@@ -0,0 +1,30 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'atob',
+ 'type': 'executable',
+ 'sources': [
+ 'atob.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSPR20'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/bltest/bltest.gyp b/cmd/bltest/bltest.gyp
new file mode 100644
index 000000000..7139c3181
--- /dev/null
+++ b/cmd/bltest/bltest.gyp
@@ -0,0 +1,35 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'bltest',
+ 'type': 'executable',
+ 'sources': [
+ 'blapitest.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/sqlite/sqlite.gyp:sqlite3'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'include_dirs': [
+ '../../nss/lib/softoken'
+ ],
+ 'defines': [
+ 'NSS_USE_STATIC_LIBS'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss',
+ 'use_static_libs': 1
+ }
+} \ No newline at end of file
diff --git a/cmd/btoa/btoa.gyp b/cmd/btoa/btoa.gyp
new file mode 100644
index 000000000..295d5758e
--- /dev/null
+++ b/cmd/btoa/btoa.gyp
@@ -0,0 +1,30 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'btoa',
+ 'type': 'executable',
+ 'sources': [
+ 'btoa.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSPR20'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/certcgi/certcgi.gyp b/cmd/certcgi/certcgi.gyp
new file mode 100644
index 000000000..5ad2893e0
--- /dev/null
+++ b/cmd/certcgi/certcgi.gyp
@@ -0,0 +1,33 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'certcgi',
+ 'type': 'executable',
+ 'sources': [
+ 'certcgi.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/sqlite/sqlite.gyp:sqlite3'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSPR20',
+ 'NSS_USE_STATIC_LIBS'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss',
+ 'use_static_libs': 1
+ }
+} \ No newline at end of file
diff --git a/cmd/certutil/certutil.gyp b/cmd/certutil/certutil.gyp
new file mode 100644
index 000000000..d8f1b5d4c
--- /dev/null
+++ b/cmd/certutil/certutil.gyp
@@ -0,0 +1,32 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'certutil',
+ 'type': 'executable',
+ 'sources': [
+ 'certext.c',
+ 'certutil.c',
+ 'keystuff.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSPR20'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/chktest/chktest.gyp b/cmd/chktest/chktest.gyp
new file mode 100644
index 000000000..15abbcc93
--- /dev/null
+++ b/cmd/chktest/chktest.gyp
@@ -0,0 +1,32 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'chktest',
+ 'type': 'executable',
+ 'sources': [
+ 'chktest.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/sqlite/sqlite.gyp:sqlite3'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSS_USE_STATIC_LIBS'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss',
+ 'use_static_libs': 1
+ }
+} \ No newline at end of file
diff --git a/cmd/crlutil/crlutil.gyp b/cmd/crlutil/crlutil.gyp
new file mode 100644
index 000000000..470449b0c
--- /dev/null
+++ b/cmd/crlutil/crlutil.gyp
@@ -0,0 +1,32 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'crlutil',
+ 'type': 'executable',
+ 'sources': [
+ 'crlgen.c',
+ 'crlgen_lex.c',
+ 'crlutil.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSPR20'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/crmftest/crmftest.gyp b/cmd/crmftest/crmftest.gyp
new file mode 100644
index 000000000..c14bd195a
--- /dev/null
+++ b/cmd/crmftest/crmftest.gyp
@@ -0,0 +1,25 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'crmftest',
+ 'type': 'executable',
+ 'sources': [
+ 'testcrmf.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/crmf/crmf.gyp:crmf'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/dbtest/dbtest.gyp b/cmd/dbtest/dbtest.gyp
new file mode 100644
index 000000000..fb5857328
--- /dev/null
+++ b/cmd/dbtest/dbtest.gyp
@@ -0,0 +1,25 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'dbtest',
+ 'type': 'executable',
+ 'sources': [
+ 'dbtest.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/derdump/derdump.gyp b/cmd/derdump/derdump.gyp
new file mode 100644
index 000000000..5637685da
--- /dev/null
+++ b/cmd/derdump/derdump.gyp
@@ -0,0 +1,30 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'derdump',
+ 'type': 'executable',
+ 'sources': [
+ 'derdump.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSPR20'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/digest/digest.gyp b/cmd/digest/digest.gyp
new file mode 100644
index 000000000..c2e00289f
--- /dev/null
+++ b/cmd/digest/digest.gyp
@@ -0,0 +1,30 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'digest',
+ 'type': 'executable',
+ 'sources': [
+ 'digest.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSPR20'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/ecperf/ecperf.gyp b/cmd/ecperf/ecperf.gyp
new file mode 100644
index 000000000..57409fa24
--- /dev/null
+++ b/cmd/ecperf/ecperf.gyp
@@ -0,0 +1,35 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'ecperf',
+ 'type': 'executable',
+ 'sources': [
+ 'ecperf.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/sqlite/sqlite.gyp:sqlite3'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'include_dirs': [
+ '../../nss/lib/softoken'
+ ],
+ 'defines': [
+ 'NSS_USE_STATIC_LIBS'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss',
+ 'use_static_libs': 1
+ }
+} \ No newline at end of file
diff --git a/cmd/ectest/ectest.gyp b/cmd/ectest/ectest.gyp
new file mode 100644
index 000000000..f41cc5550
--- /dev/null
+++ b/cmd/ectest/ectest.gyp
@@ -0,0 +1,34 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'ectest',
+ 'type': 'executable',
+ 'sources': [
+ 'ectest.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/sqlite/sqlite.gyp:sqlite3'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'include_dirs': [
+ '../../nss/lib/softoken'
+ ],
+ 'defines': [
+ 'NSS_USE_STATIC_LIBS'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss',
+ 'use_static_libs': 1
+ }
+} \ No newline at end of file
diff --git a/cmd/fipstest/fipstest.gyp b/cmd/fipstest/fipstest.gyp
new file mode 100644
index 000000000..41024ca7b
--- /dev/null
+++ b/cmd/fipstest/fipstest.gyp
@@ -0,0 +1,31 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'fipstest',
+ 'type': 'executable',
+ 'sources': [
+ 'fipstest.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/sqlite/sqlite.gyp:sqlite3'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSS_USE_STATIC_LIBS'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss',
+ 'use_static_libs': 1
+ }
+} \ No newline at end of file
diff --git a/cmd/httpserv/httpserv.gyp b/cmd/httpserv/httpserv.gyp
new file mode 100644
index 000000000..006706668
--- /dev/null
+++ b/cmd/httpserv/httpserv.gyp
@@ -0,0 +1,30 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'httpserv',
+ 'type': 'executable',
+ 'sources': [
+ 'httpserv.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSPR20'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/lib/exports.gyp b/cmd/lib/exports.gyp
new file mode 100644
index 000000000..f259ce07d
--- /dev/null
+++ b/cmd/lib/exports.gyp
@@ -0,0 +1,27 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'cmd_lib_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'basicutil.h',
+ 'pk11table.h',
+ 'secutil.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/lib/lib.gyp b/cmd/lib/lib.gyp
new file mode 100644
index 000000000..fe5e1d93f
--- /dev/null
+++ b/cmd/lib/lib.gyp
@@ -0,0 +1,35 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'sectool',
+ 'type': 'static_library',
+ 'sources': [
+ 'basicutil.c',
+ 'derprint.c',
+ 'ffs.c',
+ 'moreoids.c',
+ 'pk11table.c',
+ 'pppolicy.c',
+ 'secpwd.c',
+ 'secutil.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSPR20'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/listsuites/listsuites.gyp b/cmd/listsuites/listsuites.gyp
new file mode 100644
index 000000000..51f8d8f6e
--- /dev/null
+++ b/cmd/listsuites/listsuites.gyp
@@ -0,0 +1,24 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'listsuites',
+ 'type': 'executable',
+ 'sources': [
+ 'listsuites.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/lowhashtest/lowhashtest.gyp b/cmd/lowhashtest/lowhashtest.gyp
new file mode 100644
index 000000000..3b3e3c29c
--- /dev/null
+++ b/cmd/lowhashtest/lowhashtest.gyp
@@ -0,0 +1,32 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lowhashtest',
+ 'type': 'executable',
+ 'sources': [
+ 'lowhashtest.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/freebl/freebl.gyp:freebl3',
+ '<(DEPTH)/cmd/lib/lib.gyp:sectool'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'include_dirs': [
+ '../../nss/lib/freebl'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/makepqg/makepqg.gyp b/cmd/makepqg/makepqg.gyp
new file mode 100644
index 000000000..3ddc34afe
--- /dev/null
+++ b/cmd/makepqg/makepqg.gyp
@@ -0,0 +1,25 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'makepqg',
+ 'type': 'executable',
+ 'sources': [
+ 'makepqg.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/modutil/modutil.gyp b/cmd/modutil/modutil.gyp
new file mode 100644
index 000000000..a70448b8e
--- /dev/null
+++ b/cmd/modutil/modutil.gyp
@@ -0,0 +1,44 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'modutil',
+ 'type': 'executable',
+ 'sources': [
+ 'install-ds.c',
+ 'install.c',
+ 'installparse.c',
+ 'instsec.c',
+ 'lex.Pk11Install_yy.c',
+ 'modutil.c',
+ 'pk11.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/lib/jar/jar.gyp:jar',
+ '<(DEPTH)/lib/zlib/zlib.gyp:nss_zlib'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'include_dirs': [
+ '<(PRODUCT_DIR)/dist/nss/private',
+ '<(PRODUCT_DIR)/dist/dbm/private'
+ ],
+ 'defines': [
+ 'NSPR20',
+ 'YY_NO_UNPUT',
+ 'YY_NO_INPUT'
+ ]
+ },
+ 'variables': {
+ 'module': 'sectools'
+ }
+}
diff --git a/cmd/multinit/multinit.gyp b/cmd/multinit/multinit.gyp
new file mode 100644
index 000000000..b99c01843
--- /dev/null
+++ b/cmd/multinit/multinit.gyp
@@ -0,0 +1,24 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'multinit',
+ 'type': 'executable',
+ 'sources': [
+ 'multinit.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/ocspclnt/ocspclnt.gyp b/cmd/ocspclnt/ocspclnt.gyp
new file mode 100644
index 000000000..4ab7c5e36
--- /dev/null
+++ b/cmd/ocspclnt/ocspclnt.gyp
@@ -0,0 +1,25 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'ocspclnt',
+ 'type': 'executable',
+ 'sources': [
+ 'ocspclnt.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/ocspresp/ocspresp.gyp b/cmd/ocspresp/ocspresp.gyp
new file mode 100644
index 000000000..81f02dfe8
--- /dev/null
+++ b/cmd/ocspresp/ocspresp.gyp
@@ -0,0 +1,24 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'ocspresp',
+ 'type': 'executable',
+ 'sources': [
+ 'ocspresp.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/oidcalc/oidcalc.gyp b/cmd/oidcalc/oidcalc.gyp
new file mode 100644
index 000000000..b02ab8721
--- /dev/null
+++ b/cmd/oidcalc/oidcalc.gyp
@@ -0,0 +1,30 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'oidcalc',
+ 'type': 'executable',
+ 'sources': [
+ 'oidcalc.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSPR20'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/p7content/p7content.gyp b/cmd/p7content/p7content.gyp
new file mode 100644
index 000000000..7380dfae1
--- /dev/null
+++ b/cmd/p7content/p7content.gyp
@@ -0,0 +1,24 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'p7content',
+ 'type': 'executable',
+ 'sources': [
+ 'p7content.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/p7env/p7env.gyp b/cmd/p7env/p7env.gyp
new file mode 100644
index 000000000..e84eaabee
--- /dev/null
+++ b/cmd/p7env/p7env.gyp
@@ -0,0 +1,24 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'p7env',
+ 'type': 'executable',
+ 'sources': [
+ 'p7env.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/p7sign/p7sign.gyp b/cmd/p7sign/p7sign.gyp
new file mode 100644
index 000000000..c2c672d7e
--- /dev/null
+++ b/cmd/p7sign/p7sign.gyp
@@ -0,0 +1,24 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'p7sign',
+ 'type': 'executable',
+ 'sources': [
+ 'p7sign.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/p7verify/p7verify.gyp b/cmd/p7verify/p7verify.gyp
new file mode 100644
index 000000000..220a72a42
--- /dev/null
+++ b/cmd/p7verify/p7verify.gyp
@@ -0,0 +1,24 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'p7verify',
+ 'type': 'executable',
+ 'sources': [
+ 'p7verify.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/pk11gcmtest/pk11gcmtest.gyp b/cmd/pk11gcmtest/pk11gcmtest.gyp
new file mode 100644
index 000000000..fff80f8e8
--- /dev/null
+++ b/cmd/pk11gcmtest/pk11gcmtest.gyp
@@ -0,0 +1,24 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pk11gcmtest',
+ 'type': 'executable',
+ 'sources': [
+ 'pk11gcmtest.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/pk11mode/pk11mode.gyp b/cmd/pk11mode/pk11mode.gyp
new file mode 100644
index 000000000..ed042c183
--- /dev/null
+++ b/cmd/pk11mode/pk11mode.gyp
@@ -0,0 +1,24 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pk11mode',
+ 'type': 'executable',
+ 'sources': [
+ 'pk11mode.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/pk12util/pk12util.gyp b/cmd/pk12util/pk12util.gyp
new file mode 100644
index 000000000..5eb59e04b
--- /dev/null
+++ b/cmd/pk12util/pk12util.gyp
@@ -0,0 +1,30 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pk12util',
+ 'type': 'executable',
+ 'sources': [
+ 'pk12util.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSPR20'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/pk1sign/pk1sign.gyp b/cmd/pk1sign/pk1sign.gyp
new file mode 100644
index 000000000..ff77c5575
--- /dev/null
+++ b/cmd/pk1sign/pk1sign.gyp
@@ -0,0 +1,24 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pk1sign',
+ 'type': 'executable',
+ 'sources': [
+ 'pk1sign.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/pkix-errcodes/pkix-errcodes.gyp b/cmd/pkix-errcodes/pkix-errcodes.gyp
new file mode 100644
index 000000000..e305c07f8
--- /dev/null
+++ b/cmd/pkix-errcodes/pkix-errcodes.gyp
@@ -0,0 +1,24 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pkix-errcodes',
+ 'type': 'executable',
+ 'sources': [
+ 'pkix-errcodes.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/platlibs.gypi b/cmd/platlibs.gypi
new file mode 100644
index 000000000..5c3cc34e2
--- /dev/null
+++ b/cmd/platlibs.gypi
@@ -0,0 +1,78 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'variables': {
+ 'use_static_libs%': 0,
+ },
+ 'target_defaults': {
+ 'dependencies': [
+ '<(DEPTH)/cmd/lib/lib.gyp:sectool',
+ ],
+ 'conditions': [
+ ['moz_fold_libs==0', {
+ 'dependencies': [
+ '<(DEPTH)/lib/util/util.gyp:nssutil3',
+ ],
+ }],
+ ['<(use_static_libs)==1', {
+ 'defines': ['NSS_USE_STATIC_LIBS'],
+ 'dependencies': [
+ '<(DEPTH)/lib/smime/smime.gyp:smime',
+ '<(DEPTH)/lib/ssl/ssl.gyp:ssl',
+ '<(DEPTH)/lib/nss/nss.gyp:nss_static',
+ '<(DEPTH)/lib/pkcs12/pkcs12.gyp:pkcs12',
+ '<(DEPTH)/lib/pkcs7/pkcs7.gyp:pkcs7',
+ '<(DEPTH)/lib/certhigh/certhigh.gyp:certhi',
+ '<(DEPTH)/lib/cryptohi/cryptohi.gyp:cryptohi',
+ '<(DEPTH)/lib/pk11wrap/pk11wrap.gyp:pk11wrap',
+ '<(DEPTH)/lib/softoken/softoken.gyp:softokn',
+ '<(DEPTH)/lib/certdb/certdb.gyp:certdb',
+ '<(DEPTH)/lib/pki/pki.gyp:nsspki',
+ '<(DEPTH)/lib/dev/dev.gyp:nssdev',
+ '<(DEPTH)/lib/base/base.gyp:nssb',
+ '<(DEPTH)/lib/freebl/freebl.gyp:freebl',
+ '<(DEPTH)/lib/pk11wrap/pk11wrap.gyp:pk11wrap',
+ '<(DEPTH)/lib/certhigh/certhigh.gyp:certhi',
+ '<(DEPTH)/lib/sqlite/sqlite.gyp:sqlite3',
+ ],
+ 'conditions': [
+ [ 'disable_dbm==0', {
+ 'dependencies': [
+ '<(DEPTH)/lib/dbm/src/src.gyp:dbm',
+ '<(DEPTH)/lib/softoken/legacydb/legacydb.gyp:nssdbm',
+ ],
+ }],
+ [ 'disable_libpkix==0', {
+ 'dependencies': [
+ '<(DEPTH)/lib/libpkix/pkix/certsel/certsel.gyp:pkixcertsel',
+ '<(DEPTH)/lib/libpkix/pkix/checker/checker.gyp:pkixchecker',
+ '<(DEPTH)/lib/libpkix/pkix/params/params.gyp:pkixparams',
+ '<(DEPTH)/lib/libpkix/pkix/results/results.gyp:pkixresults',
+ '<(DEPTH)/lib/libpkix/pkix/top/top.gyp:pkixtop',
+ '<(DEPTH)/lib/libpkix/pkix/util/util.gyp:pkixutil',
+ '<(DEPTH)/lib/libpkix/pkix/crlsel/crlsel.gyp:pkixcrlsel',
+ '<(DEPTH)/lib/libpkix/pkix/store/store.gyp:pkixstore',
+ '<(DEPTH)/lib/libpkix/pkix_pl_nss/pki/pki.gyp:pkixpki',
+ '<(DEPTH)/lib/libpkix/pkix_pl_nss/system/system.gyp:pkixsystem',
+ '<(DEPTH)/lib/libpkix/pkix_pl_nss/module/module.gyp:pkixmodule'
+ ],
+ }],
+ ]},{ # !use_static_libs
+ 'conditions': [
+ ['moz_fold_libs==0', {
+ 'dependencies': [
+ '<(DEPTH)/lib/ssl/ssl.gyp:ssl3',
+ '<(DEPTH)/lib/smime/smime.gyp:smime3',
+ '<(DEPTH)/lib/nss/nss.gyp:nss3',
+ ],
+ }, {
+ 'libraries': [
+ '<(moz_folded_library_name)',
+ ],
+ }]
+ ],
+ }],
+ ],
+ }
+}
diff --git a/cmd/pp/pp.gyp b/cmd/pp/pp.gyp
new file mode 100644
index 000000000..c0fef6ac9
--- /dev/null
+++ b/cmd/pp/pp.gyp
@@ -0,0 +1,30 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pp',
+ 'type': 'executable',
+ 'sources': [
+ 'pp.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSPR20'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/pwdecrypt/pwdecrypt.gyp b/cmd/pwdecrypt/pwdecrypt.gyp
new file mode 100644
index 000000000..c3ae8eeb9
--- /dev/null
+++ b/cmd/pwdecrypt/pwdecrypt.gyp
@@ -0,0 +1,25 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pwdecrypt',
+ 'type': 'executable',
+ 'sources': [
+ 'pwdecrypt.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/rsaperf/rsaperf.gyp b/cmd/rsaperf/rsaperf.gyp
new file mode 100644
index 000000000..8ca4b4c50
--- /dev/null
+++ b/cmd/rsaperf/rsaperf.gyp
@@ -0,0 +1,36 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'rsaperf',
+ 'type': 'executable',
+ 'sources': [
+ 'defkey.c',
+ 'rsaperf.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/sqlite/sqlite.gyp:sqlite3'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'include_dirs': [
+ '../../nss/lib/softoken'
+ ],
+ 'defines': [
+ 'NSS_USE_STATIC_LIBS'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss',
+ 'use_static_libs': 1
+ }
+} \ No newline at end of file
diff --git a/cmd/sdrtest/sdrtest.gyp b/cmd/sdrtest/sdrtest.gyp
new file mode 100644
index 000000000..c544e17d8
--- /dev/null
+++ b/cmd/sdrtest/sdrtest.gyp
@@ -0,0 +1,25 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'sdrtest',
+ 'type': 'executable',
+ 'sources': [
+ 'sdrtest.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/selfserv/selfserv.gyp b/cmd/selfserv/selfserv.gyp
new file mode 100644
index 000000000..783be845e
--- /dev/null
+++ b/cmd/selfserv/selfserv.gyp
@@ -0,0 +1,30 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'selfserv',
+ 'type': 'executable',
+ 'sources': [
+ 'selfserv.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSPR20'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/shlibsign/mangle/mangle.gyp b/cmd/shlibsign/mangle/mangle.gyp
new file mode 100644
index 000000000..1dd5c10d7
--- /dev/null
+++ b/cmd/shlibsign/mangle/mangle.gyp
@@ -0,0 +1,31 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../coreconf/config.gypi',
+ '../../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'mangle',
+ 'type': 'executable',
+ 'sources': [
+ 'mangle.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'SHLIB_SUFFIX=\"<(dll_suffix)\"',
+ 'SHLIB_PREFIX=\"<(dll_prefix)\"'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss',
+ 'use_static_libs': 1
+ }
+} \ No newline at end of file
diff --git a/cmd/shlibsign/shlibsign.gyp b/cmd/shlibsign/shlibsign.gyp
new file mode 100644
index 000000000..75612c07a
--- /dev/null
+++ b/cmd/shlibsign/shlibsign.gyp
@@ -0,0 +1,30 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'shlibsign',
+ 'type': 'executable',
+ 'sources': [
+ 'shlibsign.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'SHLIB_SUFFIX=\"<(dll_suffix)\"',
+ 'SHLIB_PREFIX=\"<(dll_prefix)\"'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/signtool/signtool.gyp b/cmd/signtool/signtool.gyp
new file mode 100644
index 000000000..53465ac63
--- /dev/null
+++ b/cmd/signtool/signtool.gyp
@@ -0,0 +1,33 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'signtool',
+ 'type': 'executable',
+ 'sources': [
+ 'certgen.c',
+ 'javascript.c',
+ 'list.c',
+ 'sign.c',
+ 'signtool.c',
+ 'util.c',
+ 'verify.c',
+ 'zip.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/jar/jar.gyp:jar',
+ '<(DEPTH)/lib/zlib/zlib.gyp:nss_zlib'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+}
diff --git a/cmd/signver/signver.gyp b/cmd/signver/signver.gyp
new file mode 100644
index 000000000..9aeb50459
--- /dev/null
+++ b/cmd/signver/signver.gyp
@@ -0,0 +1,26 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'signver',
+ 'type': 'executable',
+ 'sources': [
+ 'pk7print.c',
+ 'signver.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/smimetools/smimetools.gyp b/cmd/smimetools/smimetools.gyp
new file mode 100644
index 000000000..13d3679f3
--- /dev/null
+++ b/cmd/smimetools/smimetools.gyp
@@ -0,0 +1,25 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'cmsutil',
+ 'type': 'executable',
+ 'sources': [
+ 'cmsutil.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/ssltap/ssltap.gyp b/cmd/ssltap/ssltap.gyp
new file mode 100644
index 000000000..9743ac262
--- /dev/null
+++ b/cmd/ssltap/ssltap.gyp
@@ -0,0 +1,25 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'ssltap',
+ 'type': 'executable',
+ 'sources': [
+ 'ssltap.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/strsclnt/strsclnt.gyp b/cmd/strsclnt/strsclnt.gyp
new file mode 100644
index 000000000..4093017bf
--- /dev/null
+++ b/cmd/strsclnt/strsclnt.gyp
@@ -0,0 +1,30 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'strsclnt',
+ 'type': 'executable',
+ 'sources': [
+ 'strsclnt.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSPR20'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/symkeyutil/symkeyutil.gyp b/cmd/symkeyutil/symkeyutil.gyp
new file mode 100644
index 000000000..c39be293e
--- /dev/null
+++ b/cmd/symkeyutil/symkeyutil.gyp
@@ -0,0 +1,30 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'symkeyutil',
+ 'type': 'executable',
+ 'sources': [
+ 'symkeyutil.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSPR20'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/tests/tests.gyp b/cmd/tests/tests.gyp
new file mode 100644
index 000000000..148bb250e
--- /dev/null
+++ b/cmd/tests/tests.gyp
@@ -0,0 +1,91 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'baddbdir',
+ 'type': 'executable',
+ 'sources': [
+ 'baddbdir.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ },
+ {
+ 'target_name': 'conflict',
+ 'type': 'executable',
+ 'sources': [
+ 'conflict.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ },
+ {
+ 'target_name': 'dertimetest',
+ 'type': 'executable',
+ 'sources': [
+ 'dertimetest.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ },
+ {
+ 'target_name': 'encodeinttest',
+ 'type': 'executable',
+ 'sources': [
+ 'encodeinttest.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ },
+ {
+ 'target_name': 'nonspr10',
+ 'type': 'executable',
+ 'sources': [
+ 'nonspr10.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ },
+ {
+ 'target_name': 'remtest',
+ 'type': 'executable',
+ 'sources': [
+ 'remtest.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ },
+ {
+ 'target_name': 'secmodtest',
+ 'type': 'executable',
+ 'sources': [
+ 'secmodtest.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/tstclnt/tstclnt.gyp b/cmd/tstclnt/tstclnt.gyp
new file mode 100644
index 000000000..81cbff3ed
--- /dev/null
+++ b/cmd/tstclnt/tstclnt.gyp
@@ -0,0 +1,31 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'tstclnt',
+ 'type': 'executable',
+ 'sources': [
+ 'tstclnt.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'DLL_PREFIX=\"<(dll_prefix)\"',
+ 'DLL_SUFFIX=\"<(dll_suffix)\"'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/vfychain/vfychain.gyp b/cmd/vfychain/vfychain.gyp
new file mode 100644
index 000000000..775ba1f05
--- /dev/null
+++ b/cmd/vfychain/vfychain.gyp
@@ -0,0 +1,30 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'vfychain',
+ 'type': 'executable',
+ 'sources': [
+ 'vfychain.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'DLL_PREFIX=\"<(dll_prefix)\"',
+ 'DLL_SUFFIX=\"<(dll_suffix)\"'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/cmd/vfyserv/vfyserv.gyp b/cmd/vfyserv/vfyserv.gyp
new file mode 100644
index 000000000..85001a1ec
--- /dev/null
+++ b/cmd/vfyserv/vfyserv.gyp
@@ -0,0 +1,32 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../../cmd/platlibs.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'vfyserv',
+ 'type': 'executable',
+ 'sources': [
+ 'vfyserv.c',
+ 'vfyutil.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'DLL_PREFIX=\"<(dll_prefix)\"',
+ 'DLL_SUFFIX=\"<(dll_suffix)\"'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/coreconf/check_cc_clang.py b/coreconf/check_cc_clang.py
new file mode 100644
index 000000000..4ae78210d
--- /dev/null
+++ b/coreconf/check_cc_clang.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+
+import os
+import subprocess
+
+def main():
+ cc = os.environ.get('CC', 'cc')
+ cc_is_clang = 'clang' in subprocess.check_output([cc, '--version'])
+ print int(cc_is_clang)
+
+if __name__ == '__main__':
+ main()
diff --git a/coreconf/config.gypi b/coreconf/config.gypi
new file mode 100644
index 000000000..85eaa07ef
--- /dev/null
+++ b/coreconf/config.gypi
@@ -0,0 +1,409 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'variables': {
+ 'module%': '',
+ 'variables': {
+ 'variables': {
+ 'variables': {
+ 'python%': 'python',
+ },
+ # chromium uses pymod_do_main, but gyp doesn't set a sensible
+ # Python sys.path (gyp_chromium does).
+ 'python%': '<(python)',
+ 'host_arch%': '<!(<(python) <(DEPTH)/coreconf/detect_host_arch.py)',
+ },
+ 'python%': '<(python)',
+ 'host_arch%': '<(host_arch)',
+ 'conditions': [
+ ['OS=="android"', {
+ 'target_arch%': 'arm',
+ }, {
+ # Default architecture we're building for is the architecture we're
+ # building on.
+ 'target_arch%': '<(host_arch)',
+ }],
+ ['OS=="win"', {
+ 'use_system_zlib%': 0,
+ 'nspr_libs%': ['nspr4.lib', 'plc4.lib', 'plds4.lib'],
+ #XXX: gyp breaks if these are empty!
+ 'nspr_lib_dir%': ' ',
+ 'nspr_include_dir%': ' ',
+ 'zlib_libs%': [],
+ #TODO
+ 'moz_debug_flags%': '',
+ 'dll_prefix': '',
+ 'dll_suffix': 'dll',
+ }, {
+ # On non-windows, default to a system NSPR.
+ 'nspr_libs%': ['-lplds4', '-lplc4', '-lnspr4'],
+ 'nspr_lib_dir%': '<!(<(python) <(DEPTH)/coreconf/nspr_lib_dir.py)',
+ 'nspr_include_dir%': '<!(<(python) <(DEPTH)/coreconf/nspr_include_dir.py)',
+ 'use_system_zlib%': 1,
+ }],
+ ['OS=="linux" or OS=="android"', {
+ 'zlib_libs%': ['<!@(<(python) <(DEPTH)/coreconf/pkg_config.py --libs zlib)'],
+ 'moz_debug_flags%': '-gdwarf-2',
+ 'optimize_flags%': '-O2',
+ 'dll_prefix': 'lib',
+ 'dll_suffix': 'so',
+ }],
+ ['OS=="mac"', {
+ 'zlib_libs%': ['-lz'],
+ 'use_system_sqlite%': 1,
+ 'moz_debug_flags%': '-gdwarf-2 -gfull',
+ 'optimize_flags%': '-O2',
+ 'dll_prefix': 'lib',
+ 'dll_suffix': 'dylib',
+ }, {
+ 'use_system_sqlite%': 0,
+ }],
+ ['"<(GENERATOR)"=="ninja"', {
+ 'cc_is_clang%': '<!(<(python) <(DEPTH)/coreconf/check_cc_clang.py)',
+ }, {
+ 'cc_is_clang%': '0',
+ }],
+ ],
+ },
+ # Copy conditionally-set variables out one scope.
+ 'python%': '<(python)',
+ 'host_arch%': '<(host_arch)',
+ 'target_arch%': '<(target_arch)',
+ 'use_system_zlib%': '<(use_system_zlib)',
+ 'zlib_libs%': ['<@(zlib_libs)'],
+ 'moz_debug_flags%': '<(moz_debug_flags)',
+ 'nspr_libs%': ['<@(nspr_libs)'],
+ 'nspr_lib_dir%': '<(nspr_lib_dir)',
+ 'nspr_include_dir%': '<(nspr_include_dir)',
+ 'use_system_sqlite%': '<(use_system_sqlite)',
+ 'sqlite_libs%': ['-lsqlite3'],
+ 'dll_prefix': '<(dll_prefix)',
+ 'dll_suffix': '<(dll_suffix)',
+ 'cc_is_clang%': '<(cc_is_clang)',
+ 'disable_tests%': 0,
+ 'disable_chachapoly%': 0,
+ 'disable_dbm%': 0,
+ 'disable_libpkix%': 0,
+ 'ssl_enable_zlib%': 1,
+ 'use_asan%': 0,
+ 'mozilla_client%': 0,
+ 'moz_fold_libs%': 0,
+ 'moz_folded_library_name%': '',
+ },
+ 'target_defaults': {
+ # Settings specific to targets should go here.
+ # This is mostly for linking to libraries.
+ 'variables': {
+ 'mapfile%': '',
+ },
+ 'include_dirs': [
+ '<(nspr_include_dir)',
+ '<(PRODUCT_DIR)/dist/<(module)/private',
+ ],
+ 'conditions': [
+ [ 'OS=="linux"', {
+ 'libraries': [
+ '-lpthread',
+ '-ldl',
+ '-lc',
+ ],
+ }],
+ ],
+ 'target_conditions': [
+ # mapfile handling
+ [ 'mapfile!=""', {
+ # Work around a gyp bug. Fixed upstream but not in Ubuntu packages:
+ # https://chromium.googlesource.com/external/gyp/+/b85ad3e578da830377dbc1843aa4fbc5af17a192%5E%21/
+ 'sources': [
+ '<(DEPTH)/coreconf/empty.c',
+ ],
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '-exported_symbols_list',
+ '<(INTERMEDIATE_DIR)/out.>(mapfile)',
+ ],
+ },
+ 'conditions': [
+ [ 'OS=="linux" or OS=="android"', {
+ 'ldflags': [
+ '-Wl,--version-script,<(INTERMEDIATE_DIR)/out.>(mapfile)',
+ ],
+ }],
+ [ 'OS=="win"', {
+ # On Windows, .def files are used directly as sources.
+ 'sources': [
+ '>(mapfile)',
+ ],
+ }, {
+ # On other platforms, .def files need processing.
+ 'sources': [
+ '<(INTERMEDIATE_DIR)/out.>(mapfile)',
+ ],
+ 'actions': [{
+ 'action_name': 'generate_mapfile',
+ 'inputs': [
+ '>(mapfile)',
+ ],
+ 'outputs': [
+ '<(INTERMEDIATE_DIR)/out.>(mapfile)',
+ ],
+ 'action': ['<@(process_map_file)'],
+ }],
+ }]
+ ],
+ }],
+ [ '_type=="shared_library" or _type=="executable"', {
+ 'libraries': [
+ '<@(nspr_libs)',
+ ],
+ 'library_dirs': [
+ '<(nspr_lib_dir)',
+ ],
+ }],
+ # Shared library specific settings.
+ [ '_type=="shared_library"', {
+ 'conditions': [
+ [ 'OS=="linux" or OS=="android"', {
+ 'ldflags': [
+ '-Wl,--gc-sections',
+ '-Wl,-z,defs',
+ ],
+ }],
+ ],
+ 'xcode_settings': {
+ 'DYLIB_INSTALL_NAME_BASE': '@executable_path',
+ 'DYLIB_COMPATIBILITY_VERSION': '1',
+ 'DYLIB_CURRENT_VERSION': '1',
+ 'OTHER_LDFLAGS': [
+ '-headerpad_max_install_names',
+ ],
+ },
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'SubSystem': '2',
+ },
+ },
+ }],
+ ],
+ 'default_configuration': 'Debug',
+ 'configurations': {
+ # Common settings for Debug+Release should go here.
+ 'Common_Base': {
+ 'abstract': 1,
+ 'defines': [
+ 'NSS_NO_INIT_SUPPORT',
+ 'USE_UTIL_DIRECTLY',
+ 'NO_NSPR_10_SUPPORT',
+ 'SSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES',
+ ],
+ 'msvs_configuration_attributes': {
+ 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
+ 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
+ },
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ 'AdditionalIncludeDirectories': ['<(nspr_include_dir)'],
+ },
+ },
+ 'xcode_settings': {
+ 'CLANG_CXX_LANGUAGE_STANDARD': 'c++0x',
+ 'OTHER_CFLAGS': [
+ '-fPIC',
+ '-fno-common',
+ '-pipe',
+ ],
+ # TODO:
+ # 'GCC_TREAT_WARNINGS_AS_ERRORS'
+ # 'WARNING_CFLAGS'
+ },
+ 'conditions': [
+ ['OS=="linux" or OS=="android"', {
+ 'defines': [
+ 'LINUX2_1',
+ 'LINUX',
+ 'linux',
+ 'HAVE_STRERROR',
+ 'XP_UNIX',
+ '_REENTRANT',
+ ],
+ 'cflags': [
+ '-fPIC',
+ '-pipe',
+ '-ffunction-sections',
+ '-fdata-sections',
+ '<(moz_debug_flags)',
+ ],
+ 'cflags_cc': [
+ '-std=c++0x',
+ ],
+ 'conditions': [
+
+ [ 'target_arch=="ia32"', {
+ 'cflags': ['-m32'],
+ 'ldflags': ['-m32'],
+ }],
+ [ 'target_arch=="x64"', {
+ 'cflags': ['-m64'],
+ 'ldflags': ['-m64'],
+ }],
+ ],
+ }],
+ [ 'OS=="android" and mozilla_client==0', {
+ 'defines': [
+ 'NO_SYSINFO',
+ 'NO_FORK_CHECK',
+ 'ANDROID',
+ ],
+ }],
+ [ 'OS=="mac"', {
+ 'defines': [
+ 'DARWIN',
+ 'HAVE_STRERROR',
+ 'HAVE_BSD_FLOCK',
+ 'XP_UNIX',
+ ],
+ 'conditions': [
+ [ 'target_arch=="ia32"', {
+ 'xcode_settings': {
+ 'ARCHS': ['i386'],
+ },
+ }],
+ [ 'target_arch=="x64"', {
+ 'xcode_settings': {
+ 'ARCHS': ['x86_64'],
+ },
+ }],
+ ],
+ }],
+ [ 'OS=="win"', {
+ 'defines': [
+ '_WINDOWS',
+ 'WIN95',
+ '_CRT_SECURE_NO_WARNINGS',
+ '_CRT_NONSTDC_NO_WARNINGS',
+ ],
+ 'cflags': [
+ '-W3',
+ ],
+ }],
+ [ 'disable_dbm==1', {
+ 'defines': [
+ 'NSS_DISABLE_DBM',
+ ],
+ }],
+ [ 'disable_libpkix==1', {
+ 'defines': [
+ 'NSS_DISABLE_LIBPKIX',
+ ],
+ }],
+ ],
+ },
+ # Common settings for x86 should go here.
+ 'x86_Base': {
+ 'abstract': 1,
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'MinimumRequiredVersion': '5.01', # XP.
+ 'TargetMachine': '1',
+ },
+ 'VCCLCompilerTool': {
+ 'PreprocessorDefinitions': [
+ 'WIN32',
+ ],
+ },
+ },
+ 'msvs_configuration_platform': 'Win32',
+ },
+ # Common settings for x86-64 should go here.
+ 'x64_Base': {
+ 'abstract': 1,
+ 'msvs_configuration_platform': 'x64',
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'TargetMachine': '17', # x86-64
+ },
+ 'VCCLCompilerTool': {
+ 'PreprocessorDefinitions': [
+ 'WIN64',
+ '_AMD64_',
+ ],
+ },
+ },
+ },
+ # Common settings for debug should go here.
+ 'Debug_Base': {
+ 'abstract': 1,
+ #TODO: DEBUG_$USER
+ 'defines': ['DEBUG'],
+ 'xcode_settings': {
+ 'COPY_PHASE_STRIP': 'NO',
+ 'GCC_OPTIMIZATION_LEVEL': '0',
+ },
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ 'Optimization': '0',
+ 'BasicRuntimeChecks': '3',
+ 'RuntimeLibrary': '2', # /MD
+ },
+ 'VCLinkerTool': {
+ 'LinkIncremental': '1',
+ },
+ 'VCResourceCompilerTool': {
+ 'PreprocessorDefinitions': ['DEBUG'],
+ },
+ },
+ },
+ # Common settings for release should go here.n
+ 'Release_Base': {
+ 'abstract': 1,
+ 'defines': [
+ 'NDEBUG',
+ ],
+ 'xcode_settings': {
+ 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
+ 'GCC_OPTIMIZATION_LEVEL': '2', # -O2
+ },
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ 'Optimization': '2', # /Os
+ 'RuntimeLibrary': '2', # /MD
+ },
+ 'VCLinkerTool': {
+ 'LinkIncremental': '1',
+ },
+ },
+ },
+ #
+ # Concrete configurations
+ #
+ # These configurations shouldn't have anything in them, it should
+ # all be derived from the _Base configurations above.
+ 'Debug': {
+ 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
+ },
+ 'Release': {
+ 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
+ },
+ # The gyp ninja backend requires these.
+ 'Debug_x64': {
+ 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
+ },
+ 'Release_x64': {
+ 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
+ },
+ },
+ },
+ 'conditions': [
+ [ 'OS=="linux" or OS=="android"', {
+ 'variables': {
+ 'process_map_file': ['/bin/sh', '-c', '/bin/grep -v ";-" >(mapfile) | sed -e "s,;+,," -e "s; DATA ;;" -e "s,;;,," -e "s,;.*,;," > >@(_outputs)'],
+ },
+ }],
+ [ 'OS=="mac"', {
+ 'variables': {
+ 'process_map_file': ['/bin/sh', '-c', '/usr/bin/grep -v ";+" >(mapfile) | grep -v ";-" | sed -e "s; DATA ;;" -e "s,;;,," -e "s,;.*,," -e "s,^,_," > >@(_outputs)'],
+ },
+ }],
+ ],
+}
diff --git a/coreconf/detect_host_arch.py b/coreconf/detect_host_arch.py
new file mode 100644
index 000000000..9820c85ae
--- /dev/null
+++ b/coreconf/detect_host_arch.py
@@ -0,0 +1,33 @@
+#!/usr/bin/env python
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+"""Outputs host CPU architecture in format recognized by gyp."""
+import platform
+import re
+
+def HostArch():
+ """Returns the host architecture with a predictable string."""
+ host_arch = platform.machine().lower()
+ # Convert machine type to format recognized by gyp.
+ if re.match(r'i.86', host_arch) or host_arch == 'i86pc':
+ host_arch = 'ia32'
+ elif host_arch in ['x86_64', 'amd64']:
+ host_arch = 'x64'
+ elif host_arch.startswith('arm'):
+ host_arch = 'arm'
+ elif host_arch.startswith('mips'):
+ host_arch = 'mips'
+ # platform.machine is based on running kernel. It's possible to use 64-bit
+ # kernel with 32-bit userland, e.g. to give linker slightly more memory.
+ # Distinguish between different userland bitness by querying
+ # the python binary.
+ if host_arch == 'x64' and platform.architecture()[0] == '32bit':
+ host_arch = 'ia32'
+ return host_arch
+def DoMain(_):
+ """Hook to be called from gyp without starting a separate python
+ interpreter."""
+ return HostArch()
+if __name__ == '__main__':
+ print DoMain([])
diff --git a/coreconf/empty.c b/coreconf/empty.c
new file mode 100644
index 000000000..a8cf976f7
--- /dev/null
+++ b/coreconf/empty.c
@@ -0,0 +1 @@
+/* This file is intentionally empty */
diff --git a/coreconf/nsinstall/nsinstall.gyp b/coreconf/nsinstall/nsinstall.gyp
new file mode 100644
index 000000000..efff6bcba
--- /dev/null
+++ b/coreconf/nsinstall/nsinstall.gyp
@@ -0,0 +1,21 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'nsinstall',
+ 'type': 'executable',
+ 'sources': [
+ 'nsinstall.c',
+ 'pathsub.c'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'coreconf'
+ }
+} \ No newline at end of file
diff --git a/coreconf/nspr_include_dir.py b/coreconf/nspr_include_dir.py
new file mode 100644
index 000000000..214521853
--- /dev/null
+++ b/coreconf/nspr_include_dir.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+
+import os
+import subprocess
+
+def main():
+ try:
+ for part in subprocess.Popen(['pkg-config', '--cflags', 'nspr'], stdout=subprocess.PIPE, stderr=open(os.devnull, 'wb')).communicate()[0].strip().split():
+ if part.startswith('-I'):
+ print part[2:]
+ return
+ except OSError:
+ # pkg-config is probably not installed
+ pass
+
+if __name__ == '__main__':
+ main()
diff --git a/coreconf/nspr_lib_dir.py b/coreconf/nspr_lib_dir.py
new file mode 100644
index 000000000..8926547aa
--- /dev/null
+++ b/coreconf/nspr_lib_dir.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+
+import os
+import subprocess
+
+def main():
+ try:
+ for part in subprocess.Popen(['pkg-config', '--libs', 'nspr'], stdout=subprocess.PIPE, stderr=open(os.devnull, 'wb')).communicate()[0].strip().split():
+ if part.startswith('-L'):
+ print part[2:]
+ return
+ except OSError:
+ # pkg-config is probably not installed
+ pass
+
+if __name__ == '__main__':
+ main()
diff --git a/coreconf/pkg_config.py b/coreconf/pkg_config.py
new file mode 100644
index 000000000..fef557298
--- /dev/null
+++ b/coreconf/pkg_config.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+
+import os
+import subprocess
+import sys
+
+def main():
+ try:
+ subprocess.Popen(['pkg-config'] + sys.argv[1:], stderr=open(os.devnull, 'wb')).wait()
+ except OSError:
+ # pkg-config is probably not installed
+ pass
+
+if __name__ == '__main__':
+ main()
diff --git a/exports.gyp b/exports.gyp
new file mode 100644
index 000000000..bb990a40b
--- /dev/null
+++ b/exports.gyp
@@ -0,0 +1,77 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ 'coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'nss_exports',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(PRODUCT_DIR)/dist/nss/public'
+ ]
+ },
+ 'dependencies': [
+ 'cmd/lib/exports.gyp:cmd_lib_exports',
+ 'lib/base/exports.gyp:lib_base_exports',
+ 'lib/certdb/exports.gyp:lib_certdb_exports',
+ 'lib/certhigh/exports.gyp:lib_certhigh_exports',
+ 'lib/ckfw/builtins/exports.gyp:lib_ckfw_builtins_exports',
+ 'lib/ckfw/exports.gyp:lib_ckfw_exports',
+ 'lib/crmf/exports.gyp:lib_crmf_exports',
+ 'lib/cryptohi/exports.gyp:lib_cryptohi_exports',
+ 'lib/dev/exports.gyp:lib_dev_exports',
+ 'lib/freebl/exports.gyp:lib_freebl_exports',
+ 'lib/jar/exports.gyp:lib_jar_exports',
+ 'lib/nss/exports.gyp:lib_nss_exports',
+ 'lib/pk11wrap/exports.gyp:lib_pk11wrap_exports',
+ 'lib/pkcs12/exports.gyp:lib_pkcs12_exports',
+ 'lib/pkcs7/exports.gyp:lib_pkcs7_exports',
+ 'lib/pki/exports.gyp:lib_pki_exports',
+ 'lib/smime/exports.gyp:lib_smime_exports',
+ 'lib/softoken/exports.gyp:lib_softoken_exports',
+ 'lib/sqlite/exports.gyp:lib_sqlite_exports',
+ 'lib/ssl/exports.gyp:lib_ssl_exports',
+ 'lib/util/exports.gyp:lib_util_exports',
+ 'lib/zlib/exports.gyp:lib_zlib_exports'
+ ],
+ 'conditions': [
+ [ 'disable_libpkix==0', {
+ 'dependencies': [
+ 'lib/libpkix/include/exports.gyp:lib_libpkix_include_exports',
+ 'lib/libpkix/pkix/certsel/exports.gyp:lib_libpkix_pkix_certsel_exports',
+ 'lib/libpkix/pkix/checker/exports.gyp:lib_libpkix_pkix_checker_exports',
+ 'lib/libpkix/pkix/crlsel/exports.gyp:lib_libpkix_pkix_crlsel_exports',
+ 'lib/libpkix/pkix/params/exports.gyp:lib_libpkix_pkix_params_exports',
+ 'lib/libpkix/pkix/results/exports.gyp:lib_libpkix_pkix_results_exports',
+ 'lib/libpkix/pkix/store/exports.gyp:lib_libpkix_pkix_store_exports',
+ 'lib/libpkix/pkix/top/exports.gyp:lib_libpkix_pkix_top_exports',
+ 'lib/libpkix/pkix/util/exports.gyp:lib_libpkix_pkix_util_exports',
+ 'lib/libpkix/pkix_pl_nss/module/exports.gyp:lib_libpkix_pkix_pl_nss_module_exports',
+ 'lib/libpkix/pkix_pl_nss/pki/exports.gyp:lib_libpkix_pkix_pl_nss_pki_exports',
+ 'lib/libpkix/pkix_pl_nss/system/exports.gyp:lib_libpkix_pkix_pl_nss_system_exports',
+ ],
+ }],
+ ],
+ },
+ {
+ 'target_name': 'dbm_exports',
+ 'type': 'none',
+ 'conditions': [
+ ['disable_dbm==0', {
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(PRODUCT_DIR)/dist/dbm/public'
+ ]
+ },
+ 'dependencies': [
+ 'lib/dbm/include/exports.gyp:lib_dbm_include_exports'
+ ],
+ }],
+ ],
+ }
+ ]
+}
diff --git a/external_tests/common/common.gyp b/external_tests/common/common.gyp
new file mode 100644
index 000000000..fa10aba20
--- /dev/null
+++ b/external_tests/common/common.gyp
@@ -0,0 +1,36 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ 'gtest.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'gtests',
+ 'type': 'executable',
+ 'sources': [
+ 'gtests.cc'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/nss/nss.gyp:nss3',
+ '<(DEPTH)/lib/util/util.gyp:nssutil3',
+ '<(DEPTH)/lib/smime/smime.gyp:smime3',
+ '<(DEPTH)/lib/ssl/ssl.gyp:ssl3',
+ '<(DEPTH)/external_tests/google_test/google_test.gyp:gtest',
+ '<(DEPTH)/cmd/lib/lib.gyp:sectool'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'include_dirs': [
+ '../../external_tests/google_test/gtest/include',
+ '../../external_tests/common'
+ ],
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+}
diff --git a/external_tests/common/gtest.gypi b/external_tests/common/gtest.gypi
new file mode 100644
index 000000000..6d30068d5
--- /dev/null
+++ b/external_tests/common/gtest.gypi
@@ -0,0 +1,30 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'target_defaults': {
+ 'conditions': [
+ ['OS=="win"', {
+ 'libraries': [
+ '-lws2_32',
+ ],
+ }],
+ ['OS=="android"', {
+ 'libraries': [
+ '-lstdc++',
+ ],
+ }],
+ ],
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ 'ExceptionHandling': 1,
+ 'PreprocessorDefinitions': [
+ 'NOMINMAX',
+ ],
+ },
+ },
+ },
+}
diff --git a/external_tests/der_gtest/der_gtest.gyp b/external_tests/der_gtest/der_gtest.gyp
new file mode 100644
index 000000000..6c2f5116f
--- /dev/null
+++ b/external_tests/der_gtest/der_gtest.gyp
@@ -0,0 +1,37 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../common/gtest.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'der_gtest',
+ 'type': 'executable',
+ 'sources': [
+ 'der_getint_unittest.cc',
+ '<(DEPTH)/external_tests/common/gtests.cc'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/nss/nss.gyp:nss3',
+ '<(DEPTH)/lib/util/util.gyp:nssutil3',
+ '<(DEPTH)/lib/smime/smime.gyp:smime3',
+ '<(DEPTH)/lib/ssl/ssl.gyp:ssl3',
+ '<(DEPTH)/external_tests/google_test/google_test.gyp:gtest',
+ '<(DEPTH)/cmd/lib/lib.gyp:sectool'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'include_dirs': [
+ '../../external_tests/google_test/gtest/include',
+ '../../external_tests/common'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+}
diff --git a/external_tests/google_test/google_test.gyp b/external_tests/google_test/google_test.gyp
new file mode 100644
index 000000000..e309ba25a
--- /dev/null
+++ b/external_tests/google_test/google_test.gyp
@@ -0,0 +1,59 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../common/gtest.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'gtest',
+ 'type': 'static_library',
+ 'sources': [
+ 'gtest/src/gtest-all.cc'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/lib/nss/nss.gyp:nss3',
+ '<(DEPTH)/lib/util/util.gyp:nssutil3',
+ '<(DEPTH)/lib/smime/smime.gyp:smime3',
+ '<(DEPTH)/lib/ssl/ssl.gyp:ssl3',
+ '<(DEPTH)/cmd/lib/lib.gyp:sectool'
+ ]
+ },
+ {
+ 'target_name': 'gtest1',
+ 'type': 'shared_library',
+ 'dependencies': [
+ 'gtest'
+ ],
+ # Work around a gyp bug. Fixed upstream in gyp:
+ # https://chromium.googlesource.com/external/gyp/+/93cc6e2c23e4d5ebd179f388e67aa907d0dfd43d
+ 'conditions': [
+ ['OS!="win"', {
+ 'libraries': [
+ '-lstdc++',
+ ],
+ }],
+ ],
+ # For some reason when just linking static libraries into
+ # a DLL the link fails without this.
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'AdditionalDependencies': [
+ '/DEFAULTLIB:MSVCRT',
+ ],
+ },
+ },
+ }
+ ],
+ 'target_defaults': {
+ 'include_dirs': [
+ 'gtest/include/',
+ 'gtest'
+ ],
+ },
+ 'variables': {
+ 'module': 'gtest'
+ }
+}
diff --git a/external_tests/nss_bogo_shim/nss_bogo_shim.gyp b/external_tests/nss_bogo_shim/nss_bogo_shim.gyp
new file mode 100644
index 000000000..c5f1ab34f
--- /dev/null
+++ b/external_tests/nss_bogo_shim/nss_bogo_shim.gyp
@@ -0,0 +1,79 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'nss_bogo_shim',
+ 'type': 'executable',
+ 'sources': [
+ 'config.cc',
+ 'nss_bogo_shim.cc',
+ 'nsskeys.cc'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/util/util.gyp:nssutil3',
+ '<(DEPTH)/lib/sqlite/sqlite.gyp:sqlite3',
+ '<(DEPTH)/external_tests/google_test/google_test.gyp:gtest',
+ '<(DEPTH)/lib/softoken/softoken.gyp:softokn',
+ '<(DEPTH)/lib/smime/smime.gyp:smime',
+ '<(DEPTH)/lib/ssl/ssl.gyp:ssl',
+ '<(DEPTH)/lib/nss/nss.gyp:nss_static',
+ '<(DEPTH)/cmd/lib/lib.gyp:sectool',
+ '<(DEPTH)/lib/pkcs12/pkcs12.gyp:pkcs12',
+ '<(DEPTH)/lib/pkcs7/pkcs7.gyp:pkcs7',
+ '<(DEPTH)/lib/certhigh/certhigh.gyp:certhi',
+ '<(DEPTH)/lib/cryptohi/cryptohi.gyp:cryptohi',
+ '<(DEPTH)/lib/pk11wrap/pk11wrap.gyp:pk11wrap',
+ '<(DEPTH)/lib/softoken/softoken.gyp:softokn',
+ '<(DEPTH)/lib/certdb/certdb.gyp:certdb',
+ '<(DEPTH)/lib/pki/pki.gyp:nsspki',
+ '<(DEPTH)/lib/dev/dev.gyp:nssdev',
+ '<(DEPTH)/lib/base/base.gyp:nssb',
+ '<(DEPTH)/lib/freebl/freebl.gyp:freebl',
+ '<(DEPTH)/lib/nss/nss.gyp:nss_static',
+ '<(DEPTH)/lib/pk11wrap/pk11wrap.gyp:pk11wrap',
+ '<(DEPTH)/lib/certhigh/certhigh.gyp:certhi',
+ '<(DEPTH)/lib/zlib/zlib.gyp:nss_zlib'
+ ],
+ 'conditions': [
+ [ 'disable_dbm==0', {
+ 'dependencies': [
+ '<(DEPTH)/lib/dbm/src/src.gyp:dbm',
+ ],
+ }],
+ [ 'disable_libpkix==0', {
+ 'dependencies': [
+ '<(DEPTH)/lib/libpkix/pkix/certsel/certsel.gyp:pkixcertsel',
+ '<(DEPTH)/lib/libpkix/pkix/checker/checker.gyp:pkixchecker',
+ '<(DEPTH)/lib/libpkix/pkix/crlsel/crlsel.gyp:pkixcrlsel',
+ '<(DEPTH)/lib/libpkix/pkix/params/params.gyp:pkixparams',
+ '<(DEPTH)/lib/libpkix/pkix/results/results.gyp:pkixresults',
+ '<(DEPTH)/lib/libpkix/pkix/store/store.gyp:pkixstore',
+ '<(DEPTH)/lib/libpkix/pkix/top/top.gyp:pkixtop',
+ '<(DEPTH)/lib/libpkix/pkix/util/util.gyp:pkixutil',
+ '<(DEPTH)/lib/libpkix/pkix_pl_nss/system/system.gyp:pkixsystem',
+ '<(DEPTH)/lib/libpkix/pkix_pl_nss/module/module.gyp:pkixmodule',
+ '<(DEPTH)/lib/libpkix/pkix_pl_nss/pki/pki.gyp:pkixpki',
+ ],
+ }],
+ ],
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSS_USE_STATIC_LIBS'
+ ],
+ 'include_dirs': [
+ '../../lib/ssl'
+ ],
+ },
+ 'variables': {
+ 'module': 'nss',
+ 'use_static_libs': 1
+ }
+}
diff --git a/external_tests/pk11_gtest/pk11_gtest.gyp b/external_tests/pk11_gtest/pk11_gtest.gyp
new file mode 100644
index 000000000..bd1abfc36
--- /dev/null
+++ b/external_tests/pk11_gtest/pk11_gtest.gyp
@@ -0,0 +1,41 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../common/gtest.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pk11_gtest',
+ 'type': 'executable',
+ 'sources': [
+ 'pk11_aeskeywrap_unittest.cc',
+ 'pk11_chacha20poly1305_unittest.cc',
+ 'pk11_pbkdf2_unittest.cc',
+ 'pk11_prf_unittest.cc',
+ 'pk11_rsapss_unittest.cc',
+ '<(DEPTH)/external_tests/common/gtests.cc'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/nss/nss.gyp:nss3',
+ '<(DEPTH)/lib/util/util.gyp:nssutil3',
+ '<(DEPTH)/lib/smime/smime.gyp:smime3',
+ '<(DEPTH)/lib/ssl/ssl.gyp:ssl3',
+ '<(DEPTH)/external_tests/google_test/google_test.gyp:gtest',
+ '<(DEPTH)/cmd/lib/lib.gyp:sectool'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'include_dirs': [
+ '../../external_tests/google_test/gtest/include',
+ '../../external_tests/common'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+}
diff --git a/external_tests/ssl_gtest/ssl_gtest.gyp b/external_tests/ssl_gtest/ssl_gtest.gyp
new file mode 100644
index 000000000..60f472fce
--- /dev/null
+++ b/external_tests/ssl_gtest/ssl_gtest.gyp
@@ -0,0 +1,100 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../common/gtest.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'ssl_gtest',
+ 'type': 'executable',
+ 'sources': [
+ 'libssl_internals.c',
+ 'ssl_agent_unittest.cc',
+ 'ssl_auth_unittest.cc',
+ 'ssl_ciphersuite_unittest.cc',
+ 'ssl_dhe_unittest.cc',
+ 'ssl_drop_unittest.cc',
+ 'ssl_ems_unittest.cc',
+ 'ssl_extension_unittest.cc',
+ 'ssl_gtest.cc',
+ 'ssl_loopback_unittest.cc',
+ 'ssl_resumption_unittest.cc',
+ 'ssl_skip_unittest.cc',
+ 'ssl_staticrsa_unittest.cc',
+ 'ssl_v2_client_hello_unittest.cc',
+ 'ssl_version_unittest.cc',
+ 'test_io.cc',
+ 'tls_agent.cc',
+ 'tls_connect.cc',
+ 'tls_filter.cc',
+ 'tls_hkdf_unittest.cc',
+ 'tls_parser.cc'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/util/util.gyp:nssutil3',
+ '<(DEPTH)/lib/sqlite/sqlite.gyp:sqlite3',
+ '<(DEPTH)/external_tests/google_test/google_test.gyp:gtest',
+ '<(DEPTH)/lib/softoken/softoken.gyp:softokn',
+ '<(DEPTH)/lib/smime/smime.gyp:smime',
+ '<(DEPTH)/lib/ssl/ssl.gyp:ssl',
+ '<(DEPTH)/lib/nss/nss.gyp:nss_static',
+ '<(DEPTH)/cmd/lib/lib.gyp:sectool',
+ '<(DEPTH)/lib/pkcs12/pkcs12.gyp:pkcs12',
+ '<(DEPTH)/lib/pkcs7/pkcs7.gyp:pkcs7',
+ '<(DEPTH)/lib/certhigh/certhigh.gyp:certhi',
+ '<(DEPTH)/lib/cryptohi/cryptohi.gyp:cryptohi',
+ '<(DEPTH)/lib/pk11wrap/pk11wrap.gyp:pk11wrap',
+ '<(DEPTH)/lib/softoken/softoken.gyp:softokn',
+ '<(DEPTH)/lib/certdb/certdb.gyp:certdb',
+ '<(DEPTH)/lib/pki/pki.gyp:nsspki',
+ '<(DEPTH)/lib/dev/dev.gyp:nssdev',
+ '<(DEPTH)/lib/base/base.gyp:nssb',
+ '<(DEPTH)/lib/freebl/freebl.gyp:freebl',
+ '<(DEPTH)/lib/nss/nss.gyp:nss_static',
+ '<(DEPTH)/lib/pk11wrap/pk11wrap.gyp:pk11wrap',
+ '<(DEPTH)/lib/certhigh/certhigh.gyp:certhi',
+ '<(DEPTH)/lib/zlib/zlib.gyp:nss_zlib'
+ ],
+ 'conditions': [
+ [ 'disable_dbm==0', {
+ 'dependencies': [
+ '<(DEPTH)/lib/dbm/src/src.gyp:dbm',
+ ],
+ }],
+ [ 'disable_libpkix==0', {
+ 'dependencies': [
+ '<(DEPTH)/lib/libpkix/pkix/certsel/certsel.gyp:pkixcertsel',
+ '<(DEPTH)/lib/libpkix/pkix/checker/checker.gyp:pkixchecker',
+ '<(DEPTH)/lib/libpkix/pkix/crlsel/crlsel.gyp:pkixcrlsel',
+ '<(DEPTH)/lib/libpkix/pkix/params/params.gyp:pkixparams',
+ '<(DEPTH)/lib/libpkix/pkix/results/results.gyp:pkixresults',
+ '<(DEPTH)/lib/libpkix/pkix/store/store.gyp:pkixstore',
+ '<(DEPTH)/lib/libpkix/pkix/top/top.gyp:pkixtop',
+ '<(DEPTH)/lib/libpkix/pkix/util/util.gyp:pkixutil',
+ '<(DEPTH)/lib/libpkix/pkix_pl_nss/system/system.gyp:pkixsystem',
+ '<(DEPTH)/lib/libpkix/pkix_pl_nss/module/module.gyp:pkixmodule',
+ '<(DEPTH)/lib/libpkix/pkix_pl_nss/pki/pki.gyp:pkixpki',
+ ],
+ }],
+ ],
+ }
+ ],
+ 'target_defaults': {
+ 'include_dirs': [
+ '../../external_tests/google_test/gtest/include',
+ '../../external_tests/common',
+ '../../lib/ssl'
+ ],
+ 'defines': [
+ 'NSS_USE_STATIC_LIBS'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss',
+ 'use_static_libs': 1
+ }
+}
diff --git a/external_tests/util_gtest/util_gtest.gyp b/external_tests/util_gtest/util_gtest.gyp
new file mode 100644
index 000000000..e10840a17
--- /dev/null
+++ b/external_tests/util_gtest/util_gtest.gyp
@@ -0,0 +1,39 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi',
+ '../common/gtest.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'util_gtest',
+ 'type': 'executable',
+ 'sources': [
+ 'util_utf8_unittest.cc',
+ '<(DEPTH)/external_tests/common/gtests.cc'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/nss/nss.gyp:nss3',
+ '<(DEPTH)/lib/util/util.gyp:nssutil3',
+ '<(DEPTH)/lib/smime/smime.gyp:smime3',
+ '<(DEPTH)/lib/ssl/ssl.gyp:ssl3',
+ '<(DEPTH)/external_tests/google_test/google_test.gyp:gtest',
+ '<(DEPTH)/lib/util/util.gyp:nssutil',
+ '<(DEPTH)/cmd/lib/lib.gyp:sectool'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'include_dirs': [
+ '../../external_tests/google_test/gtest/include',
+ '../../external_tests/common',
+ '../../lib/util'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+}
diff --git a/lib/base/base.gyp b/lib/base/base.gyp
new file mode 100644
index 000000000..42318c897
--- /dev/null
+++ b/lib/base/base.gyp
@@ -0,0 +1,32 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'nssb',
+ 'type': 'static_library',
+ 'sources': [
+ 'arena.c',
+ 'error.c',
+ 'errorval.c',
+ 'hash.c',
+ 'hashops.c',
+ 'item.c',
+ 'libc.c',
+ 'list.c',
+ 'tracker.c',
+ 'utf8.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/base/exports.gyp b/lib/base/exports.gyp
new file mode 100644
index 000000000..0ae38b9eb
--- /dev/null
+++ b/lib/base/exports.gyp
@@ -0,0 +1,33 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_base_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'nssbase.h',
+ 'nssbaset.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/public'
+ },
+ {
+ 'files': [
+ 'base.h',
+ 'baset.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/certdb/certdb.gyp b/lib/certdb/certdb.gyp
new file mode 100644
index 000000000..673d56da3
--- /dev/null
+++ b/lib/certdb/certdb.gyp
@@ -0,0 +1,34 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'certdb',
+ 'type': 'static_library',
+ 'sources': [
+ 'alg1485.c',
+ 'certdb.c',
+ 'certv3.c',
+ 'certxutl.c',
+ 'crl.c',
+ 'genname.c',
+ 'polcyxtn.c',
+ 'secname.c',
+ 'stanpcertdb.c',
+ 'xauthkid.c',
+ 'xbsconst.c',
+ 'xconst.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/certdb/exports.gyp b/lib/certdb/exports.gyp
new file mode 100644
index 000000000..cba5fabdb
--- /dev/null
+++ b/lib/certdb/exports.gyp
@@ -0,0 +1,36 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_certdb_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'cert.h',
+ 'certdb.h',
+ 'certt.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/public'
+ },
+ {
+ 'files': [
+ 'certi.h',
+ 'certxutl.h',
+ 'genname.h',
+ 'xconst.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/certhigh/certhigh.gyp b/lib/certhigh/certhigh.gyp
new file mode 100644
index 000000000..5817c3eb5
--- /dev/null
+++ b/lib/certhigh/certhigh.gyp
@@ -0,0 +1,31 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'certhi',
+ 'type': 'static_library',
+ 'sources': [
+ 'certhigh.c',
+ 'certhtml.c',
+ 'certreq.c',
+ 'certvfy.c',
+ 'certvfypkix.c',
+ 'crlv2.c',
+ 'ocsp.c',
+ 'ocspsig.c',
+ 'xcrldist.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/certhigh/exports.gyp b/lib/certhigh/exports.gyp
new file mode 100644
index 000000000..6ed6c6e88
--- /dev/null
+++ b/lib/certhigh/exports.gyp
@@ -0,0 +1,33 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_certhigh_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'ocsp.h',
+ 'ocspt.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/public'
+ },
+ {
+ 'files': [
+ 'ocspi.h',
+ 'ocspti.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/ckfw/builtins/builtins.gyp b/lib/ckfw/builtins/builtins.gyp
new file mode 100644
index 000000000..d85442585
--- /dev/null
+++ b/lib/ckfw/builtins/builtins.gyp
@@ -0,0 +1,61 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'nssckbi',
+ 'type': 'shared_library',
+ 'sources': [
+ 'anchor.c',
+ 'bfind.c',
+ 'binst.c',
+ 'bobject.c',
+ 'bsession.c',
+ 'bslot.c',
+ 'btoken.c',
+ 'ckbiver.c',
+ 'constants.c',
+ '<(INTERMEDIATE_DIR)/certdata.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/ckfw/ckfw.gyp:nssckfw',
+ '<(DEPTH)/lib/base/base.gyp:nssb'
+ ],
+ 'actions': [
+ {
+ 'msvs_cygwin_shell': 0,
+ 'action': [
+ 'perl',
+ 'certdata.perl',
+ 'certdata.txt',
+ '<@(_outputs)',
+ ],
+ 'inputs': [
+ 'certdata.perl',
+ 'certdata.txt'
+ ],
+ 'outputs': [
+ '<(INTERMEDIATE_DIR)/certdata.c'
+ ],
+ 'action_name': 'generate_certdata_c'
+ }
+ ],
+ 'variables': {
+ 'mapfile': 'nssckbi.def'
+ }
+ }
+ ],
+ 'target_defaults': {
+ 'include_dirs': [
+ '.'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss',
+ }
+}
diff --git a/lib/ckfw/builtins/exports.gyp b/lib/ckfw/builtins/exports.gyp
new file mode 100644
index 000000000..d56e61fa9
--- /dev/null
+++ b/lib/ckfw/builtins/exports.gyp
@@ -0,0 +1,25 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_ckfw_builtins_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'nssckbi.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/public'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/ckfw/ckfw.gyp b/lib/ckfw/ckfw.gyp
new file mode 100644
index 000000000..40da8d856
--- /dev/null
+++ b/lib/ckfw/ckfw.gyp
@@ -0,0 +1,34 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'nssckfw',
+ 'type': 'static_library',
+ 'sources': [
+ 'crypto.c',
+ 'find.c',
+ 'hash.c',
+ 'instance.c',
+ 'mechanism.c',
+ 'mutex.c',
+ 'object.c',
+ 'session.c',
+ 'sessobj.c',
+ 'slot.c',
+ 'token.c',
+ 'wrap.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/ckfw/exports.gyp b/lib/ckfw/exports.gyp
new file mode 100644
index 000000000..93b4d18e0
--- /dev/null
+++ b/lib/ckfw/exports.gyp
@@ -0,0 +1,44 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_ckfw_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'nssck.api',
+ 'nssckepv.h',
+ 'nssckft.h',
+ 'nssckfw.h',
+ 'nssckfwc.h',
+ 'nssckfwt.h',
+ 'nssckg.h',
+ 'nssckmdt.h',
+ 'nssckt.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/public'
+ },
+ {
+ 'files': [
+ 'ck.h',
+ 'ckfw.h',
+ 'ckfwm.h',
+ 'ckfwtm.h',
+ 'ckmd.h',
+ 'ckt.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/crmf/crmf.gyp b/lib/crmf/crmf.gyp
new file mode 100644
index 000000000..651018c9a
--- /dev/null
+++ b/lib/crmf/crmf.gyp
@@ -0,0 +1,39 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'crmf',
+ 'type': 'static_library',
+ 'sources': [
+ 'asn1cmn.c',
+ 'challcli.c',
+ 'cmmfasn1.c',
+ 'cmmfchal.c',
+ 'cmmfrec.c',
+ 'cmmfresp.c',
+ 'crmfcont.c',
+ 'crmfdec.c',
+ 'crmfenc.c',
+ 'crmfget.c',
+ 'crmfpop.c',
+ 'crmfreq.c',
+ 'crmftmpl.c',
+ 'encutil.c',
+ 'respcli.c',
+ 'respcmn.c',
+ 'servget.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/crmf/exports.gyp b/lib/crmf/exports.gyp
new file mode 100644
index 000000000..c42845e1d
--- /dev/null
+++ b/lib/crmf/exports.gyp
@@ -0,0 +1,37 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_crmf_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'cmmf.h',
+ 'cmmft.h',
+ 'crmf.h',
+ 'crmft.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/public'
+ },
+ {
+ 'files': [
+ 'cmmfi.h',
+ 'cmmfit.h',
+ 'crmfi.h',
+ 'crmfit.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/cryptohi/cryptohi.gyp b/lib/cryptohi/cryptohi.gyp
new file mode 100644
index 000000000..ef9e63fbf
--- /dev/null
+++ b/lib/cryptohi/cryptohi.gyp
@@ -0,0 +1,27 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'cryptohi',
+ 'type': 'static_library',
+ 'sources': [
+ 'dsautil.c',
+ 'sechash.c',
+ 'seckey.c',
+ 'secsign.c',
+ 'secvfy.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/cryptohi/exports.gyp b/lib/cryptohi/exports.gyp
new file mode 100644
index 000000000..277a6284e
--- /dev/null
+++ b/lib/cryptohi/exports.gyp
@@ -0,0 +1,37 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'variables': {
+ 'module': 'nss'
+ },
+ 'targets': [
+ {
+ 'target_name': 'lib_cryptohi_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'cryptohi.h',
+ 'cryptoht.h',
+ 'key.h',
+ 'keyhi.h',
+ 'keyt.h',
+ 'keythi.h',
+ 'sechash.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/public'
+ },
+ {
+ 'files': [
+ 'keyi.h',
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+}
diff --git a/lib/dbm/include/exports.gyp b/lib/dbm/include/exports.gyp
new file mode 100644
index 000000000..6bf58ac04
--- /dev/null
+++ b/lib/dbm/include/exports.gyp
@@ -0,0 +1,38 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_dbm_include_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'mcom_db.h',
+ 'ncompat.h',
+ 'winfile.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/public'
+ },
+ {
+ 'files': [
+ 'extern.h',
+ 'hash.h',
+ 'hsearch.h',
+ 'page.h',
+ 'queue.h',
+ 'search.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'dbm'
+ }
+} \ No newline at end of file
diff --git a/lib/dbm/include/include.gyp b/lib/dbm/include/include.gyp
new file mode 100644
index 000000000..69f9c883d
--- /dev/null
+++ b/lib/dbm/include/include.gyp
@@ -0,0 +1,12 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../coreconf/config.gypi'
+ ],
+ 'targets': [],
+ 'variables': {
+ 'module': 'dbm'
+ }
+} \ No newline at end of file
diff --git a/lib/dbm/src/src.gyp b/lib/dbm/src/src.gyp
new file mode 100644
index 000000000..a84755e60
--- /dev/null
+++ b/lib/dbm/src/src.gyp
@@ -0,0 +1,40 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'dbm',
+ 'type': 'static_library',
+ 'sources': [
+ 'db.c',
+ 'dirent.c',
+ 'h_bigkey.c',
+ 'h_func.c',
+ 'h_log2.c',
+ 'h_page.c',
+ 'hash.c',
+ 'hash_buf.c',
+ 'mktemp.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'STDC_HEADERS',
+ 'HAVE_STRERROR',
+ 'HAVE_SNPRINTF',
+ 'MEMMOVE',
+ '__DBINTERFACE_PRIVATE'
+ ]
+ },
+ 'variables': {
+ 'module': 'dbm'
+ }
+} \ No newline at end of file
diff --git a/lib/dev/dev.gyp b/lib/dev/dev.gyp
new file mode 100644
index 000000000..dfa8f7e3e
--- /dev/null
+++ b/lib/dev/dev.gyp
@@ -0,0 +1,26 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'nssdev',
+ 'type': 'static_library',
+ 'sources': [
+ 'ckhelper.c',
+ 'devslot.c',
+ 'devtoken.c',
+ 'devutil.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/dev/exports.gyp b/lib/dev/exports.gyp
new file mode 100644
index 000000000..9f9cb5c36
--- /dev/null
+++ b/lib/dev/exports.gyp
@@ -0,0 +1,31 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_dev_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'ckhelper.h',
+ 'dev.h',
+ 'devm.h',
+ 'devt.h',
+ 'devtm.h',
+ 'nssdev.h',
+ 'nssdevt.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/freebl/exports.gyp b/lib/freebl/exports.gyp
new file mode 100644
index 000000000..1e09d7327
--- /dev/null
+++ b/lib/freebl/exports.gyp
@@ -0,0 +1,48 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_freebl_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'blapit.h',
+ 'ecl/ecl-exp.h',
+ 'shsign.h'
+ ],
+ 'conditions': [
+ [ 'OS=="linux"', {
+ 'files': [
+ 'nsslowhash.h',
+ ],
+ }],
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/public'
+ },
+ {
+ 'files': [
+ 'alghmac.h',
+ 'blapi.h',
+ 'chacha20poly1305.h',
+ 'ec.h',
+ 'ecl/ecl-curve.h',
+ 'ecl/ecl.h',
+ 'hmacct.h',
+ 'secmpi.h',
+ 'secrng.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+}
diff --git a/lib/freebl/freebl.gyp b/lib/freebl/freebl.gyp
new file mode 100644
index 000000000..231148fec
--- /dev/null
+++ b/lib/freebl/freebl.gyp
@@ -0,0 +1,393 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'intel-gcm-wrap_c_lib',
+ 'type': 'static_library',
+ 'sources': [
+ 'intel-gcm-wrap.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ],
+ 'cflags': [
+ '-mssse3'
+ ],
+ 'cflags_mozilla': [
+ '-mssse3'
+ ]
+ },
+ {
+ 'target_name': 'freebl',
+ 'type': 'static_library',
+ 'sources': [
+ 'loader.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ },
+ {
+ 'target_name': '<(freebl_name)',
+ 'type': 'shared_library',
+ 'sources': [
+ 'aeskeywrap.c',
+ 'alg2268.c',
+ 'alghmac.c',
+ 'arcfive.c',
+ 'arcfour.c',
+ 'camellia.c',
+ 'chacha20poly1305.c',
+ 'ctr.c',
+ 'cts.c',
+ 'des.c',
+ 'desblapi.c',
+ 'dh.c',
+ 'drbg.c',
+ 'dsa.c',
+ 'ec.c',
+ 'ecdecode.c',
+ 'ecl/ec_naf.c',
+ 'ecl/ecl.c',
+ 'ecl/ecl_curve.c',
+ 'ecl/ecl_gf.c',
+ 'ecl/ecl_mult.c',
+ 'ecl/ecp_25519.c',
+ 'ecl/ecp_256.c',
+ 'ecl/ecp_256_32.c',
+ 'ecl/ecp_384.c',
+ 'ecl/ecp_521.c',
+ 'ecl/ecp_aff.c',
+ 'ecl/ecp_jac.c',
+ 'ecl/ecp_jm.c',
+ 'ecl/ecp_mont.c',
+ 'fipsfreebl.c',
+ 'freeblver.c',
+ 'gcm.c',
+ 'hmacct.c',
+ 'jpake.c',
+ 'ldvector.c',
+ 'md2.c',
+ 'md5.c',
+ 'mpi/mp_gf2m.c',
+ 'mpi/mpcpucache.c',
+ 'mpi/mpi.c',
+ 'mpi/mplogic.c',
+ 'mpi/mpmontg.c',
+ 'mpi/mpprime.c',
+ 'pqg.c',
+ 'rawhash.c',
+ 'rijndael.c',
+ 'rsa.c',
+ 'rsapkcs.c',
+ 'seed.c',
+ 'sha512.c',
+ 'sha_fast.c',
+ 'shvfy.c',
+ 'sysrand.c',
+ 'tlsprfalg.c'
+ ],
+ 'conditions': [
+ [ 'OS=="linux"', {
+ 'sources': [
+ 'nsslowhash.c',
+ 'stubs.c',
+ ],
+ 'conditions': [
+ [ 'target_arch=="x64"', {
+ 'sources': [
+ 'arcfour-amd64-gas.s',
+ 'intel-aes.s',
+ 'intel-gcm.s',
+ 'mpi/mpi_amd64.c',
+ 'mpi/mpi_amd64_gas.s',
+ 'mpi/mp_comba.c',
+ ],
+ 'dependencies': [
+ 'intel-gcm-wrap_c_lib',
+ ],
+ 'conditions': [
+ [ 'cc_is_clang==1', {
+ 'cflags': [
+ '-no-integrated-as',
+ ],
+ 'cflags_mozilla': [
+ '-no-integrated-as',
+ ],
+ 'asflags_mozilla': [
+ '-no-integrated-as',
+ ],
+ }],
+ ],
+ }],
+ [ 'target_arch=="ia32"', {
+ 'sources': [
+ 'mpi/mpi_x86.s',
+ ],
+ }],
+ [ 'target_arch=="arm"', {
+ 'sources': [
+ 'mpi/mpi_arm.c',
+ ],
+ }],
+ ],
+ }, {
+ # not Linux
+ 'conditions': [
+ [ 'moz_fold_libs==0', {
+ 'dependencies': [
+ '../util/util.gyp:nssutil3',
+ ],
+ }, {
+ 'libraries': [
+ '<(moz_folded_library_name)',
+ ],
+ }],
+ ],
+ }],
+ [ 'OS=="win"', {
+ 'sources': [
+ #TODO: building with mingw should not need this.
+ 'ecl/uint128.c',
+ #TODO: clang-cl needs -msse3 here
+ 'intel-gcm-wrap.c',
+ ],
+ 'libraries': [
+ 'advapi32.lib',
+ ],
+ 'conditions': [
+ [ 'target_arch=="x64"', {
+ 'sources': [
+ 'arcfour-amd64-masm.asm',
+ 'mpi/mpi_amd64.c',
+ 'mpi/mpi_amd64_masm.asm',
+ 'mpi/mp_comba_amd64_masm.asm',
+ 'intel-aes-x64-masm.asm',
+ 'intel-gcm-x64-masm.asm',
+ ],
+ }, {
+ # not x64
+ 'sources': [
+ 'mpi/mpi_x86_asm.c',
+ 'intel-aes-x86-masm.asm',
+ 'intel-gcm-x86-masm.asm',
+ ],
+ }],
+ ],
+ }],
+ ['target_arch=="ia32" or target_arch=="x64"', {
+ 'sources': [
+ # All intel architectures get the 64 bit version
+ 'ecl/curve25519_64.c',
+ ],
+ }, {
+ 'sources': [
+ # All non intel architectures get the generic 32 bit implementation (slow!)
+ 'ecl/curve25519_32.c',
+ ],
+ }],
+ #TODO uint128.c
+ [ 'disable_chachapoly==0', {
+ 'conditions': [
+ [ 'OS!="win" and target_arch=="x64"', {
+ 'sources': [
+ 'chacha20_vec.c',
+ 'poly1305-donna-x64-sse2-incremental-source.c',
+ ],
+ }, {
+ # not x64
+ 'sources': [
+ 'chacha20.c',
+ 'poly1305.c',
+ ],
+ }],
+ ],
+ }],
+ [ 'OS=="mac"', {
+ 'conditions': [
+ [ 'target_arch=="ia32"', {
+ 'sources': [
+ 'mpi/mpi_sse2.s',
+ ],
+ 'defines': [
+ 'MP_USE_UINT_DIGIT',
+ 'MP_ASSEMBLY_MULTIPLY',
+ 'MP_ASSEMBLY_SQUARE',
+ 'MP_ASSEMBLY_DIV_2DX1D',
+ ],
+ }],
+ ],
+ }],
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ ],
+ 'variables': {
+ 'conditions': [
+ [ 'OS=="linux"', {
+ 'mapfile': 'freebl_hash_vector.def',
+ }, {
+ 'mapfile': 'freebl.def',
+ }],
+ ]
+ },
+ 'ldflags': [
+ '-Wl,-Bsymbolic'
+ ]
+ },
+ ],
+ 'conditions': [
+ [ 'OS=="linux"', {
+ # stub build
+ 'targets': [
+ {
+ 'target_name': 'freebl3',
+ 'type': 'shared_library',
+ 'sources': [
+ 'lowhash_vector.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ],
+ 'variables': {
+ 'mapfile': 'freebl_hash.def'
+ }
+ },
+ ],
+ }],
+ ],
+ 'target_defaults': {
+ 'include_dirs': [
+ 'mpi',
+ 'ecl'
+ ],
+ 'defines': [
+ 'SHLIB_SUFFIX=\"<(dll_suffix)\"',
+ 'SHLIB_PREFIX=\"<(dll_prefix)\"',
+ 'SHLIB_VERSION=\"3\"',
+ 'SOFTOKEN_SHLIB_VERSION=\"3\"',
+ 'RIJNDAEL_INCLUDE_TABLES',
+ 'MP_API_COMPATIBLE'
+ ],
+ 'conditions': [
+ [ 'OS=="win"', {
+ 'configurations': {
+ 'x86_Base': {
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ #TODO: -Ox optimize flags
+ 'PreprocessorDefinitions': [
+ 'NSS_X86_OR_X64',
+ 'NSS_X86',
+ 'MP_ASSEMBLY_MULTIPLY',
+ 'MP_ASSEMBLY_SQUARE',
+ 'MP_ASSEMBLY_DIV_2DX1D',
+ 'MP_USE_UINT_DIGIT',
+ 'MP_NO_MP_WORD',
+ 'USE_HW_AES',
+ 'INTEL_GCM',
+ ],
+ },
+ },
+ },
+ 'x64_Base': {
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ #TODO: -Ox optimize flags
+ 'PreprocessorDefinitions': [
+ 'NSS_USE_64',
+ 'NSS_X86_OR_X64',
+ 'NSS_X64',
+ 'MP_IS_LITTLE_ENDIAN',
+ 'NSS_BEVAND_ARCFOUR',
+ 'MPI_AMD64',
+ 'MP_ASSEMBLY_MULTIPLY',
+ 'NSS_USE_COMBA',
+ 'USE_HW_AES',
+ 'INTEL_GCM',
+ ],
+ },
+ },
+ },
+ },
+ }, {
+ 'conditions': [
+ [ 'target_arch=="x64"', {
+ 'defines': [
+ 'NSS_USE_64',
+ 'NSS_X86_OR_X64',
+ 'NSS_X64',
+ # The Makefile does version-tests on GCC, but we're not doing that here.
+ 'HAVE_INT128_SUPPORT',
+ ],
+ }, {
+ 'sources': [
+ 'ecl/uint128.c',
+ ],
+ }],
+ [ 'target_arch=="ia32"', {
+ 'defines': [
+ 'NSS_X86_OR_X64',
+ 'NSS_X86',
+ ],
+ }],
+ ],
+ }],
+ [ 'OS=="linux"', {
+ 'defines': [
+ 'FREEBL_NO_DEPEND',
+ 'FREEBL_LOWHASH',
+ ],
+ 'conditions': [
+ [ 'target_arch=="x64"', {
+ 'defines': [
+ 'MP_IS_LITTLE_ENDIAN',
+ 'NSS_BEVAND_ARCFOUR',
+ 'MPI_AMD64',
+ 'MP_ASSEMBLY_MULTIPLY',
+ 'NSS_USE_COMBA',
+ 'USE_HW_AES',
+ 'INTEL_GCM',
+ ],
+ }],
+ [ 'target_arch=="ia32"', {
+ 'defines': [
+ 'MP_IS_LITTLE_ENDIAN',
+ 'MP_ASSEMBLY_MULTIPLY',
+ 'MP_ASSEMBLY_SQUARE',
+ 'MP_ASSEMBLY_DIV_2DX1D',
+ 'MP_USE_UINT_DIGIT',
+ ],
+ }],
+ [ 'target_arch=="arm"', {
+ 'defines': [
+ 'MP_ASSEMBLY_MULTIPLY',
+ 'MP_ASSEMBLY_SQUARE',
+ 'MP_USE_UINT_DIGIT',
+ 'SHA_NO_LONG_LONG',
+ ],
+ }],
+ ],
+ }],
+ [ 'OS=="mac"', {
+ }],
+ [ 'OS=="win"', {
+ }],
+ ],
+ },
+ 'variables': {
+ 'module': 'nss',
+ 'conditions': [
+ [ 'OS=="linux"', {
+ 'freebl_name': 'freeblpriv3',
+ }, {
+ 'freebl_name': 'freebl3',
+ }],
+ ],
+ }
+}
diff --git a/lib/jar/exports.gyp b/lib/jar/exports.gyp
new file mode 100644
index 000000000..01f268b3e
--- /dev/null
+++ b/lib/jar/exports.gyp
@@ -0,0 +1,27 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_jar_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'jar-ds.h',
+ 'jar.h',
+ 'jarfile.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/public'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/jar/jar.gyp b/lib/jar/jar.gyp
new file mode 100644
index 000000000..e38b4ab99
--- /dev/null
+++ b/lib/jar/jar.gyp
@@ -0,0 +1,76 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'jar',
+ 'type': 'static_library',
+ 'sources': [
+ 'jar-ds.c',
+ 'jar.c',
+ 'jarfile.c',
+ 'jarint.c',
+ 'jarsign.c',
+ 'jarver.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'MOZILLA_CLIENT=1',
+ ],
+ 'conditions': [
+ [ 'OS=="win"', {
+ 'configurations': {
+ 'x86_Base': {
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ 'PreprocessorDefinitions': [
+ 'NSS_X86_OR_X64',
+ 'NSS_X86',
+ ],
+ },
+ },
+ },
+ 'x64_Base': {
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ 'PreprocessorDefinitions': [
+ 'NSS_USE_64',
+ 'NSS_X86_OR_X64',
+ 'NSS_X64',
+ ],
+ },
+ },
+ },
+ },
+ }, {
+ 'conditions': [
+ [ 'target_arch=="x64"', {
+ 'defines': [
+ 'NSS_USE_64',
+ 'NSS_X86_OR_X64',
+ 'NSS_X64',
+ ],
+ }],
+ [ 'target_arch=="ia32"', {
+ 'defines': [
+ 'NSS_X86_OR_X64',
+ 'NSS_X86',
+ ],
+ }],
+ ],
+ }],
+ ],
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+}
diff --git a/lib/libpkix/include/exports.gyp b/lib/libpkix/include/exports.gyp
new file mode 100644
index 000000000..7262de41d
--- /dev/null
+++ b/lib/libpkix/include/exports.gyp
@@ -0,0 +1,38 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_libpkix_include_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'pkix.h',
+ 'pkix_certsel.h',
+ 'pkix_certstore.h',
+ 'pkix_checker.h',
+ 'pkix_crlsel.h',
+ 'pkix_errorstrings.h',
+ 'pkix_params.h',
+ 'pkix_pl_pki.h',
+ 'pkix_pl_system.h',
+ 'pkix_results.h',
+ 'pkix_revchecker.h',
+ 'pkix_sample_modules.h',
+ 'pkix_util.h',
+ 'pkixt.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/include/include.gyp b/lib/libpkix/include/include.gyp
new file mode 100644
index 000000000..c43501591
--- /dev/null
+++ b/lib/libpkix/include/include.gyp
@@ -0,0 +1,12 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../coreconf/config.gypi'
+ ],
+ 'targets': [],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix/certsel/certsel.gyp b/lib/libpkix/pkix/certsel/certsel.gyp
new file mode 100644
index 000000000..a7ff65ce7
--- /dev/null
+++ b/lib/libpkix/pkix/certsel/certsel.gyp
@@ -0,0 +1,24 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pkixcertsel',
+ 'type': 'static_library',
+ 'sources': [
+ 'pkix_certselector.c',
+ 'pkix_comcertselparams.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix/certsel/exports.gyp b/lib/libpkix/pkix/certsel/exports.gyp
new file mode 100644
index 000000000..0fe0ff69c
--- /dev/null
+++ b/lib/libpkix/pkix/certsel/exports.gyp
@@ -0,0 +1,26 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_libpkix_pkix_certsel_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'pkix_certselector.h',
+ 'pkix_comcertselparams.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix/checker/checker.gyp b/lib/libpkix/pkix/checker/checker.gyp
new file mode 100644
index 000000000..ac260fc24
--- /dev/null
+++ b/lib/libpkix/pkix/checker/checker.gyp
@@ -0,0 +1,35 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pkixchecker',
+ 'type': 'static_library',
+ 'sources': [
+ 'pkix_basicconstraintschecker.c',
+ 'pkix_certchainchecker.c',
+ 'pkix_crlchecker.c',
+ 'pkix_ekuchecker.c',
+ 'pkix_expirationchecker.c',
+ 'pkix_namechainingchecker.c',
+ 'pkix_nameconstraintschecker.c',
+ 'pkix_ocspchecker.c',
+ 'pkix_policychecker.c',
+ 'pkix_revocationchecker.c',
+ 'pkix_revocationmethod.c',
+ 'pkix_signaturechecker.c',
+ 'pkix_targetcertchecker.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix/checker/exports.gyp b/lib/libpkix/pkix/checker/exports.gyp
new file mode 100644
index 000000000..15ed261fa
--- /dev/null
+++ b/lib/libpkix/pkix/checker/exports.gyp
@@ -0,0 +1,37 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_libpkix_pkix_checker_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'pkix_basicconstraintschecker.h',
+ 'pkix_certchainchecker.h',
+ 'pkix_crlchecker.h',
+ 'pkix_ekuchecker.h',
+ 'pkix_expirationchecker.h',
+ 'pkix_namechainingchecker.h',
+ 'pkix_nameconstraintschecker.h',
+ 'pkix_ocspchecker.h',
+ 'pkix_policychecker.h',
+ 'pkix_revocationchecker.h',
+ 'pkix_revocationmethod.h',
+ 'pkix_signaturechecker.h',
+ 'pkix_targetcertchecker.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix/crlsel/crlsel.gyp b/lib/libpkix/pkix/crlsel/crlsel.gyp
new file mode 100644
index 000000000..894569ef6
--- /dev/null
+++ b/lib/libpkix/pkix/crlsel/crlsel.gyp
@@ -0,0 +1,24 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pkixcrlsel',
+ 'type': 'static_library',
+ 'sources': [
+ 'pkix_comcrlselparams.c',
+ 'pkix_crlselector.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix/crlsel/exports.gyp b/lib/libpkix/pkix/crlsel/exports.gyp
new file mode 100644
index 000000000..2c1deb826
--- /dev/null
+++ b/lib/libpkix/pkix/crlsel/exports.gyp
@@ -0,0 +1,26 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_libpkix_pkix_crlsel_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'pkix_comcrlselparams.h',
+ 'pkix_crlselector.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix/params/exports.gyp b/lib/libpkix/pkix/params/exports.gyp
new file mode 100644
index 000000000..e42d1431f
--- /dev/null
+++ b/lib/libpkix/pkix/params/exports.gyp
@@ -0,0 +1,28 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_libpkix_pkix_params_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'pkix_procparams.h',
+ 'pkix_resourcelimits.h',
+ 'pkix_trustanchor.h',
+ 'pkix_valparams.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix/params/params.gyp b/lib/libpkix/pkix/params/params.gyp
new file mode 100644
index 000000000..a1463c4c7
--- /dev/null
+++ b/lib/libpkix/pkix/params/params.gyp
@@ -0,0 +1,26 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pkixparams',
+ 'type': 'static_library',
+ 'sources': [
+ 'pkix_procparams.c',
+ 'pkix_resourcelimits.c',
+ 'pkix_trustanchor.c',
+ 'pkix_valparams.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix/results/exports.gyp b/lib/libpkix/pkix/results/exports.gyp
new file mode 100644
index 000000000..3fb5228e8
--- /dev/null
+++ b/lib/libpkix/pkix/results/exports.gyp
@@ -0,0 +1,28 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_libpkix_pkix_results_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'pkix_buildresult.h',
+ 'pkix_policynode.h',
+ 'pkix_valresult.h',
+ 'pkix_verifynode.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix/results/results.gyp b/lib/libpkix/pkix/results/results.gyp
new file mode 100644
index 000000000..962fdb948
--- /dev/null
+++ b/lib/libpkix/pkix/results/results.gyp
@@ -0,0 +1,26 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pkixresults',
+ 'type': 'static_library',
+ 'sources': [
+ 'pkix_buildresult.c',
+ 'pkix_policynode.c',
+ 'pkix_valresult.c',
+ 'pkix_verifynode.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix/store/exports.gyp b/lib/libpkix/pkix/store/exports.gyp
new file mode 100644
index 000000000..38f4ab089
--- /dev/null
+++ b/lib/libpkix/pkix/store/exports.gyp
@@ -0,0 +1,25 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_libpkix_pkix_store_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'pkix_store.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix/store/store.gyp b/lib/libpkix/pkix/store/store.gyp
new file mode 100644
index 000000000..43aa17768
--- /dev/null
+++ b/lib/libpkix/pkix/store/store.gyp
@@ -0,0 +1,23 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pkixstore',
+ 'type': 'static_library',
+ 'sources': [
+ 'pkix_store.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix/top/exports.gyp b/lib/libpkix/pkix/top/exports.gyp
new file mode 100644
index 000000000..114afcbf9
--- /dev/null
+++ b/lib/libpkix/pkix/top/exports.gyp
@@ -0,0 +1,27 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_libpkix_pkix_top_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'pkix_build.h',
+ 'pkix_lifecycle.h',
+ 'pkix_validate.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix/top/top.gyp b/lib/libpkix/pkix/top/top.gyp
new file mode 100644
index 000000000..fb1b08ecb
--- /dev/null
+++ b/lib/libpkix/pkix/top/top.gyp
@@ -0,0 +1,25 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pkixtop',
+ 'type': 'static_library',
+ 'sources': [
+ 'pkix_build.c',
+ 'pkix_lifecycle.c',
+ 'pkix_validate.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix/util/exports.gyp b/lib/libpkix/pkix/util/exports.gyp
new file mode 100644
index 000000000..23db76575
--- /dev/null
+++ b/lib/libpkix/pkix/util/exports.gyp
@@ -0,0 +1,28 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_libpkix_pkix_util_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'pkix_error.h',
+ 'pkix_list.h',
+ 'pkix_logger.h',
+ 'pkix_tools.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix/util/util.gyp b/lib/libpkix/pkix/util/util.gyp
new file mode 100644
index 000000000..078852f52
--- /dev/null
+++ b/lib/libpkix/pkix/util/util.gyp
@@ -0,0 +1,27 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pkixutil',
+ 'type': 'static_library',
+ 'sources': [
+ 'pkix_error.c',
+ 'pkix_errpaths.c',
+ 'pkix_list.c',
+ 'pkix_logger.c',
+ 'pkix_tools.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix_pl_nss/module/exports.gyp b/lib/libpkix/pkix_pl_nss/module/exports.gyp
new file mode 100644
index 000000000..a91701a8a
--- /dev/null
+++ b/lib/libpkix/pkix_pl_nss/module/exports.gyp
@@ -0,0 +1,36 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_libpkix_pkix_pl_nss_module_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'pkix_pl_aiamgr.h',
+ 'pkix_pl_colcertstore.h',
+ 'pkix_pl_httpcertstore.h',
+ 'pkix_pl_httpdefaultclient.h',
+ 'pkix_pl_ldapcertstore.h',
+ 'pkix_pl_ldapdefaultclient.h',
+ 'pkix_pl_ldaprequest.h',
+ 'pkix_pl_ldapresponse.h',
+ 'pkix_pl_ldapt.h',
+ 'pkix_pl_nsscontext.h',
+ 'pkix_pl_pk11certstore.h',
+ 'pkix_pl_socket.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix_pl_nss/module/module.gyp b/lib/libpkix/pkix_pl_nss/module/module.gyp
new file mode 100644
index 000000000..8d7459ded
--- /dev/null
+++ b/lib/libpkix/pkix_pl_nss/module/module.gyp
@@ -0,0 +1,41 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pkixmodule',
+ 'type': 'static_library',
+ 'sources': [
+ 'pkix_pl_aiamgr.c',
+ 'pkix_pl_colcertstore.c',
+ 'pkix_pl_httpcertstore.c',
+ 'pkix_pl_httpdefaultclient.c',
+ 'pkix_pl_ldapcertstore.c',
+ 'pkix_pl_ldapdefaultclient.c',
+ 'pkix_pl_ldaprequest.c',
+ 'pkix_pl_ldapresponse.c',
+ 'pkix_pl_ldaptemplates.c',
+ 'pkix_pl_nsscontext.c',
+ 'pkix_pl_pk11certstore.c',
+ 'pkix_pl_socket.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'SHLIB_SUFFIX=\"<(dll_suffix)\"',
+ 'SHLIB_PREFIX=\"<(dll_prefix)\"',
+ 'SHLIB_VERSION=\"\"'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix_pl_nss/pki/exports.gyp b/lib/libpkix/pkix_pl_nss/pki/exports.gyp
new file mode 100644
index 000000000..bfbeea241
--- /dev/null
+++ b/lib/libpkix/pkix_pl_nss/pki/exports.gyp
@@ -0,0 +1,41 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_libpkix_pkix_pl_nss_pki_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'pkix_pl_basicconstraints.h',
+ 'pkix_pl_cert.h',
+ 'pkix_pl_certpolicyinfo.h',
+ 'pkix_pl_certpolicymap.h',
+ 'pkix_pl_certpolicyqualifier.h',
+ 'pkix_pl_crl.h',
+ 'pkix_pl_crldp.h',
+ 'pkix_pl_crlentry.h',
+ 'pkix_pl_date.h',
+ 'pkix_pl_generalname.h',
+ 'pkix_pl_infoaccess.h',
+ 'pkix_pl_nameconstraints.h',
+ 'pkix_pl_ocspcertid.h',
+ 'pkix_pl_ocsprequest.h',
+ 'pkix_pl_ocspresponse.h',
+ 'pkix_pl_publickey.h',
+ 'pkix_pl_x500name.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix_pl_nss/pki/pki.gyp b/lib/libpkix/pkix_pl_nss/pki/pki.gyp
new file mode 100644
index 000000000..af7730c0b
--- /dev/null
+++ b/lib/libpkix/pkix_pl_nss/pki/pki.gyp
@@ -0,0 +1,39 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pkixpki',
+ 'type': 'static_library',
+ 'sources': [
+ 'pkix_pl_basicconstraints.c',
+ 'pkix_pl_cert.c',
+ 'pkix_pl_certpolicyinfo.c',
+ 'pkix_pl_certpolicymap.c',
+ 'pkix_pl_certpolicyqualifier.c',
+ 'pkix_pl_crl.c',
+ 'pkix_pl_crldp.c',
+ 'pkix_pl_crlentry.c',
+ 'pkix_pl_date.c',
+ 'pkix_pl_generalname.c',
+ 'pkix_pl_infoaccess.c',
+ 'pkix_pl_nameconstraints.c',
+ 'pkix_pl_ocspcertid.c',
+ 'pkix_pl_ocsprequest.c',
+ 'pkix_pl_ocspresponse.c',
+ 'pkix_pl_publickey.c',
+ 'pkix_pl_x500name.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix_pl_nss/system/exports.gyp b/lib/libpkix/pkix_pl_nss/system/exports.gyp
new file mode 100644
index 000000000..d17383621
--- /dev/null
+++ b/lib/libpkix/pkix_pl_nss/system/exports.gyp
@@ -0,0 +1,37 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_libpkix_pkix_pl_nss_system_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'pkix_pl_bigint.h',
+ 'pkix_pl_bytearray.h',
+ 'pkix_pl_common.h',
+ 'pkix_pl_hashtable.h',
+ 'pkix_pl_lifecycle.h',
+ 'pkix_pl_mem.h',
+ 'pkix_pl_monitorlock.h',
+ 'pkix_pl_mutex.h',
+ 'pkix_pl_object.h',
+ 'pkix_pl_oid.h',
+ 'pkix_pl_primhash.h',
+ 'pkix_pl_rwlock.h',
+ 'pkix_pl_string.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/libpkix/pkix_pl_nss/system/system.gyp b/lib/libpkix/pkix_pl_nss/system/system.gyp
new file mode 100644
index 000000000..32daec93d
--- /dev/null
+++ b/lib/libpkix/pkix_pl_nss/system/system.gyp
@@ -0,0 +1,36 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pkixsystem',
+ 'type': 'static_library',
+ 'sources': [
+ 'pkix_pl_bigint.c',
+ 'pkix_pl_bytearray.c',
+ 'pkix_pl_common.c',
+ 'pkix_pl_error.c',
+ 'pkix_pl_hashtable.c',
+ 'pkix_pl_lifecycle.c',
+ 'pkix_pl_mem.c',
+ 'pkix_pl_monitorlock.c',
+ 'pkix_pl_mutex.c',
+ 'pkix_pl_object.c',
+ 'pkix_pl_oid.c',
+ 'pkix_pl_primhash.c',
+ 'pkix_pl_rwlock.c',
+ 'pkix_pl_string.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/nss/exports.gyp b/lib/nss/exports.gyp
new file mode 100644
index 000000000..49e0368e6
--- /dev/null
+++ b/lib/nss/exports.gyp
@@ -0,0 +1,32 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_nss_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'nss.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/public'
+ },
+ {
+ 'files': [
+ 'nssoptions.h',
+ 'nssrenam.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/nss/nss.gyp b/lib/nss/nss.gyp
new file mode 100644
index 000000000..56984d9f1
--- /dev/null
+++ b/lib/nss/nss.gyp
@@ -0,0 +1,83 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'nss_static',
+ 'type': 'static_library',
+ 'sources': [
+ 'nssinit.c',
+ 'nssoptions.c',
+ 'nssver.c',
+ 'utilwrap.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ ]
+ },
+ {
+ # This is here so Firefox can link this without having to
+ # repeat the list of dependencies.
+ 'target_name': 'nss3_deps',
+ 'type': 'none',
+ 'dependencies': [
+ 'nss_static',
+ '<(DEPTH)/lib/certhigh/certhigh.gyp:certhi',
+ '<(DEPTH)/lib/cryptohi/cryptohi.gyp:cryptohi',
+ '<(DEPTH)/lib/pk11wrap/pk11wrap.gyp:pk11wrap',
+ '<(DEPTH)/lib/certdb/certdb.gyp:certdb',
+ '<(DEPTH)/lib/pki/pki.gyp:nsspki',
+ '<(DEPTH)/lib/dev/dev.gyp:nssdev',
+ '<(DEPTH)/lib/base/base.gyp:nssb',
+ ],
+ 'conditions': [
+ [ 'disable_libpkix==0', {
+ 'dependencies': [
+ '<(DEPTH)/lib/libpkix/pkix/certsel/certsel.gyp:pkixcertsel',
+ '<(DEPTH)/lib/libpkix/pkix/checker/checker.gyp:pkixchecker',
+ '<(DEPTH)/lib/libpkix/pkix/params/params.gyp:pkixparams',
+ '<(DEPTH)/lib/libpkix/pkix/results/results.gyp:pkixresults',
+ '<(DEPTH)/lib/libpkix/pkix/top/top.gyp:pkixtop',
+ '<(DEPTH)/lib/libpkix/pkix/util/util.gyp:pkixutil',
+ '<(DEPTH)/lib/libpkix/pkix/crlsel/crlsel.gyp:pkixcrlsel',
+ '<(DEPTH)/lib/libpkix/pkix/store/store.gyp:pkixstore',
+ '<(DEPTH)/lib/libpkix/pkix_pl_nss/pki/pki.gyp:pkixpki',
+ '<(DEPTH)/lib/libpkix/pkix_pl_nss/system/system.gyp:pkixsystem',
+ '<(DEPTH)/lib/libpkix/pkix_pl_nss/module/module.gyp:pkixmodule'
+ ],
+ }],
+ ],
+ },
+ {
+ 'target_name': 'nss3',
+ 'type': 'shared_library',
+ 'dependencies': [
+ 'nss3_deps',
+ '<(DEPTH)/lib/util/util.gyp:nssutil3',
+ ],
+ 'variables': {
+ 'mapfile': 'nss.def'
+ }
+ }
+ ],
+ 'conditions': [
+ [ 'moz_fold_libs==1', {
+ 'targets': [
+ {
+ 'target_name': 'nss3_static',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'nss3_deps',
+ ],
+ }
+ ],
+ }],
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+}
diff --git a/lib/pk11wrap/exports.gyp b/lib/pk11wrap/exports.gyp
new file mode 100644
index 000000000..3b72a6bb0
--- /dev/null
+++ b/lib/pk11wrap/exports.gyp
@@ -0,0 +1,39 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_pk11wrap_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'pk11func.h',
+ 'pk11pqg.h',
+ 'pk11priv.h',
+ 'pk11pub.h',
+ 'pk11sdr.h',
+ 'secmod.h',
+ 'secmodt.h',
+ 'secpkcs5.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/public'
+ },
+ {
+ 'files': [
+ 'dev3hack.h',
+ 'secmodi.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/pk11wrap/pk11wrap.gyp b/lib/pk11wrap/pk11wrap.gyp
new file mode 100644
index 000000000..2af27a052
--- /dev/null
+++ b/lib/pk11wrap/pk11wrap.gyp
@@ -0,0 +1,51 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pk11wrap',
+ 'type': 'static_library',
+ 'sources': [
+ 'dev3hack.c',
+ 'pk11akey.c',
+ 'pk11auth.c',
+ 'pk11cert.c',
+ 'pk11cxt.c',
+ 'pk11err.c',
+ 'pk11kea.c',
+ 'pk11list.c',
+ 'pk11load.c',
+ 'pk11mech.c',
+ 'pk11merge.c',
+ 'pk11nobj.c',
+ 'pk11obj.c',
+ 'pk11pars.c',
+ 'pk11pbe.c',
+ 'pk11pk12.c',
+ 'pk11pqg.c',
+ 'pk11sdr.c',
+ 'pk11skey.c',
+ 'pk11slot.c',
+ 'pk11util.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'SHLIB_SUFFIX=\"<(dll_suffix)\"',
+ 'SHLIB_PREFIX=\"<(dll_prefix)\"',
+ 'SHLIB_VERSION=\"3\"',
+ 'SOFTOKEN_SHLIB_VERSION=\"3\"'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/pkcs12/exports.gyp b/lib/pkcs12/exports.gyp
new file mode 100644
index 000000000..69193b0f7
--- /dev/null
+++ b/lib/pkcs12/exports.gyp
@@ -0,0 +1,29 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_pkcs12_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'p12.h',
+ 'p12plcy.h',
+ 'p12t.h',
+ 'pkcs12.h',
+ 'pkcs12t.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/public'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/pkcs12/pkcs12.gyp b/lib/pkcs12/pkcs12.gyp
new file mode 100644
index 000000000..5b296cc56
--- /dev/null
+++ b/lib/pkcs12/pkcs12.gyp
@@ -0,0 +1,29 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pkcs12',
+ 'type': 'static_library',
+ 'sources': [
+ 'p12creat.c',
+ 'p12d.c',
+ 'p12dec.c',
+ 'p12e.c',
+ 'p12local.c',
+ 'p12plcy.c',
+ 'p12tmpl.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/pkcs7/exports.gyp b/lib/pkcs7/exports.gyp
new file mode 100644
index 000000000..3f8e602ed
--- /dev/null
+++ b/lib/pkcs7/exports.gyp
@@ -0,0 +1,33 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_pkcs7_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'pkcs7t.h',
+ 'secmime.h',
+ 'secpkcs7.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/public'
+ },
+ {
+ 'files': [
+ 'p7local.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/pkcs7/pkcs7.gyp b/lib/pkcs7/pkcs7.gyp
new file mode 100644
index 000000000..8a73a2934
--- /dev/null
+++ b/lib/pkcs7/pkcs7.gyp
@@ -0,0 +1,29 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pkcs7',
+ 'type': 'static_library',
+ 'sources': [
+ 'certread.c',
+ 'p7common.c',
+ 'p7create.c',
+ 'p7decode.c',
+ 'p7encode.c',
+ 'p7local.c',
+ 'secmime.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/pki/exports.gyp b/lib/pki/exports.gyp
new file mode 100644
index 000000000..eae6e03df
--- /dev/null
+++ b/lib/pki/exports.gyp
@@ -0,0 +1,32 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_pki_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'nsspki.h',
+ 'nsspkit.h',
+ 'pki.h',
+ 'pki3hack.h',
+ 'pkim.h',
+ 'pkistore.h',
+ 'pkit.h',
+ 'pkitm.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/pki/pki.gyp b/lib/pki/pki.gyp
new file mode 100644
index 000000000..c3475dfb1
--- /dev/null
+++ b/lib/pki/pki.gyp
@@ -0,0 +1,32 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'nsspki',
+ 'type': 'static_library',
+ 'sources': [
+ 'asymmkey.c',
+ 'certdecode.c',
+ 'certificate.c',
+ 'cryptocontext.c',
+ 'pki3hack.c',
+ 'pkibase.c',
+ 'pkistore.c',
+ 'symmkey.c',
+ 'tdcache.c',
+ 'trustdomain.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/smime/exports.gyp b/lib/smime/exports.gyp
new file mode 100644
index 000000000..7bda22a9e
--- /dev/null
+++ b/lib/smime/exports.gyp
@@ -0,0 +1,34 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_smime_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'cms.h',
+ 'cmsreclist.h',
+ 'cmst.h',
+ 'smime.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/public'
+ },
+ {
+ 'files': [
+ 'cmslocal.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/smime/smime.gyp b/lib/smime/smime.gyp
new file mode 100644
index 000000000..fa74cd946
--- /dev/null
+++ b/lib/smime/smime.gyp
@@ -0,0 +1,80 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'smime',
+ 'type': 'static_library',
+ 'sources': [
+ 'cmsarray.c',
+ 'cmsasn1.c',
+ 'cmsattr.c',
+ 'cmscinfo.c',
+ 'cmscipher.c',
+ 'cmsdecode.c',
+ 'cmsdigdata.c',
+ 'cmsdigest.c',
+ 'cmsencdata.c',
+ 'cmsencode.c',
+ 'cmsenvdata.c',
+ 'cmsmessage.c',
+ 'cmspubkey.c',
+ 'cmsrecinfo.c',
+ 'cmsreclist.c',
+ 'cmssigdata.c',
+ 'cmssiginfo.c',
+ 'cmsudf.c',
+ 'cmsutil.c',
+ 'smimemessage.c',
+ 'smimeutil.c',
+ 'smimever.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ ]
+ },
+ {
+ # This is here so Firefox can link this without having to
+ # repeat the list of dependencies.
+ 'target_name': 'smime3_deps',
+ 'type': 'none',
+ 'dependencies': [
+ 'smime',
+ '<(DEPTH)/lib/pkcs12/pkcs12.gyp:pkcs12',
+ '<(DEPTH)/lib/pkcs7/pkcs7.gyp:pkcs7'
+ ],
+ },
+ {
+ 'target_name': 'smime3',
+ 'type': 'shared_library',
+ 'dependencies': [
+ 'smime3_deps',
+ '<(DEPTH)/lib/nss/nss.gyp:nss3',
+ '<(DEPTH)/lib/util/util.gyp:nssutil3'
+ ],
+ 'variables': {
+ 'mapfile': 'smime.def'
+ }
+ }
+ ],
+ 'conditions': [
+ [ 'moz_fold_libs==1', {
+ 'targets': [
+ {
+ 'target_name': 'smime3_static',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'smime3_deps',
+ ],
+ }
+ ],
+ }],
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+}
diff --git a/lib/softoken/exports.gyp b/lib/softoken/exports.gyp
new file mode 100644
index 000000000..909a713ac
--- /dev/null
+++ b/lib/softoken/exports.gyp
@@ -0,0 +1,38 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_softoken_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'lowkeyi.h',
+ 'lowkeyti.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/public'
+ },
+ {
+ 'files': [
+ 'lgglue.h',
+ 'pkcs11ni.h',
+ 'sdb.h',
+ 'sftkdbt.h',
+ 'softkver.h',
+ 'softoken.h',
+ 'softoknt.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/softoken/legacydb/legacydb.gyp b/lib/softoken/legacydb/legacydb.gyp
new file mode 100644
index 000000000..6431fb5c1
--- /dev/null
+++ b/lib/softoken/legacydb/legacydb.gyp
@@ -0,0 +1,66 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'nssdbm',
+ 'type': 'static_library',
+ 'sources': [
+ 'dbmshim.c',
+ 'keydb.c',
+ 'lgattr.c',
+ 'lgcreate.c',
+ 'lgdestroy.c',
+ 'lgfind.c',
+ 'lgfips.c',
+ 'lginit.c',
+ 'lgutil.c',
+ 'lowcert.c',
+ 'lowkey.c',
+ 'pcertdb.c',
+ 'pk11db.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:dbm_exports',
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/freebl/freebl.gyp:freebl',
+ '<(DEPTH)/lib/dbm/src/src.gyp:dbm'
+ ]
+ },
+ {
+ 'target_name': 'nssdbm3',
+ 'type': 'shared_library',
+ 'dependencies': [
+ 'nssdbm'
+ ],
+ 'conditions': [
+ [ 'moz_fold_libs==0', {
+ 'dependencies': [
+ '<(DEPTH)/lib/util/util.gyp:nssutil3',
+ ],
+ }, {
+ 'libraries': [
+ '<(moz_folded_library_name)',
+ ],
+ }],
+ ],
+ 'variables': {
+ 'mapfile': 'nssdbm.def'
+ }
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'SHLIB_SUFFIX=\"<(dll_suffix)\"',
+ 'SHLIB_PREFIX=\"<(dll_prefix)\"',
+ 'LG_LIB_NAME=\"libnssdbm3.so\"'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+}
diff --git a/lib/softoken/softoken.gyp b/lib/softoken/softoken.gyp
new file mode 100644
index 000000000..8d72e60c5
--- /dev/null
+++ b/lib/softoken/softoken.gyp
@@ -0,0 +1,71 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'softokn',
+ 'type': 'static_library',
+ 'sources': [
+ 'fipsaudt.c',
+ 'fipstest.c',
+ 'fipstokn.c',
+ 'jpakesftk.c',
+ 'lgglue.c',
+ 'lowkey.c',
+ 'lowpbe.c',
+ 'padbuf.c',
+ 'pkcs11.c',
+ 'pkcs11c.c',
+ 'pkcs11u.c',
+ 'sdb.c',
+ 'sftkdb.c',
+ 'sftkhmac.c',
+ 'sftkpars.c',
+ 'sftkpwd.c',
+ 'softkver.c',
+ 'tlsprf.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/sqlite/sqlite.gyp:sqlite3',
+ '<(DEPTH)/lib/freebl/freebl.gyp:freebl',
+ ]
+ },
+ {
+ 'target_name': 'softokn3',
+ 'type': 'shared_library',
+ 'dependencies': [
+ 'softokn',
+ ],
+ 'conditions': [
+ [ 'moz_fold_libs==0', {
+ 'dependencies': [
+ '<(DEPTH)/lib/util/util.gyp:nssutil3',
+ ],
+ }, {
+ 'libraries': [
+ '<(moz_folded_library_name)',
+ ],
+ }],
+ ],
+ 'variables': {
+ 'mapfile': 'softokn.def'
+ }
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'SHLIB_SUFFIX=\"<(dll_suffix)\"',
+ 'SHLIB_PREFIX=\"<(dll_prefix)\"',
+ 'SOFTOKEN_LIB_NAME=\"libsoftokn3.so\"',
+ 'SHLIB_VERSION=\"3\"'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+}
diff --git a/lib/sqlite/exports.gyp b/lib/sqlite/exports.gyp
new file mode 100644
index 000000000..4b4e32ac2
--- /dev/null
+++ b/lib/sqlite/exports.gyp
@@ -0,0 +1,25 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_sqlite_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'sqlite3.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/sqlite/sqlite.gyp b/lib/sqlite/sqlite.gyp
new file mode 100644
index 000000000..6969893d6
--- /dev/null
+++ b/lib/sqlite/sqlite.gyp
@@ -0,0 +1,50 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'conditions': [
+ ['use_system_sqlite==1', {
+ 'targets': [{
+ 'target_name': 'sqlite3',
+ 'type': 'none',
+ 'link_settings': {
+ 'libraries': ['<(sqlite_libs)'],
+ },
+ }],
+ }, {
+ 'targets': [
+ {
+ 'target_name': 'sqlite',
+ 'type': 'static_library',
+ 'sources': [
+ 'sqlite3.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ },
+ {
+ 'target_name': 'sqlite3',
+ 'type': 'shared_library',
+ 'dependencies': [
+ 'sqlite'
+ ],
+ 'variables': {
+ 'mapfile': 'sqlite.def'
+ }
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'SQLITE_THREADSAFE=1'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+ }]
+ ],
+}
diff --git a/lib/ssl/exports.gyp b/lib/ssl/exports.gyp
new file mode 100644
index 000000000..b4854f155
--- /dev/null
+++ b/lib/ssl/exports.gyp
@@ -0,0 +1,29 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_ssl_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'preenc.h',
+ 'ssl.h',
+ 'sslerr.h',
+ 'sslproto.h',
+ 'sslt.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/public'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/ssl/ssl.gyp b/lib/ssl/ssl.gyp
new file mode 100644
index 000000000..fc607d256
--- /dev/null
+++ b/lib/ssl/ssl.gyp
@@ -0,0 +1,91 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'ssl',
+ 'type': 'static_library',
+ 'sources': [
+ 'authcert.c',
+ 'cmpcert.c',
+ 'dtlscon.c',
+ 'prelib.c',
+ 'ssl3con.c',
+ 'ssl3ecc.c',
+ 'ssl3ext.c',
+ 'ssl3gthr.c',
+ 'sslauth.c',
+ 'sslcert.c',
+ 'sslcon.c',
+ 'ssldef.c',
+ 'sslenum.c',
+ 'sslerr.c',
+ 'sslerrstrs.c',
+ 'sslgrp.c',
+ 'sslinfo.c',
+ 'sslinit.c',
+ 'sslmutex.c',
+ 'sslnonce.c',
+ 'sslreveal.c',
+ 'sslsecur.c',
+ 'sslsnce.c',
+ 'sslsock.c',
+ 'ssltrace.c',
+ 'sslver.c',
+ 'tls13con.c',
+ 'tls13hkdf.c',
+ ],
+ 'conditions': [
+ [ 'OS=="win"', {
+ 'sources': [
+ 'win32err.c',
+ ],
+ 'defines': [
+ 'IN_LIBSSL',
+ ],
+ }, {
+ # Not Windows.
+ 'sources': [
+ 'unix_err.c'
+ ],
+ }],
+ [ 'ssl_enable_zlib==1', {
+ 'dependencies': [
+ '<(DEPTH)/lib/zlib/zlib.gyp:nss_zlib'
+ ],
+ 'defines': [
+ 'NSS_SSL_ENABLE_ZLIB',
+ ],
+ }],
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/freebl/freebl.gyp:freebl',
+ ],
+ },
+ {
+ 'target_name': 'ssl3',
+ 'type': 'shared_library',
+ 'dependencies': [
+ 'ssl',
+ '<(DEPTH)/lib/nss/nss.gyp:nss3',
+ '<(DEPTH)/lib/util/util.gyp:nssutil3',
+ ],
+ 'variables': {
+ 'mapfile': 'ssl.def'
+ }
+ }
+ ],
+ 'target_defaults': {
+ 'defines': [
+ 'NSS_ALLOW_SSLKEYLOGFILE=1'
+ ]
+ },
+ 'variables': {
+ 'module': 'nss'
+ }
+}
diff --git a/lib/sysinit/sysinit.gyp b/lib/sysinit/sysinit.gyp
new file mode 100644
index 000000000..e961325f6
--- /dev/null
+++ b/lib/sysinit/sysinit.gyp
@@ -0,0 +1,31 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'nsssysinit_static',
+ 'type': 'static_library',
+ 'sources': [
+ 'nsssysinit.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports',
+ '<(DEPTH)/lib/util/util.gyp:nssutil3'
+ ]
+ },
+ {
+ 'target_name': 'nsssysinit',
+ 'type': 'shared_library',
+ 'dependencies': [
+ 'nsssysinit_static'
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/util/exports.gyp b/lib/util/exports.gyp
new file mode 100644
index 000000000..68ecdaffe
--- /dev/null
+++ b/lib/util/exports.gyp
@@ -0,0 +1,67 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'lib_util_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'base64.h',
+ 'ciferfam.h',
+ 'eccutil.h',
+ 'hasht.h',
+ 'nssb64.h',
+ 'nssb64t.h',
+ 'nssilckt.h',
+ 'nssilock.h',
+ 'nsslocks.h',
+ 'nssrwlk.h',
+ 'nssrwlkt.h',
+ 'nssutil.h',
+ 'pkcs11.h',
+ 'pkcs11f.h',
+ 'pkcs11n.h',
+ 'pkcs11p.h',
+ 'pkcs11t.h',
+ 'pkcs11u.h',
+ 'pkcs1sig.h',
+ 'portreg.h',
+ 'secasn1.h',
+ 'secasn1t.h',
+ 'seccomon.h',
+ 'secder.h',
+ 'secdert.h',
+ 'secdig.h',
+ 'secdigt.h',
+ 'secerr.h',
+ 'secitem.h',
+ 'secoid.h',
+ 'secoidt.h',
+ 'secport.h',
+ 'utilmodt.h',
+ 'utilpars.h',
+ 'utilparst.h',
+ 'utilrename.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/public'
+ },
+ {
+ 'files': [
+ 'templates.c',
+ 'verref.h'
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+}
diff --git a/lib/util/util.gyp b/lib/util/util.gyp
new file mode 100644
index 000000000..9f3a74b18
--- /dev/null
+++ b/lib/util/util.gyp
@@ -0,0 +1,59 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'nssutil',
+ 'type': 'static_library',
+ 'sources': [
+ 'derdec.c',
+ 'derenc.c',
+ 'dersubr.c',
+ 'dertime.c',
+ 'errstrs.c',
+ 'nssb64d.c',
+ 'nssb64e.c',
+ 'nssilock.c',
+ 'nssrwlk.c',
+ 'oidstring.c',
+ 'pkcs1sig.c',
+ 'portreg.c',
+ 'quickder.c',
+ 'secalgid.c',
+ 'secasn1d.c',
+ 'secasn1e.c',
+ 'secasn1u.c',
+ 'secdig.c',
+ 'secitem.c',
+ 'secload.c',
+ 'secoid.c',
+ 'secport.c',
+ 'sectime.c',
+ 'templates.c',
+ 'utf8.c',
+ 'utilmod.c',
+ 'utilpars.c'
+ ],
+ 'dependencies': [
+ '<(DEPTH)/exports.gyp:nss_exports'
+ ]
+ },
+ {
+ 'target_name': 'nssutil3',
+ 'type': 'shared_library',
+ 'dependencies': [
+ 'nssutil'
+ ],
+ 'variables': {
+ 'mapfile': 'nssutil.def'
+ }
+ }
+ ],
+ 'variables': {
+ 'module': 'nss'
+ }
+} \ No newline at end of file
diff --git a/lib/zlib/exports.gyp b/lib/zlib/exports.gyp
new file mode 100644
index 000000000..b574597a6
--- /dev/null
+++ b/lib/zlib/exports.gyp
@@ -0,0 +1,33 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ '../../coreconf/config.gypi'
+ ],
+ 'variables': {
+ 'module': 'nss',
+ },
+ 'conditions': [
+ ['use_system_zlib==1', {
+ 'targets': [{
+ 'target_name': 'lib_zlib_exports',
+ 'type': 'none',
+ }],
+ }, {
+ 'targets': [{
+ 'target_name': 'lib_zlib_exports',
+ 'type': 'none',
+ 'copies': [
+ {
+ 'files': [
+ 'zlib.h',
+ 'zconf.h',
+ ],
+ 'destination': '<(PRODUCT_DIR)/dist/<(module)/private'
+ }
+ ]
+ }],
+ }],
+ ],
+}
diff --git a/lib/zlib/zlib.gyp b/lib/zlib/zlib.gyp
new file mode 100644
index 000000000..c89dbd96c
--- /dev/null
+++ b/lib/zlib/zlib.gyp
@@ -0,0 +1,49 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ "../../coreconf/config.gypi"
+ ],
+ 'variables': {
+ 'module': 'nss',
+ },
+ 'conditions': [
+ ['use_system_zlib==1', {
+ 'targets': [{
+ 'target_name': 'nss_zlib',
+ 'type': 'none',
+ 'link_settings': {
+ 'libraries': ['<@(zlib_libs)'],
+ },
+ }],
+ }, {
+ 'targets': [{
+ 'target_name': 'nss_zlib',
+ 'type': 'static_library',
+ 'sources': [
+ 'adler32.c',
+ 'compress.c',
+ 'crc32.c',
+ 'deflate.c',
+ 'gzclose.c',
+ 'gzlib.c',
+ 'gzread.c',
+ 'gzwrite.c',
+ 'infback.c',
+ 'inffast.c',
+ 'inflate.c',
+ 'inftrees.c',
+ 'trees.c',
+ 'uncompr.c',
+ 'zutil.c',
+ ],
+ 'defines': [
+ # Define verbose as -1 to turn off all zlib trace messages in
+ # debug builds.
+ 'verbose=-1',
+ ],
+ }],
+ }]
+ ],
+}
diff --git a/nss.gyp b/nss.gyp
new file mode 100644
index 000000000..d853cdf4a
--- /dev/null
+++ b/nss.gyp
@@ -0,0 +1,202 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+{
+ 'includes': [
+ 'coreconf/config.gypi'
+ ],
+ 'targets': [
+ {
+ 'target_name': 'nss_libs',
+ 'type': 'none',
+ 'dependencies': [
+ 'lib/ckfw/builtins/builtins.gyp:nssckbi',
+ 'lib/freebl/freebl.gyp:freebl3',
+ 'lib/softoken/softoken.gyp:softokn3',
+ ],
+ 'conditions': [
+ [ 'moz_fold_libs==0', {
+ 'dependencies': [
+ 'lib/nss/nss.gyp:nss3',
+ 'lib/smime/smime.gyp:smime3',
+ 'lib/sqlite/sqlite.gyp:sqlite3',
+ 'lib/ssl/ssl.gyp:ssl3',
+ 'lib/util/util.gyp:nssutil3',
+ ],
+ }],
+ [ 'OS=="linux"', {
+ 'dependencies': [
+ 'lib/freebl/freebl.gyp:freeblpriv3',
+ 'lib/sysinit/sysinit.gyp:nsssysinit',
+ ],
+ }],
+ [ 'disable_dbm==0', {
+ 'dependencies': [
+ 'lib/softoken/legacydb/legacydb.gyp:nssdbm3',
+ ],
+ }],
+ ],
+ },
+ {
+ 'target_name': 'nss_static_libs',
+ 'type': 'none',
+ 'dependencies': [
+ 'cmd/lib/lib.gyp:sectool',
+ 'lib/base/base.gyp:nssb',
+ 'lib/certdb/certdb.gyp:certdb',
+ 'lib/certhigh/certhigh.gyp:certhi',
+ 'lib/ckfw/ckfw.gyp:nssckfw',
+ 'lib/crmf/crmf.gyp:crmf',
+ 'lib/cryptohi/cryptohi.gyp:cryptohi',
+ 'lib/dev/dev.gyp:nssdev',
+ 'lib/freebl/freebl.gyp:freebl',
+ 'lib/jar/jar.gyp:jar',
+ 'lib/nss/nss.gyp:nss_static',
+ 'lib/pk11wrap/pk11wrap.gyp:pk11wrap',
+ 'lib/pkcs12/pkcs12.gyp:pkcs12',
+ 'lib/pkcs7/pkcs7.gyp:pkcs7',
+ 'lib/pki/pki.gyp:nsspki',
+ 'lib/smime/smime.gyp:smime',
+ 'lib/softoken/softoken.gyp:softokn',
+ 'lib/ssl/ssl.gyp:ssl',
+ 'lib/util/util.gyp:nssutil'
+ ],
+ 'conditions': [
+ [ 'OS=="linux"', {
+ 'dependencies': [
+ 'lib/sysinit/sysinit.gyp:nsssysinit_static',
+ ],
+ }],
+ [ 'disable_dbm==0', {
+ 'dependencies': [
+ 'lib/dbm/src/src.gyp:dbm',
+ 'lib/softoken/legacydb/legacydb.gyp:nssdbm',
+ ],
+ }],
+ [ 'disable_libpkix==0', {
+ 'dependencies': [
+ 'lib/libpkix/pkix/certsel/certsel.gyp:pkixcertsel',
+ 'lib/libpkix/pkix/checker/checker.gyp:pkixchecker',
+ 'lib/libpkix/pkix/crlsel/crlsel.gyp:pkixcrlsel',
+ 'lib/libpkix/pkix/params/params.gyp:pkixparams',
+ 'lib/libpkix/pkix/results/results.gyp:pkixresults',
+ 'lib/libpkix/pkix/store/store.gyp:pkixstore',
+ 'lib/libpkix/pkix/top/top.gyp:pkixtop',
+ 'lib/libpkix/pkix/util/util.gyp:pkixutil',
+ 'lib/libpkix/pkix_pl_nss/module/module.gyp:pkixmodule',
+ 'lib/libpkix/pkix_pl_nss/pki/pki.gyp:pkixpki',
+ 'lib/libpkix/pkix_pl_nss/system/system.gyp:pkixsystem',
+ ],
+ }],
+ [ 'use_system_sqlite==0', {
+ 'dependencies': [
+ 'lib/sqlite/sqlite.gyp:sqlite',
+ ],
+ }],
+ [ 'moz_fold_libs==1', {
+ 'dependencies': [
+ 'lib/nss/nss.gyp:nss3_static',
+ 'lib/smime/smime.gyp:smime3_static',
+ ],
+ }],
+ ],
+ },
+ {
+ 'target_name': 'nss_cmds',
+ 'type': 'none',
+ 'dependencies': [
+ 'cmd/certutil/certutil.gyp:certutil',
+ 'cmd/modutil/modutil.gyp:modutil',
+ 'cmd/pk12util/pk12util.gyp:pk12util',
+ 'cmd/shlibsign/shlibsign.gyp:shlibsign',
+ ],
+ 'conditions': [
+ [ 'mozilla_client==0', {
+ 'dependencies': [
+ 'cmd/crlutil/crlutil.gyp:crlutil',
+ 'cmd/pwdecrypt/pwdecrypt.gyp:pwdecrypt',
+ 'cmd/signtool/signtool.gyp:signtool',
+ 'cmd/signver/signver.gyp:signver',
+ 'cmd/smimetools/smimetools.gyp:cmsutil',
+ 'cmd/ssltap/ssltap.gyp:ssltap',
+ 'cmd/symkeyutil/symkeyutil.gyp:symkeyutil',
+ ],
+ }],
+ ],
+ },
+ ],
+ 'conditions': [
+ [ 'disable_tests==0', {
+ 'targets': [
+ {
+ 'target_name': 'nss_tests',
+ 'type': 'none',
+ 'dependencies': [
+ 'cmd/addbuiltin/addbuiltin.gyp:addbuiltin',
+ 'cmd/atob/atob.gyp:atob',
+ 'cmd/bltest/bltest.gyp:bltest',
+ 'cmd/btoa/btoa.gyp:btoa',
+ 'cmd/certcgi/certcgi.gyp:certcgi',
+ 'cmd/chktest/chktest.gyp:chktest',
+ 'cmd/crmftest/crmftest.gyp:crmftest',
+ 'cmd/dbtest/dbtest.gyp:dbtest',
+ 'cmd/derdump/derdump.gyp:derdump',
+ 'cmd/digest/digest.gyp:digest',
+ 'cmd/ecperf/ecperf.gyp:ecperf',
+ 'cmd/ectest/ectest.gyp:ectest',
+ 'cmd/fipstest/fipstest.gyp:fipstest',
+ 'cmd/httpserv/httpserv.gyp:httpserv',
+ 'cmd/listsuites/listsuites.gyp:listsuites',
+ 'cmd/makepqg/makepqg.gyp:makepqg',
+ 'cmd/multinit/multinit.gyp:multinit',
+ 'cmd/ocspclnt/ocspclnt.gyp:ocspclnt',
+ 'cmd/ocspresp/ocspresp.gyp:ocspresp',
+ 'cmd/oidcalc/oidcalc.gyp:oidcalc',
+ 'cmd/p7content/p7content.gyp:p7content',
+ 'cmd/p7env/p7env.gyp:p7env',
+ 'cmd/p7sign/p7sign.gyp:p7sign',
+ 'cmd/p7verify/p7verify.gyp:p7verify',
+ 'cmd/pk11gcmtest/pk11gcmtest.gyp:pk11gcmtest',
+ 'cmd/pk11mode/pk11mode.gyp:pk11mode',
+ 'cmd/pk1sign/pk1sign.gyp:pk1sign',
+ 'cmd/pp/pp.gyp:pp',
+ 'cmd/rsaperf/rsaperf.gyp:rsaperf',
+ 'cmd/sdrtest/sdrtest.gyp:sdrtest',
+ 'cmd/selfserv/selfserv.gyp:selfserv',
+ 'cmd/shlibsign/mangle/mangle.gyp:mangle',
+ 'cmd/strsclnt/strsclnt.gyp:strsclnt',
+ 'cmd/tests/tests.gyp:baddbdir',
+ 'cmd/tests/tests.gyp:conflict',
+ 'cmd/tests/tests.gyp:dertimetest',
+ 'cmd/tests/tests.gyp:encodeinttest',
+ 'cmd/tests/tests.gyp:nonspr10',
+ 'cmd/tests/tests.gyp:remtest',
+ 'cmd/tests/tests.gyp:secmodtest',
+ 'cmd/tstclnt/tstclnt.gyp:tstclnt',
+ 'cmd/vfychain/vfychain.gyp:vfychain',
+ 'cmd/vfyserv/vfyserv.gyp:vfyserv',
+ 'external_tests/google_test/google_test.gyp:gtest1',
+ 'external_tests/common/common.gyp:gtests',
+ 'external_tests/der_gtest/der_gtest.gyp:der_gtest',
+ 'external_tests/pk11_gtest/pk11_gtest.gyp:pk11_gtest',
+ 'external_tests/ssl_gtest/ssl_gtest.gyp:ssl_gtest',
+ 'external_tests/util_gtest/util_gtest.gyp:util_gtest',
+ 'external_tests/nss_bogo_shim/nss_bogo_shim.gyp:nss_bogo_shim'
+ ],
+ 'conditions': [
+ [ 'OS=="linux"', {
+ 'dependencies': [
+ 'cmd/lowhashtest/lowhashtest.gyp:lowhashtest',
+ ],
+ }],
+ [ 'disable_libpkix==0', {
+ 'dependencies': [
+ 'cmd/pkix-errcodes/pkix-errcodes.gyp:pkix-errcodes',
+ ],
+ }],
+ ],
+ },
+ ],
+ }],
+ ],
+}