mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49: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
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user