Skip to content

Commit c58ce35

Browse files
adjustments to example Makefiles
1 parent 9f49ff1 commit c58ce35

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

examples/posix/wh_posix_client/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ BIN = wh_posix_client
88
# Base directory for additional project files
99
PROJECT_DIR ?= .
1010
CONFIG_DIR ?= $(PROJECT_DIR)/config
11+
SHARED_CONFIG_DIR ?= $(PROJECT_DIR)/../
1112
# wolfSSL and wolfHSM directories
1213
WOLFSSL_DIR ?= ../../../../wolfssl
1314
WOLFHSM_DIR ?= ../../../
@@ -20,11 +21,11 @@ BUILD_DIR ?= $(PROJECT_DIR)/Build
2021
# Includes
2122
INC = -I$(PROJECT_DIR) \
2223
-I$(CONFIG_DIR) \
24+
-I$(SHARED_CONFIG_DIR) \
2325
-I$(WOLFSSL_DIR) \
2426
-I$(WOLFHSM_DIR) \
2527
-I$(WOLFHSM_PORT_DIR) \
26-
-I$(WOLFHSM_DEMO_CLIENT_DIR) \
27-
-I../
28+
-I$(WOLFHSM_DEMO_CLIENT_DIR)
2829

2930
# POSIX requires C source be defined before any header
3031
DEF += -D_POSIX_C_SOURCE=200809L
@@ -90,7 +91,7 @@ SRC_C += $(wildcard $(WOLFSSL_DIR)/src/*.c)
9091

9192
# Set the default device ID for wolfCrypt tests
9293
ifeq ($(DMA),1)
93-
DEF += -D_POSIX_C_SOURCE=200809L -DWC_USE_DEVID=0x57444D41 -DWC_NO_DEFAULT_DEVID
94+
DEF += -DWC_USE_DEVID=0x57444D41 -DWC_NO_DEFAULT_DEVID
9495
CFLAGS += -DWOLFHSM_CFG_DMA
9596
else
9697
DEF += -DWC_USE_DEVID=0x5748534D

examples/posix/wh_posix_server/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ BIN = wh_posix_server
88
# Base directory for additional project files
99
PROJECT_DIR ?= .
1010
CONFIG_DIR ?= $(PROJECT_DIR)/config
11+
SHARED_CONFIG_DIR ?= $(PROJECT_DIR)/../
1112
# wolfSSL and wolfHSM directories
1213
WOLFSSL_DIR ?= ../../../../wolfssl
1314
WOLFHSM_DIR ?= ../../../
@@ -19,10 +20,10 @@ BUILD_DIR ?= $(PROJECT_DIR)/Build
1920
# Includes
2021
INC = -I$(PROJECT_DIR) \
2122
-I$(CONFIG_DIR) \
23+
-I$(SHARED_CONFIG_DIR) \
2224
-I$(WOLFSSL_DIR) \
2325
-I$(WOLFHSM_DIR) \
24-
-I$(WOLFHSM_PORT_DIR) \
25-
-I../
26+
-I$(WOLFHSM_PORT_DIR)
2627

2728
# POSIX requires C source be defined before any header
2829
DEF += -D_POSIX_C_SOURCE=200809L

examples/posix/wh_posix_server/user_settings.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ extern "C" {
183183
#define WOLFSSL_NO_MALLOC
184184
#if 1
185185
#define WOLFSSL_MALLOC_CHECK /* trap malloc failure */
186-
#endif
187-
#endif
186+
#endif /* optional malloc check */
187+
#endif /* optional static memory */
188188

189189
#ifdef WOLFHSM_CFG_DMA
190190
#undef WOLFSSL_STATIC_MEMORY

0 commit comments

Comments
 (0)