fix for OSX

This commit is contained in:
proddy
2025-02-08 22:33:08 +00:00
parent e10ec26e79
commit 0fdba1f84d

View File

@@ -19,18 +19,20 @@ C = $(words $N)$(eval N := x $N)
ECHO = python3 $(I)/echo_progress.py --stepno=$C --nsteps=$T ECHO = python3 $(I)/echo_progress.py --stepno=$C --nsteps=$T
endif endif
# number of parallel compiles # determine number of parallel compiles based on OS
UNAME_S := $(shell uname -s) UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux) ifeq ($(UNAME_S),Linux)
CFLAGS += -D LINUX EXTRA_CPPFLAGS = -D LINUX
JOBS ?= $(shell nproc) JOBS ?= $(shell nproc)
endif endif
ifeq ($(UNAME_S),Darwin) ifeq ($(UNAME_S),Darwin)
CFLAGS += -D OSX EXTRA_CPPFLAGS = -D OSX -Wno-tautological-constant-out-of-range-compare
JOBS ?= $(shell sysctl -n hw.ncpu) JOBS ?= $(shell sysctl -n hw.ncpu)
endif endif
MAKEFLAGS += -j $(JOBS) -l $(JOBS) MAKEFLAGS += -j $(JOBS) -l $(JOBS)
# $(info Number of jobs: $(JOBS))
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# Project Structure # Project Structure
#---------------------------------------------------------------------- #----------------------------------------------------------------------
@@ -103,7 +105,8 @@ CPPFLAGS += -Wall -Wextra -Werror
CPPFLAGS += -Wswitch-enum CPPFLAGS += -Wswitch-enum
CPPFLAGS += -Wno-unused-parameter CPPFLAGS += -Wno-unused-parameter
CPPFLAGS += -Wno-missing-braces CPPFLAGS += -Wno-missing-braces
# CPPFLAGS += -Wno-tautological-constant-out-of-range-compare
CPPFLAGS += $(EXTRA_CPPFLAGS)
CFLAGS += $(CPPFLAGS) CFLAGS += $(CPPFLAGS)
CXXFLAGS += $(CPPFLAGS) CXXFLAGS += $(CPPFLAGS)