Added %_valgrind target in test's Makefile. Added doc to build with netpgp on macosx
authorEdouard Tisserant <edouard@pep-project.org>
Mon, 20 Mar 2017 18:19:06 +0100
changeset 16821a6a30a2b30c
parent 1681 97db633df271
child 1685 99af97097175
child 1693 7cbc1b22a250
Added %_valgrind target in test's Makefile. Added doc to build with netpgp on macosx
README-OSX.md
test/Makefile
     1.1 --- a/README-OSX.md	Mon Mar 20 16:14:27 2017 +0100
     1.2 +++ b/README-OSX.md	Mon Mar 20 18:19:06 2017 +0100
     1.3 @@ -32,6 +32,43 @@
     1.4  sudo port select python python27
     1.5  ```
     1.6  
     1.7 +### NetPGP (if not GPGME)
     1.8 +
     1.9 +#### Prepare :
    1.10 +
    1.11 +Get OpenSSL and build/install it as shared library.
    1.12 +
    1.13 +```
    1.14 +wget https://www.openssl.org/source/old/1.0.1/openssl-1.0.1u.tar.gz
    1.15 +tar xvfz openssl-1.0.1u.tar.gz
    1.16 +cd openssl-1.0.1u
    1.17 +./Configure darwin64-x86_64-cc --prefix=$HOME shared
    1.18 +make install
    1.19 +```
    1.20 +
    1.21 +Get and autoconf NetPGP
    1.22 +
    1.23 +```
    1.24 +cd $SRC
    1.25 +hg clone https://cacert.pep.foundation/dev/repos/netpgp-et/
    1.26 +cd netpgp-et
    1.27 +autoreconf -i
    1.28 +```
    1.29 +
    1.30 +#### Build
    1.31 +
    1.32 +Important : LDFLAGS is set to help finding OpenSSL shared lib. If not set,
    1.33 +system's default libcrypto may silently be used instead, causing memory
    1.34 +corruption or crash at runtime.
    1.35 +
    1.36 +```
    1.37 +mkdir netpgp_debug
    1.38 +cd netpgp_debug
    1.39 +$SRC/netpgp-et/configure --with-openssl=$HOME --prefix=$HOME CPPFLAGS=-DDEBUG CXXFLAGS="-g -O0" LDFLAGS="-L${HOME}/lib"
    1.40 +make
    1.41 +make install
    1.42 +```
    1.43 +
    1.44  ### Other Dependecies
    1.45  
    1.46  #### [yml2](https://fdik.org/yml/toolchain)
     2.1 --- a/test/Makefile	Mon Mar 20 16:14:27 2017 +0100
     2.2 +++ b/test/Makefile	Mon Mar 20 18:19:06 2017 +0100
     2.3 @@ -48,14 +48,17 @@
     2.4  %_test : %_test.o test_util.o
     2.5  	 $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
     2.6  
     2.7 -%_test_run : %_test
     2.8 +%_run : %
     2.9  	LD_LIBRARY_PATH=~/lib:../src ./$<
    2.10  
    2.11  
    2.12 -%_test_lldb : %_test
    2.13 +%_lldb : %
    2.14  	LD_LIBRARY_PATH=~/lib:../src lldb ./$<
    2.15  
    2.16 -%_test_gdb : %_test
    2.17 +%_valgrind : %
    2.18 +	LD_LIBRARY_PATH=~/lib:../src valgrind --leak-check=yes ./$<
    2.19 +
    2.20 +%_gdb : %
    2.21  	LD_LIBRARY_PATH=~/lib:../src gdb ./$<
    2.22  
    2.23  unit_tests: $(UNIT_TESTS) $(UNIT_TESTS_RUN)