Skip to content

Commit

Permalink
#553: [pyclustering.ccore] Linux/MacOS/Cygwin parallel compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
annoviko committed Oct 10, 2019
1 parent a72bb56 commit 69812c4
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion ccore/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,21 @@


MAKE = make
MKFLAG = -f

NCORES = 1
UNAME = $(shell uname -s | tr '[:upper:]' '[:lower:]')
ifeq ($(findstring cygwin, $(UNAME)), cygwin)
NCORES = $(shell grep -c ^processor /proc/cpuinfo)
else
ifeq ($(UNAME), darwin)
NCORES = $(shell system_profiler | awk '/Number of CPUs/ {print $$4}{next;}')
else
NCORES = $(shell grep -c ^processor /proc/cpuinfo)
endif
endif


MKFLAG = -j$(NCORES) -f


default:
Expand Down

0 comments on commit 69812c4

Please sign in to comment.