forked from Tarsnap/scrypt
-
Notifications
You must be signed in to change notification settings - Fork 19
/
BUILDING
67 lines (49 loc) · 2.15 KB
/
BUILDING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Platform-specific notes
-----------------------
- On OS X, the version of OpenSSL included with the operating
system is outdated (0.9.8) and deprecated, and it is recommended
that scrypt be built with an updated version of OpenSSL. On OS X
10.11 "El Capitan" and higher, OpenSSL was removed entirely. After
installing a newer version of OpenSSL, use
CPPFLAGS="-I /path/to/openssl/headers"
LDFLAGS="-L /path/to/openssl/lib"
to build scrypt.
In particular, if you installed OpenSSL using homebrew, you may
pass the relevant directories directly to ./configure:
./configure CPPFLAGS="-I/usr/local/opt/openssl/include" LDFLAGS="-L/usr/local/opt/openssl/lib"
Alternatively, you may with to add these lines to your $HOME/.profile file:
export CPPFLAGS="-I/usr/local/opt/openssl/include $CPPFLAGS"
export LDFLAGS="-L/usr/local/opt/openssl/lib $LDFLAGS"
and then close & re-open your terminal window.
Building from git
-----------------
To build from this git repository, build with:
autoreconf -i
./configure
make
- You must have automake 1.11.2 or higher.
- In order to support the `AX_CFLAGS_WARN_ALL` autoconf directive, you will
need to install the autoconf archive. On Debian systems, use the
`autoconf-archive` package; on FreeBSD, use `devel/autoconf-archive`.
Building from Official Release
----------
You can patch the official release tarball for scrypt 1.2.1 from
https://www.tarsnap.com/scrypt/scrypt-1.2.1.tgz, using:
tar -xvzf scrypt-1.2.1.tgz
cp scrypt/main.c scrypt-1.2.1
cp scrypt/lib/scryptenc/scryptenc.c scrypt-1.2.1/lib/scryptenc/
cp scrypt/lib/scryptenc/scryptenc.h scrypt-1.2.1/lib/scryptenc/
And then build the patched scrypt-1.2.1 with:
cd scrypt-1.2.1
./configure
make
Testing
-------
A small test suite can be run with:
make test
Memory-testing normal operations with valgrind (takes approximately 4 times as
long as no valgrind tests) can be enabled with:
make test USE_VALGRIND=1
Memory-testing all tests with valgrind (requires over 1 GB memory, and takes
approximately 4 times as long as `USE_VALGRIND=1`) can be enabled with:
make test USE_VALGRIND=2