Skip to content

Commit

Permalink
Clean up wolfSSL path variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
Andras Fekete committed Apr 4, 2024
1 parent a70760e commit 4c2f96f
Show file tree
Hide file tree
Showing 55 changed files with 191 additions and 177 deletions.
14 changes: 7 additions & 7 deletions X9.146/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ CC=gcc
#if you installed wolfssl to an alternate location use CFLAGS and LIBS to
#control your build:

#EXAMPLE: set WOLF_INSTALL_DIR to point to your install location like so:
# WOLF_INSTALL_DIR=/Users/username/work/testDir/wolf-install-dir-for-testing
#EXAMPLE: set WOLFSSL_INSTALL_DIR to point to your install location like so:
# WOLFSSL_INSTALL_DIR=/Users/username/work/testDir/wolf-install-dir-for-testing
#END EXAMPLE

WOLF_INSTALL_DIR=/usr/local
WOLFSSL_INSTALL_DIR=/usr/local

# ECC Examples Makefile
CC = gcc
LIB_PATH = /usr/local
CFLAGS = -Wall -I$(LIB_PATH)/include
LIBS = -L$(LIB_PATH)/lib -lm
WOLFSSL_INSTALL_DIR = /usr/local
CFLAGS = -Wall -I$(WOLFSSL_INSTALL_DIR)/include
LIBS = -L$(WOLFSSL_INSTALL_DIR)/lib -lm

# option variables
DYN_LIB = -lwolfssl
STATIC_LIB = $(LIB_PATH)/lib/libwolfssl.a
STATIC_LIB = $(WOLFSSL_INSTALL_DIR)/lib/libwolfssl.a
DEBUG_FLAGS = -g -DDEBUG
DEBUG_INC_PATHS = -MD
OPTIMIZE = -Os
Expand Down
8 changes: 4 additions & 4 deletions btle/ecies/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# BTLE Examples Makefile
CC = gcc
LIB_PATH = /usr/local
CFLAGS = -Wall -I ../common -I$(LIB_PATH)/include
LIBS = -L$(LIB_PATH)/lib
WOLFSSL_INSTALL_DIR = /usr/local
CFLAGS = -Wall -I ../common -I$(WOLFSSL_INSTALL_DIR)/include
LIBS = -L$(WOLFSSL_INSTALL_DIR)/lib

# Flags
DYN_LIB = -lwolfssl
Expand All @@ -15,7 +15,7 @@ OPTIMIZE = -Os
#CFLAGS+=$(OPTIMIZE)

# Static or Dynamic Library
#STATIC_LIB+=$(LIB_PATH)/lib/libwolfssl.a
#STATIC_LIB+=$(WOLFSSL_INSTALL_DIR)/lib/libwolfssl.a
LIBS+=$(DYN_LIB) -lm


Expand Down
8 changes: 4 additions & 4 deletions btle/tls/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# BTLE Examples Makefile
CC = gcc
LIB_PATH = /usr/local
CFLAGS = -Wall -I ../common -I $(LIB_PATH)/include
LIBS = -L$(LIB_PATH)/lib
WOLFSSL_INSTALL_DIR = /usr/local
CFLAGS = -Wall -I ../common -I $(WOLFSSL_INSTALL_DIR)/include
LIBS = -L$(WOLFSSL_INSTALL_DIR)/lib

# Flags
DYN_LIB = -lwolfssl
Expand All @@ -15,7 +15,7 @@ OPTIMIZE = -Os
CFLAGS+=$(OPTIMIZE)

# Static or Dynamic Library
#STATIC_LIB+=$(LIB_PATH)/lib/libwolfssl.a
#STATIC_LIB+=$(WOLFSSL_INSTALL_DIR)/lib/libwolfssl.a
LIBS+=$(DYN_LIB) -lm


Expand Down
8 changes: 4 additions & 4 deletions caam/seco/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# SECO Examples Makefile
WOLFSSL_PATH ?= /usr/local
WOLFSSL_INSTALL_DIR ?= /usr/local
CRYPTODEV_DIR ?= /usr/include
ZLIB_DIR ?= /usr
CFLAGS = -O -Wall -I$(WOLFSSL_PATH)/include -I$(HSM_DIR)/include -I$(CRYPTODEV_DIR)
LIBS = -L$(WOLFSSL_PATH)/lib -L$(ZLIB_DIR)/lib -lm -lz -lpthread
CFLAGS = -O -Wall -I$(WOLFSSL_INSTALL_DIR)/include -I$(HSM_DIR)/include -I$(CRYPTODEV_DIR)
LIBS = -L$(WOLFSSL_INSTALL_DIR)/lib -L$(ZLIB_DIR)/lib -lm -lz -lpthread

# option variables
DYN_LIB = -lwolfssl
STATIC_LIB = $(WOLFSSL_PATH)/lib/libwolfssl.a
STATIC_LIB = $(WOLFSSL_INSTALL_DIR)/lib/libwolfssl.a

# build targets
SRC=$(wildcard *.c)
Expand Down
8 changes: 4 additions & 4 deletions caam/seco/cryptodev/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# SECO Examples Makefile
WOLFSSL_PATH ?= /usr/local
WOLFSSL_INSTALL_DIR ?= /usr/local
CRYPTODEV_DIR ?= /usr/include
ZLIB_DIR ?= /usr
CFLAGS = -O -Wall -I$(WOLFSSL_PATH)/include -I$(HSM_DIR)/include -I$(CRYPTODEV_DIR)
LIBS = -L$(WOLFSSL_PATH)/lib -L$(ZLIB_DIR)/lib -lm -lz -lpthread
CFLAGS = -O -Wall -I$(WOLFSSL_INSTALL_DIR)/include -I$(HSM_DIR)/include -I$(CRYPTODEV_DIR)
LIBS = -L$(WOLFSSL_INSTALL_DIR)/lib -L$(ZLIB_DIR)/lib -lm -lz -lpthread

# option variables
DYN_LIB = -lwolfssl
STATIC_LIB = $(WOLFSSL_PATH)/lib/libwolfssl.a
STATIC_LIB = $(WOLFSSL_INSTALL_DIR)/lib/libwolfssl.a

# build targets
SRC=$(wildcard *.c)
Expand Down
6 changes: 3 additions & 3 deletions certfields/all-fields/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
CC=gcc
WOLFPATH=/usr/local
WOLFSSL_INSTALL_DIR=/usr/local

CFLAGS=-I$(WOLFPATH)/include -Wall
LIBS=-L$(WOLFPATH)/lib -lwolfssl
CFLAGS=-I$(WOLFSSL_INSTALL_DIR)/include -Wall
LIBS=-L$(WOLFSSL_INSTALL_DIR)/lib -lwolfssl

app: main.o
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
Expand Down
6 changes: 3 additions & 3 deletions certfields/extendedKeyUsage/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CC=gcc -fsanitize=address
WOLFSSL_DIR=/usr/local
CFLAGS=-Wall -I$(WOLFSSL_DIR)/include
LIBS= -L$(WOLFSSL_DIR)/lib -lwolfssl
WOLFSSL_INSTALL_DIR=/usr/local
CFLAGS=-Wall -I$(WOLFSSL_INSTALL_DIR)/include
LIBS= -L$(WOLFSSL_INSTALL_DIR)/lib -lwolfssl

run: test.o
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
Expand Down
4 changes: 2 additions & 2 deletions certfields/extendedKeyUsage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ wolfSSL Library must be configured with --enable-opensslextra
wolfSSL lib installed to /usr/local

NOTE: If wolfSSL is installed to custom directory edit Makefile variable
WOLFSSL_DIR accordingly for example if you configured wolfSSL with
"--enable-prefix=/home/me/wolf-install-dir" then set WOLFSSL_DIR to
WOLFSSL_INSTALL_DIR accordingly for example if you configured wolfSSL with
"--enable-prefix=/home/me/wolf-install-dir" then set WOLFSSL_INSTALL_DIR to
"/home/me/wolf-install-dir" before running "make"

Building:
Expand Down
6 changes: 3 additions & 3 deletions certfields/extract-pubkey-from-certfile/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
CC=gcc

WOLFPATH=/usr/local
CFLAGS= -I$(WOLFPATH)/include -Wall
LIBS= -L$(WOLFPATH)/lib -lwolfssl
WOLFSSL_INSTALL_DIR=/usr/local
CFLAGS= -I$(WOLFSSL_INSTALL_DIR)/include -Wall
LIBS= -L$(WOLFSSL_INSTALL_DIR)/lib -lwolfssl

app: main.o
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
Expand Down
6 changes: 3 additions & 3 deletions certfields/keyUsage/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CC=gcc
WOLFSSL_DIR=/usr/local
CFLAGS=-Wall -I$(WOLFSSL_DIR)/include
LIBS= -L$(WOLFSSL_DIR)/lib -lwolfssl
WOLFSSL_INSTALL_DIR=/usr/local
CFLAGS=-Wall -I$(WOLFSSL_INSTALL_DIR)/include
LIBS= -L$(WOLFSSL_INSTALL_DIR)/lib -lwolfssl

run: test.o
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
Expand Down
4 changes: 2 additions & 2 deletions certfields/keyUsage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ wolfSSL Library must be configured with --enable-opensslextra
wolfSSL lib installed to /usr/local

NOTE: If wolfSSL is installed to custom directory edit Makefile variable
WOLFSSL_DIR accordingly for example if you configured wolfSSL with
"--enable-prefix=/home/me/wolf-install-dir" then set WOLFSSL_DIR to
WOLFSSL_INSTALL_DIR accordingly for example if you configured wolfSSL with
"--enable-prefix=/home/me/wolf-install-dir" then set WOLFSSL_INSTALL_DIR to
"/home/me/wolf-install-dir" before running "make"

Building:
Expand Down
14 changes: 7 additions & 7 deletions certgen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ CC=gcc
#if you installed wolfssl to an alternate location use CFLAGS and LIBS to
#control your build:

#EXAMPLE: set WOLF_INSTALL_DIR to point to your install location like so:
#EXAMPLE: set WOLFSSL_INSTALL_DIR to point to your install location like so:

# WOLF_INSTALL_DIR=/Users/kalebhimes/work/testDir/wolf-install-dir-for-testing
# WOLFSSL_INSTALL_DIR=/Users/kalebhimes/work/testDir/wolf-install-dir-for-testing

#END EXAMPLE

WOLF_INSTALL_DIR=/usr/local
WOLFSSL_INSTALL_DIR=/usr/local

# ECC Examples Makefile
CC = gcc
LIB_PATH = /usr/local
CFLAGS = -Wall -I$(LIB_PATH)/include
LIBS = -L$(LIB_PATH)/lib -lm
WOLFSSL_INSTALL_DIR = /usr/local
CFLAGS = -Wall -I$(WOLFSSL_INSTALL_DIR)/include
LIBS = -L$(WOLFSSL_INSTALL_DIR)/lib -lm

# option variables
DYN_LIB = -lwolfssl
STATIC_LIB = $(LIB_PATH)/lib/libwolfssl.a
STATIC_LIB = $(WOLFSSL_INSTALL_DIR)/lib/libwolfssl.a
DEBUG_FLAGS = -g -DDEBUG
DEBUG_INC_PATHS = -MD
OPTIMIZE = -Os
Expand Down
3 changes: 2 additions & 1 deletion certmanager/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CC=gcc
WOLFSSL_INSTALL_DIR=/usr/local
CFLAGS=-Wall
LIBS= -lwolfssl
LIBS=-L$(WOLFSSL_INSTALL_DIR)/lib -lwolfssl

all: certloadverifybuffer certverify

Expand Down
3 changes: 2 additions & 1 deletion crypto/3des/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CC=gcc
CFLAGS=-Wall
LIBS= -lwolfssl
WOLFSSL_INSTALL_DIR=/usr/local
LIBS=-L$(WOLFSSL_INSTALL_DIR)/lib -lwolfssl

3des-file-encrypt: 3des-file-encrypt.o
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
Expand Down
3 changes: 2 additions & 1 deletion crypto/MagicCrypto/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
bin_files = client server
WOLFSSL_INSTALL_DIR=/usr/local
all: $(bin_files)

DEPS=common.h
Expand All @@ -10,7 +11,7 @@ DEBUGOPT=
#DEBUGOPT=-DWOLFSSL_DEBUG_TLS -DDEBUG_WOLFSSL -DDEBUG_CRYPTOCB
#DEBUGOPT=-DWOLFSSL_DEBUG_TLS -DDEBUG_WOLFSSL

COMMONOPT=-O0 -g -IMagicCrypto/include -lwolfssl -lm -DWOLF_CRYPTO_CB
COMMONOPT=-O0 -g -IMagicCrypto/include -L$(WOLFSSL_INSTALL_DIR)/lib -lwolfssl -lm -DWOLF_CRYPTO_CB

%: %.c $(DEPS)
$(CC) $< $(DEBUGOPT) $(COMMONOPT) -o $@
Expand Down
3 changes: 2 additions & 1 deletion crypto/aes/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CC=gcc
CFLAGS=-Wall
LIBS= -lwolfssl -lm
WOLFSSL_INSTALL_DIR=/usr/local
LIBS=-L$(WOLFSSL_INSTALL_DIR)/lib -lwolfssl -lm

all: aes-file-encrypt aescfb-file-encrypt aesctr-file-encrypt aesgcm-file-encrypt

Expand Down
3 changes: 2 additions & 1 deletion crypto/camellia/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CC=gcc
CFLAGS=-Wall
LIBS= -lwolfssl
WOLFSSL_INSTALL_DIR=/usr/local
LIBS=-L$(WOLFSSL_INSTALL_DIR)/lib -lwolfssl

camellia-encrypt: camellia-encrypt.o
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
Expand Down
3 changes: 2 additions & 1 deletion crypto/pkcs12/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CC=gcc
CFLAGS=-Wall
LIBS= -lwolfssl
WOLFSSL_INSTALL_DIR=/usr/local
LIBS=-L$(WOLFSSL_INSTALL_DIR)/lib -lwolfssl

all:pkcs12-example pkcs12-create-example

Expand Down
5 changes: 4 additions & 1 deletion custom-io-callbacks/file-client/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
CC=clang

# if you installed wolfssl to /usr/local please make sure the path to
# /usr/local/include is in your -I path and /usr/local/lib is in your
# LD_LIBRARY_PATH

WOLFSSL_INSTALL_DIR = /usr/local
CFLAGS=-Wall
LIBS= -L/usr/local/lib -lwolfssl
LIBS=-L$(WOLFSSL_INSTALL_DIR)/lib -lwolfssl

all:start-client

Expand Down
5 changes: 4 additions & 1 deletion custom-io-callbacks/file-server/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
CC=clang

# if you installed wolfssl to /usr/local please make sure the path to
# /usr/local/include is in your -I path and /usr/local/lib is in your
# LD_LIBRARY_PATH

WOLFSSL_INSTALL_DIR = /usr/local
CFLAGS=-Wall
LIBS=-L/usr/local/lib -lwolfssl
LIBS=-L$(WOLFSSL_INSTALL_DIR)/lib -lwolfssl

all:start-server

Expand Down
8 changes: 4 additions & 4 deletions dtls/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# DTLS Examples Makefile
CC = gcc
LIB_PATH = /usr/local
CFLAGS = -Wall -I$(LIB_PATH)/include
LIBS = -L$(LIB_PATH)/lib -lm
WOLFSSL_INSTALL_DIR = /usr/local
CFLAGS = -Wall -I$(WOLFSSL_INSTALL_DIR)/include
LIBS = -L$(WOLFSSL_INSTALL_DIR)/lib -lm

# option variables
DYN_LIB = -lwolfssl
STATIC_LIB = $(LIB_PATH)/lib/libwolfssl.a
STATIC_LIB = $(WOLFSSL_INSTALL_DIR)/lib/libwolfssl.a
DEBUG_FLAGS = -g3 -DDEBUG -O0
DEBUG_INC_PATHS = -MD
OPTIMIZE = -Os
Expand Down
8 changes: 4 additions & 4 deletions ecc/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# ECC Examples Makefile
CC = gcc
LIB_PATH = /usr/local
CFLAGS = -Wall -I$(LIB_PATH)/include
LIBS = -L$(LIB_PATH)/lib -lm
WOLFSSL_INSTALL_DIR = /usr/local
CFLAGS = -Wall -I$(WOLFSSL_INSTALL_DIR)/include
LIBS = -L$(WOLFSSL_INSTALL_DIR)/lib -lm

# option variables
DYN_LIB = -lwolfssl -pthread
STATIC_LIB = $(LIB_PATH)/lib/libwolfssl.a
STATIC_LIB = $(WOLFSSL_INSTALL_DIR)/lib/libwolfssl.a
DEBUG_FLAGS = -g -DDEBUG
DEBUG_INC_PATHS = -MD
OPTIMIZE = -Os
Expand Down
8 changes: 4 additions & 4 deletions embedded/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# TLS Examples Makefile
CC = gcc
LIB_PATH = /usr/local
CFLAGS = -Wall -I$(LIB_PATH)/include
LIBS = -L$(LIB_PATH)/lib -lm
WOLFSSL_INSTALL_DIR = /usr/local
CFLAGS = -Wall -I$(WOLFSSL_INSTALL_DIR)/include
LIBS = -L$(WOLFSSL_INSTALL_DIR)/lib -lm

# option variables
DYN_LIB = -lwolfssl
STATIC_LIB = $(LIB_PATH)/lib/libwolfssl.a -lm
STATIC_LIB = $(WOLFSSL_INSTALL_DIR)/lib/libwolfssl.a -lm
DEBUG_FLAGS = -g -DDEBUG
DEBUG_INC_PATHS = -MD
OPTIMIZE = -Os
Expand Down
8 changes: 4 additions & 4 deletions hash/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Hash Examples Makefile
CC = gcc -fsanitize=address
LIB_PATH = /usr/local
CFLAGS = -Wall -I$(LIB_PATH)/include
LIBS = -L$(LIB_PATH)/lib -lm
WOLFSSL_INSTALL_DIR = /usr/local
CFLAGS = -Wall -I$(WOLFSSL_INSTALL_DIR)/include
LIBS = -L$(WOLFSSL_INSTALL_DIR)/lib -lm

# option variables
DYN_LIB = -lwolfssl
STATIC_LIB = $(LIB_PATH)/lib/libwolfssl.a
STATIC_LIB = $(WOLFSSL_INSTALL_DIR)/lib/libwolfssl.a
DEBUG_FLAGS = -g -DDEBUG
DEBUG_INC_PATHS = -MD
OPTIMIZE = -Os
Expand Down
8 changes: 4 additions & 4 deletions maxq10xx/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# MAXQ10xx Examples Makefile
CC = gcc
LIB_PATH = /usr/local
CFLAGS = -Wall -I$(LIB_PATH)/include
LIBS = -L$(LIB_PATH)/lib -lm
WOLFSSL_INSTALL_DIR = /usr/local
CFLAGS = -Wall -I$(WOLFSSL_INSTALL_DIR)/include
LIBS = -L$(WOLFSSL_INSTALL_DIR)/lib -lm

# option variables
DYN_LIB = -lwolfssl
STATIC_LIB = $(LIB_PATH)/lib/libwolfssl.a
STATIC_LIB = $(WOLFSSL_INSTALL_DIR)/lib/libwolfssl.a
DEBUG_FLAGS = -g -DDEBUG
DEBUG_INC_PATHS = -MD
OPTIMIZE = -Os
Expand Down
8 changes: 4 additions & 4 deletions ocsp/ocsp_nonblock/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Examples Makefile
CC = gcc
LIB_PATH = /usr/local
CFLAGS = -Wall -I$(LIB_PATH)/include
LIBS = -L$(LIB_PATH)/lib
WOLFSSL_INSTALL_DIR = /usr/local
CFLAGS = -Wall -I$(WOLFSSL_INSTALL_DIR)/include
LIBS = -L$(WOLFSSL_INSTALL_DIR)/lib

# option variables
DYN_LIB = -lwolfssl
STATIC_LIB = $(LIB_PATH)/lib/libwolfssl.a
STATIC_LIB = $(WOLFSSL_INSTALL_DIR)/lib/libwolfssl.a
DEBUG_FLAGS = -g -DDEBUG
DEBUG_INC_PATHS = -MD
OPTIMIZE = -Os
Expand Down
Loading

0 comments on commit 4c2f96f

Please sign in to comment.