Skip to content

Commit

Permalink
test(debug): runner SSL path
Browse files Browse the repository at this point in the history
  • Loading branch information
parfeon committed Nov 20, 2024
1 parent b7c2b3a commit 71e9383
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ CRYPTO_SOURCEFILES += pubnub_crypto.c pbcc_crypto.c pbcc_crypto_aes_cbc.c pbcc_c
# Searching for proper OpenSSL paths.
CRYPTO_CFLAGS := $(shell pkg-config --cflags openssl 2>/dev/null)
CRYPTO_LIBS := $(shell pkg-config --libs openssl 2>/dev/null)
OPENSSL_CFLAGS := $(shell pkg-config --cflags openssl)
OPENSSL_LIBS := $(shell pkg-config --libs openssl)

ifeq ($(CRYPTO_CFLAGS),)
CRYPTO_CFLAGS := -I/usr/local/opt/openssl/include
Expand All @@ -102,6 +104,8 @@ CRYPTO_INCLUDES += $(CRYPTO_CFLAGS)
CRYPTO_LIBS += $(CRYPTO_LIBS)

pbcc_crypto_unittest: $(PROJECT_SOURCEFILES) $(CRYPTO_SOURCEFILES) pbcc_crypto_unit_tests.c
@echo "Includes: '$(OPENSSL_CFLAGS)'"
@echo "Libraries: '$(OPENSSL_LIBS)'"
gcc -o pbcc_crypto_unit_test.so -shared $(CFLAGS) $(LDFLAGS) $(CRYPTO_INCLUDES) $(CRYPTO_LIBS) -D PUBNUB_CRYPTO_API=1 -Wall $(COVERAGE_FLAGS) -fPIC $(PROJECT_SOURCEFILES) $(CRYPTO_SOURCEFILES) test/pubnub_test_mocks.c pbcc_crypto_unit_tests.c -lcgreen -lm
# gcc -o pubnub_core_unit_testo $(CFLAGS) -Wall $(COVERAGE_FLAGS) $(PROJECT_SOURCEFILES) pbcc_crypto_unit_tests.c -lcgreen -lm
$(CGREEN_RUNNER) ./pbcc_crypto_unit_test.so
Expand Down

0 comments on commit 71e9383

Please sign in to comment.