From 353657fa069326a4036f2c9872e420c85f44b4e9 Mon Sep 17 00:00:00 2001
From: Joel Grunbaum <joel.grunbaum@imc.com>
Date: Wed, 12 Jan 2022 02:25:20 +0000
Subject: [PATCH] Added optimisation and test exchange selection in Makefile

---
 Makefile |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index bcc17bc..94e9115 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,22 @@
+OS=$(shell uname)
 CXX=g++
-CXXFLAGS=-g -Wall -static
-#LDFLAGS=-rpath=/lib64/libstdc++.so.6
+CXXFLAGS=-std=c++20
+DEV=1
+TEST=1
 
+ifeq ($(DEV),1)
+	CXXFLAGS += -Wall -g
+else
+	CXXFLAGS += -O3 -flto
+endif
+
+ifneq ($(OS),Darwin)
+CXXFLAGS += -static
+endif
+
+ifeq ($(TEST),1)
+	CXXFLAGS += -DTEST_EXCHANGE
+endif
 
 json=json.o
 ws=easywsclient/easywsclient.o

--
Gitblit v1.9.3