X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=moebius2.git;a=blobdiff_plain;f=Makefile;h=221eadbe3f14d45bfa20510cefbba88a86434847;hp=9443d70dc9241974290d08ee973b243854564fba;hb=827bc2089edb91756a94e6ff04b67b1797a5c4a8;hpb=21a2bd20afe0f4673494f4841a5675ca68cbd2d7 diff --git a/Makefile b/Makefile index 9443d70..221eadb 100644 --- a/Makefile +++ b/Makefile @@ -11,9 +11,7 @@ SGTATHAM=sgtatham CWARNS= -Wall -Wwrite-strings -Wpointer-arith -Werror -Wshadow CXXWARNS= $(CWARNS) -Wno-shadow -Wno-error -NPROCCFLAGS := -DNPROCESSORS=$(shell ./nprocessors) - -OPTIMISE= -O2 +OPTIMISE= -O3 CFLAGS_UNIPROC= -MMD $(OPTIMISE) -g $(CWARNS) $(DIMCFLAGS) CXXFLAGS= -MMD $(OPTIMISE) -g $(CXXWARNS) CFLAGS= $(CFLAGS_UNIPROC) $(NPROCCFLAGS) @@ -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