forked from wolfSSL/wolfssl-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (31 loc) · 906 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# BTLE Examples Makefile
CC = gcc
WOLFSSL_INSTALL_DIR = /usr/local
CFLAGS = -Wall -I ../common -I $(WOLFSSL_INSTALL_DIR)/include
LIBS = -L$(WOLFSSL_INSTALL_DIR)/lib
# Flags
DYN_LIB = -lwolfssl
STATIC_LIB =
DEBUG_FLAGS = -g -DDEBUG -DDEBUG_WOLFSSL -DDEBUG_BTLE_IO
OPTIMIZE = -Os
# Options
#CFLAGS+=$(DEBUG_FLAGS)
CFLAGS+=$(OPTIMIZE)
# Static or Dynamic Library
#STATIC_LIB+=$(WOLFSSL_INSTALL_DIR)/lib/libwolfssl.a
LIBS+=$(DYN_LIB) -lm
.PHONY: clean all
all: server-tls13-btle client-tls13-btle
debug: CFLAGS+=$(DEBUG_FLAGS)
debug: all
# build template
%.o: %.c
gcc -c $< -o $@ $(CFLAGS)
server-tls13-btle: server-tls13-btle.o ../common/btle-sim.o $(STATIC_LIB)
$(CC) $^ -o $@ $(LIBS)
client-tls13-btle: client-tls13-btle.o ../common/btle-sim.o $(STATIC_LIB)
$(CC) $^ -o $@ $(LIBS)
clean:
rm -f *.o ../*.o
rm -f server-tls13-btle
rm -f client-tls13-btle