upgrade gyp and refactor openssl.gyp
I would like to use openssl-1.0.2 on iojs but openssl.gyp is so large and complicated that I think it need some refactoring before updating to openssl-1.0.2.
This PR has the following commits as
- upgrade gyp to use else if conditions as supported in https://codereview.chromium.org/601353002
- move all openssl sources into openssl.gypi
- refactor openssl.gyp so as to switch target_arch and OS with "else if" condition and move most of defines to gypi.
Testing is hard to confirm this in all platforms. I made two tests as below.
- Comparing all diffs of out/deps/openssl/openssl.target.mk with configure --dest-CPU=[win mac solaris freebsd openbsd linux android] --dest-os=[arm ia32 x32 x64] between before and after this PR and there is no difference in makefiles. In windows, there are small diffs in openssl.vcxprj , but it comes from updating gyp.
- Build and make test on linux-x86_64, linux-x86, MacOS-x86_64, Win-x86_64. All tests were passed.
WIP branch for openssl102 is in https://github.com/shigeki/io.js/tree/WIP_upgrade_openssl102 . It's working on only x86_64 of Linux and MacOSX.
CC: @bnoordhuis @indutny