mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
fix for OSX
This commit is contained in:
11
Makefile
11
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)
|
||||
|
||||
Reference in New Issue
Block a user