Add MacOS specific compilation options#31
Add MacOS specific compilation options#31hongkongkiwi wants to merge 1 commit intoJackOfMostTrades:masterfrom
Conversation
Add dylib building for MacOS
|
This has been working well for me, but it looks like it might be out of date now. Be great to get it into main. |
| # Try to locate OpenSSL if not specified with OPENSSL_INC and OPENSSL_LIB | ||
| ifeq ($(OPENSSL_INC),) | ||
| OPENSSL_INC := $(shell pkg-config --cflags openssl 2>/dev/null) | ||
| ifeq ($(OPENSSL_INC),) |
There was a problem hiding this comment.
pkg-config --cflags openssl will actually be empty on an Ubuntu system (this is why CI is failing) because header files are in the standard include path. If the make will fail if pkg-config has non-zero exit code then you can probably skip this check? A stack overflow post leads me to think ifneq ($(.SHELLSTATUS),0) might be the right alternative here.
| MACOSX_FRAMEWORKS := -framework CoreFoundation -framework Security | ||
| endif | ||
|
|
||
| all: aws_kms_pkcs11.so aws_kms_pkcs11.dylib |
There was a problem hiding this comment.
I'm not sure if it makes sense to target the dylib on Linux systems (and vice-versa)? Can/should all: be defined based on UNAME_S?
|
Sorry, apparently my review comments were saved as a draft rather than posted. Please check the above comments; the PR as it was was causing the CI build to fail, so it needs some tweaks. |
Here's how I got it compiling for MacOS:
Install depeencies
Install AWS SDK
We need to fix up the SDK so it builds s2n which is doesn't seem to do by default in latest versoins.
Compile AWS PKCS11
Using on MacOS
Setup OpenSSL Config