commit c41c94106edc14432c31fbd42cb81842ef4b925b parent 9c1579e5f46c278778821ab129deec7fe342e94f Author: bsandro <email@bsandro.tech> Date: Fri, 27 Dec 2024 02:57:20 +0200 Makefile fix for OpenBSD Diffstat:
M | day13/Makefile | | | 2 | +- |
M | tpl/Makefile | | | 8 | +++++++- |
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/day13/Makefile b/day13/Makefile @@ -7,7 +7,7 @@ CXXSTD:=c++23 ifeq (${UNAME_S},OpenBSD) CXXSTD=c++2b endif -$(info advent of code on ${UNAME_S}) +$(info Using ${CXXSTD} on ${UNAME_S}) CXXFLAGS=-O2 -std=${CXXSTD} -Werror -Wall -Wextra -I. -I../include LDFLAGS=-lstdc++ diff --git a/tpl/Makefile b/tpl/Makefile @@ -2,7 +2,13 @@ NAME=$(shell basename ${PWD}) SRC=$(wildcard *.cpp) DEPS:=$(wildcard *.hpp) OBJ:=$(SRC:.cpp=.o) -CXXFLAGS=-O2 -std=c++23 -Werror -Wall -Wextra -I. -I../include +UNAME_S:=$(shell uname -s) +CXXSTD:=c++23 +ifeq (${UNAME_S},OpenBSD) +CXXSTD=c++2b +endif +$(info Using ${CXXSTD} on ${UNAME_S}) +CXXFLAGS=-O2 -std=${CXXSTD} -Werror -Wall -Wextra -I. -I../include LDFLAGS=-lstdc++ all: $(NAME)