From 42928409c813ffd02f5b48533c0772f03cd45da9 Mon Sep 17 00:00:00 2001 From: "Cheng Ho Ming, Eric" Date: Mon, 1 Jul 2024 13:02:25 +0800 Subject: [PATCH] apple special build --- Makefile | 10 ++++++++-- src/format.cpp | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b624f0a3..95832d1e 100644 --- a/Makefile +++ b/Makefile @@ -25,8 +25,8 @@ CXX = g++ INCLUDES = -Iinclude OUTPUT = stocksim -CXXFLAGS += -Wall -Wextra -pedantic -std=c++17 -Werror -g \ - -Wcast-qual -Wundef -Wswitch -Wshadow -Wold-style-cast +CXXFLAGS += -Wall -Wextra -pedantic -std=c++17 -Werror -s \ + -Wcast-qual -Wundef -Wswitch -Wshadow -Wold-style-cast -static -Os -flto # -Wconversion -Wfloat-equal # -fsanitize=address -fsanitize=undefined @@ -165,6 +165,12 @@ endif endif endif +ifeq ($(MAKECMDGOALS),release) +ifeq ($(OUTPUT),stocksim) +OUTPUT = stocksim-release.exe +endif +endif + release: clean # this should put after default target "$(MAKE)" stocksim \ diff --git a/src/format.cpp b/src/format.cpp index 71376cde..925ee02a 100644 --- a/src/format.cpp +++ b/src/format.cpp @@ -47,7 +47,7 @@ const string bgWhite = "\x1b[47m"; const int sleepShort = 100; const int sleepMedium = 500; -const int sleepLong = 1000; +const int sleepLong = 0; void time::sleep(int dur) { std::this_thread::sleep_for(std::chrono::milliseconds(dur));