mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
make makefile work for OSX
This commit is contained in:
10
Makefile
10
Makefile
@@ -16,11 +16,19 @@ T := $(shell $(MAKE) $(MAKECMDGOALS) --no-print-directory \
|
||||
ECHO="COUNTTHIS" | grep -c "COUNTTHIS")
|
||||
N := x
|
||||
C = $(words $N)$(eval N := x $N)
|
||||
ECHO = python $(I)/echo_progress.py --stepno=$C --nsteps=$T
|
||||
ECHO = python3 $(I)/echo_progress.py --stepno=$C --nsteps=$T
|
||||
endif
|
||||
|
||||
# number of parallel compiles
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Linux)
|
||||
CFLAGS += -D LINUX
|
||||
JOBS ?= $(shell nproc)
|
||||
endif
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
CFLAGS += -D OSX
|
||||
JOBS ?= $(shell sysctl -n hw.ncpu)
|
||||
endif
|
||||
MAKEFLAGS += -j $(JOBS) -l $(JOBS)
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user