OS=$(shell uname) CXX=g++ 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 main=${json} ${ws} protocol.o book.o default: test click bot test: test.o strat.o ${main} ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ $^ click: click.o ${main} ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ $^ bot: bot.o strat.o ${main} ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ $^ %.o: %.cpp ${CXX} ${CXXFLAGS} -c -o $@ $^ .PHONY: clean clean: rm -f ${main} test click bot