Skip to content

Commit 2753206

Browse files
committed
Relax wolfSSL dep on unit + linter checks
1 parent 135d64b commit 2753206

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

.github/workflows/macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Install dependencies
1919
run: |
2020
brew update
21-
brew install gcc make gmake wolfssl git
21+
brew install gcc make gmake wolfssl git libtool
2222
2323
- name: Build tests
2424
run: |

Makefile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,19 @@ OBJ=build/wolfip.o \
3737
$(TAP_OBJ)
3838

3939
HAVE_WOLFSSL:=$(shell printf "#include <wolfssl/options.h>\nint main(void){return 0;}\n" | $(CC) $(CFLAGS) -x c - -c -o /dev/null 2>/dev/null && echo 1)
40-
ifeq ($(HAVE_WOLFSSL),)
41-
$(error wolfSSL headers not found. Please install wolfSSL or adjust include paths)
40+
41+
# Require wolfSSL unless the requested goals are wolfSSL-independent (unit/cppcheck/clean).
42+
REQ_WOLFSSL_GOALS:=$(filter-out unit cppcheck clean,$(MAKECMDGOALS))
43+
ifeq ($(strip $(MAKECMDGOALS)),)
44+
ifeq ($(HAVE_WOLFSSL),)
45+
$(error wolfSSL headers not found. Please install wolfSSL or adjust include paths)
46+
endif
47+
else
48+
ifneq ($(REQ_WOLFSSL_GOALS),)
49+
ifeq ($(HAVE_WOLFSSL),)
50+
$(error wolfSSL headers not found. Please install wolfSSL or adjust include paths)
51+
endif
52+
endif
4253
endif
4354

4455
EXE=build/tcpecho build/tcp_netcat_poll build/tcp_netcat_select \

0 commit comments

Comments
 (0)