X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=Makefile;h=927f45d1a8e60855abc87ebb43f1652cc1f26387;hb=135adb1269cc41c10ebaf03e72d7258fd9e88a7d;hp=9443d70dc9241974290d08ee973b243854564fba;hpb=21a2bd20afe0f4673494f4841a5675ca68cbd2d7;p=moebius2.git diff --git a/Makefile b/Makefile index 9443d70..927f45d 100644 --- a/Makefile +++ b/Makefile @@ -11,8 +11,6 @@ SGTATHAM=sgtatham CWARNS= -Wall -Wwrite-strings -Wpointer-arith -Werror -Wshadow CXXWARNS= $(CWARNS) -Wno-shadow -Wno-error -NPROCCFLAGS := -DNPROCESSORS=$(shell ./nprocessors) - OPTIMISE= -O2 CFLAGS_UNIPROC= -MMD $(OPTIMISE) -g $(CWARNS) $(DIMCFLAGS) CXXFLAGS= -MMD $(OPTIMISE) -g $(CXXWARNS) @@ -40,6 +38,13 @@ nprocessors: nprocessors.o common.o common.o nprocessors.o: %.o: %.c $(CC) -c $(CPPFLAGS) $(CFLAGS_UNIPROC) $< -o $@ +.nprocessors.make: ./nprocessors + set -e; n=`./nprocessors`; \ + echo "NPROCCFLAGS := -DNPROCESSORS=$$n" $o + +include .nprocessors.make + + prime.data: primer ./$^ $o