chiark
/
gitweb
/
~ian
/
moebius2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
best interpolation so far
[moebius2.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index 9c82be7b10a0e3dc4eff139e1a01b0ade6d3fe8f..ecccd72524fcd94b895bfd509ddc5e4ccd7da876 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,8
+1,9
@@
-VIEWDIMS=33
44 5
5
+VIEWDIMS=33
64 12
5
TARGETS= minimise primer lumpy.cfm sgtatham.cfm ring.cfm \
TARGETS= minimise primer lumpy.cfm sgtatham.cfm ring.cfm \
- $(addprefix view+, $(VIEWDIMS))
+ interpolate-64 \
+ $(addprefix view-, $(VIEWDIMS))
SGTATHAM=sgtatham
CWARNS= -Wall -Wwrite-strings -Wpointer-arith -Werror -Wshadow
SGTATHAM=sgtatham
CWARNS= -Wall -Wwrite-strings -Wpointer-arith -Werror -Wshadow
@@
-18,6
+19,8
@@
o= >$@.new && mv -f $@.new $@
all: $(TARGETS)
all: $(TARGETS)
+compute: best.CFM
+
minimise: energy.o graph.o common.o mgraph.o minimise.o half.o
$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBGSL)
minimise: energy.o graph.o common.o mgraph.o minimise.o half.o
$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBGSL)
@@
-37,27
+40,44
@@
lumpy.cfm: oldmoebius-converter prime.data ../moebius/ins-new ../moebius/a.out
ring.cfm: oldmoebius-converter prime.data /dev/null ../moebius/a.out
./$^ -o$@
ring.cfm: oldmoebius-converter prime.data /dev/null ../moebius/a.out
./$^ -o$@
+best.CFM:
+ ./minimise sgtatham.cfm -iwip.cfm -o$@
-# this ridiculous repetition is due to make being too lame
-
-view+%: view+%.o mgraph+%.o common.o
+view-%: view+%.o mgraph+%.o common.o
$(CC) $(CFLAGS) -o $@ $^ $(LIBGSL) -L/usr/X11R6/lib -lX11
$(CC) $(CFLAGS) -o $@ $^ $(LIBGSL) -L/usr/X11R6/lib -lX11
-view+%.o: view.c
- $(CC) -c $(CPPFLAGS) $(CFLAGS) -DDEFBITS=$* $< -o $@
+interpolate-%: interpolate+%.o mgraph+%.o common.o
+ $(CC) $(CFLAGS) -o $@ $^ $(LIBGSL)
+
+define interpolate
+dense-$1.cfm: interpolate-$1 $2
+ ./$$< <$2 $$o
+endef
-mgraph+%.o: mgraph.c
- $(CC) -c $(CPPFLAGS) $(CFLAGS) -DDEFBITS=$* $< -o $@
+$(eval $(call interpolate,64, best.CFM))
+$(eval $(call interpolate,125, dense-64.cfm, dense-64.cfm))
-.PRECIOUS: view+%.o mgraph+%.o
+# this ridiculous repetition is due to make being too lame
+
+view+%.o: view.c
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -DDEFSZ=$* $< -o $@
+
+mgraph+%.o: mgraph.c
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -DDEFSZ=$* $< -o $@
+interpolate+%.o: interpolate.c
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -DDEFSZ=$* $< -o $@
+
+.PRECIOUS: view+%.o mgraph+%.o interpolate+%.o
clean:
rm -f prime.data $(TARGETS)
rm -f *.o *.new *.tmp *.rej *.orig core vgcore.* *~
clean:
rm -f prime.data $(TARGETS)
rm -f *.o *.new *.tmp *.rej *.orig core vgcore.* *~
- rm -f *.d
+ rm -f *.d
*.cfm
realclean: clean
realclean: clean
- rm -f best
+ rm -f *.CFM
+
+%.d:
-include *.d
-include *.d