X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=moebius2.git;a=blobdiff_plain;f=Makefile;h=3bb3ef9e1075276ac985ea1cf3e2f8a79a0a9691;hp=fc74681e0e4b665f103753745e045dc5df7cd339;hb=38a973f8180c4711993d8c28fcccb2e8a9aea065;hpb=f5fef8bc75d9d5658705763fa7c083ae75a501ba diff --git a/Makefile b/Makefile index fc74681..3bb3ef9 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,17 @@ -TARGETS= minimise primer initial +TARGETS= minimise primer view lumpy.cfm sgtatham.cfm ring.cfm -CWARNS= -Wall -Wwrite-strings -Wpointer-arith -Werror +CWARNS= -Wall -Wwrite-strings -Wpointer-arith -Werror -Wshadow +CXXWARNS= $(CWARNS) -Wno-shadow -Wno-error OPTIMISE= -O2 -CFLAGS= $(CWARNS) $(OPTIMISE) -g -CXXFLAGS= $(CWARNS) $(OPTIMISE) -g +CFLAGS= -MMD $(OPTIMISE) -g $(CWARNS) +CXXFLAGS= -MMD $(OPTIMISE) -g $(CXXWARNS) LIBGSL= -lgsl -lgslcblas +o= >$@.new && mv -f $@.new $@ + all: $(TARGETS) minimise: energy.o bgl.o common.o mgraph.o @@ -17,11 +20,27 @@ minimise: energy.o bgl.o common.o mgraph.o primer: primer.o common.o $(CC) $(CFLAGS) -o $@ $^ $(LIBGSL) -initial: generator primer sgtatham/z.typescript +prime.data: primer + ./$^ $o + +view: view.o common.o mgraph.o + $(CC) $(CFLAGS) -o $@ $^ $(LIBGSL) -L/usr/X11R6/lib -lX11 + +sgtatham.cfm: sgtatham-regenerator prime.data sgtatham/z.typescript + ./$^ -T -o$@ + +lumpy.cfm: oldmoebius-converter prime.data ../moebius/ins-new ../moebius/a.out + ./$^ -o$@ + +ring.cfm: oldmoebius-converter prime.data /dev/null ../moebius/a.out ./$^ -o$@ clean: - rm -f *.o $(TARGETS) *.new *.tmp - rm -f best initial + rm -f prime.data $(TARGETS) + rm -f *.o *.new *.tmp *.rej *.orig core vgcore.* *~ + rm -f *.d + +realclean: clean + rm -f best -%.o:: common.h mgraph.h bgl.h +-include *.d