From 0fdba1f84db59ea786b974bb4c8a68e04ed17515 Mon Sep 17 00:00:00 2001 From: proddy Date: Sat, 8 Feb 2025 22:33:08 +0000 Subject: [PATCH] fix for OSX --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 5e123d302..3acaa5796 100644 --- a/Makefile +++ b/Makefile @@ -19,18 +19,20 @@ C = $(words $N)$(eval N := x $N) ECHO = python3 $(I)/echo_progress.py --stepno=$C --nsteps=$T endif -# number of parallel compiles +# determine number of parallel compiles based on OS UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) - CFLAGS += -D LINUX + EXTRA_CPPFLAGS = -D LINUX JOBS ?= $(shell nproc) endif ifeq ($(UNAME_S),Darwin) - CFLAGS += -D OSX + EXTRA_CPPFLAGS = -D OSX -Wno-tautological-constant-out-of-range-compare JOBS ?= $(shell sysctl -n hw.ncpu) endif MAKEFLAGS += -j $(JOBS) -l $(JOBS) +# $(info Number of jobs: $(JOBS)) + #---------------------------------------------------------------------- # Project Structure #---------------------------------------------------------------------- @@ -103,7 +105,8 @@ CPPFLAGS += -Wall -Wextra -Werror CPPFLAGS += -Wswitch-enum CPPFLAGS += -Wno-unused-parameter CPPFLAGS += -Wno-missing-braces -# CPPFLAGS += -Wno-tautological-constant-out-of-range-compare + +CPPFLAGS += $(EXTRA_CPPFLAGS) CFLAGS += $(CPPFLAGS) CXXFLAGS += $(CPPFLAGS)