From 0594ac9ba0f38944ef810b5ac48a2067b1ce5a09 Mon Sep 17 00:00:00 2001 From: Joel Grunbaum <joelgrun@gmail.com> Date: Tue, 11 Jan 2022 08:00:10 +0000 Subject: [PATCH] Copied libcurl's ftp example --- Makefile | 33 +++++++++++++++++++++++---------- 1 files changed, 23 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index b57ea21..c4a87c1 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,29 @@ -CC=clang -CXX=clang -CXXFLAGS=-g -Wall -std=c++20 +OS=$(shell uname) +CXX=g++ +CXXFLAGS=-g -Wall --std=c++20 -.PHONY: default all -default: all +ifneq ($(OS),Darwin) +CXXFLAGS += -static +endif -all: exec +json=json.o +ws=easywsclient/easywsclient.o +main=${json} ${ws} protocol.o book.o -exec: main.o book.o - ${CXX} -o $@ $^ +default: test click bot -%: %.cpp %.hpp - ${CXX} ${CXXFLAGS} -o $@ $^ +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 -- Gitblit v1.9.3