chiark / gitweb /
build more stuff
[moebius2.git] / Makefile
index 9443d70dc9241974290d08ee973b243854564fba..706c35af1f06b2e09142dfbee730d62a178a96e6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
 
 ALLDIMS=33 64 125 246 487 968
 TARGETS= primer lumpy.cfm sgtatham.cfm ring.cfm \
-       minimise-33 minimise-64 \
+       minimise-33 minimise-64 minimise-125 minimise-246 \
        $(addprefix interpolate-, $(ALLDIMS)) \
        $(addprefix view-, $(ALLDIMS)) \
        $(addprefix output-, $(ALLDIMS))
@@ -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)
@@ -26,7 +24,8 @@ all:          $(TARGETS)
 
 compute:       all
                $(MAKE) best-33.CFM
-               $(MAKE) best-968.CFM
+               $(MAKE) best-64.CFM
+#              $(MAKE) best-968.CFM
 
 minimise:      energy.o graph.o common.o mgraph.o minimise.o half.o
                $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBGSL)
@@ -40,6 +39,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
 
@@ -115,10 +121,10 @@ interpolate+%.o: interpolate.c
 clean:
                rm -f prime.data $(TARGETS)
                rm -f *.o *.new *.tmp *.rej *.orig core vgcore.* *~
-               rm -f *.d *.cfm
+               rm -f *.d .alternately_*
 
 realclean:     clean
-               rm -f *.CFM
+               rm -f *.cfm *.CFM
 
 %.d: