Browse Source

Allow to force the number of parallel make job

This is particularly useful when using distcc
tags/v0.2.16.rc1
Jerome Robert 9 years ago
parent
commit
ba024fcfc0
3 changed files with 11 additions and 1 deletions
  1. +4
    -0
      Makefile.rule
  2. +4
    -0
      Makefile.system
  3. +3
    -1
      getarch.c

+ 4
- 0
Makefile.rule View File

@@ -108,6 +108,10 @@ NO_AFFINITY = 1
# Don't use parallel make.
# NO_PARALLEL_MAKE = 1

# Force number of make jobs. The default is the number of logical CPU of the host.
# This is particularly useful when using distcc
# MAKE_NB_JOBS = 2

# If you would like to know minute performance report of GotoBLAS.
# FUNCTION_PROFILE = 1



+ 4
- 0
Makefile.system View File

@@ -139,6 +139,10 @@ NO_PARALLEL_MAKE=0
endif
GETARCH_FLAGS += -DNO_PARALLEL_MAKE=$(NO_PARALLEL_MAKE)

ifdef MAKE_NB_JOBS
GETARCH_FLAGS += -DMAKE_NB_JOBS=$(MAKE_NB_JOBS)
endif

ifeq ($(HOSTCC), loongcc)
GETARCH_FLAGS += -static
endif


+ 3
- 1
getarch.c View File

@@ -998,7 +998,9 @@ int main(int argc, char *argv[]){
#endif
#endif

#if NO_PARALLEL_MAKE==1
#ifdef MAKE_NB_JOBS
printf("MAKE += -j %d\n", MAKE_NB_JOBS);
#elif NO_PARALLEL_MAKE==1
printf("MAKE += -j 1\n");
#else
#ifndef OS_WINDOWS


Loading…
Cancel
Save