X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=Makefile;h=15e4ae0f1eb983d28c66d84fe104baf35b875ca8;hb=13f94397661f67256a68849da13d2029880647c2;hp=9e3aa83e3b8a14a5bb23fce18620b9f00a3cfebb;hpb=2c2c1cc2745430048709dc3b11aef7071d802c86;p=moebius2.git diff --git a/Makefile b/Makefile index 9e3aa83..15e4ae0 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,46 @@ -TARGETS=minimise +TARGETS= minimise primer view lumpy.cfm sgtatham.cfm ring.cfm -CFLAGS= -Wall -Wwrite-strings -Wpointer-arith -Werror +CWARNS= -Wall -Wwrite-strings -Wpointer-arith -Werror -Wshadow +CXXWARNS= $(CWARNS) -Wno-shadow -Wno-error + +OPTIMISE= -O2 +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 +minimise: energy.o graph.o common.o mgraph.o minimise.o half.o + $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBGSL) + +primer: primer.o common.o + $(CC) $(CFLAGS) -o $@ $^ $(LIBGSL) + +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 - 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 + +-include *.d