pq-tls-perf-testing/bssl_perf/Makefile

39 regels
877 B
Makefile

BORINGSSL_DIR=/home/hdc/repos/cloudflare/boringssl
BORINGSSL_LIB=$(BORINGSSL_DIR)/build.64bitRel/
CC = clang
SRCDIR = src
OBJDIR = obj
DBG ?= 0
ifeq ($(DBG),1)
DEBUG = -DDEBUG -g -O0
else
DEBUG = -O3 -g
endif
CFLAGS = -std=c99 -D_POSIX_C_SOURCE=199309L
CFLAGS+= $(DEBUG)
CFLAGS+= -I$(BORINGSSL_DIR)/ -I$(BORINGSSL_DIR)/include
LDFLAGS = -L$(BORINGSSL_LIB)/crypto -L$(BORINGSSL_LIB)/ssl
LDFLAGS+= -lssl -lcrypto -lpthread
all: server client
clean:
rm -rf $(OBJDIR)
rm -rf client server
client: common
$(CC) -c $(SRCDIR)/client.c -o $(OBJDIR)/client.o $(CFLAGS)
$(CC) -o client $(OBJDIR)/client.o $(OBJDIR)/common.o $(LDFLAGS)
server: common
$(CC) -c $(SRCDIR)/server.c -o $(OBJDIR)/server.o $(CFLAGS)
$(CC) -o server $(OBJDIR)/server.o $(OBJDIR)/common.o $(LDFLAGS)
common:
mkdir -p $(OBJDIR)
$(CC) -c $(SRCDIR)/common.c -o $(OBJDIR)/common.o $(CFLAGS)