X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=moebius2.git;a=blobdiff_plain;f=Makefile;h=9c82be7b10a0e3dc4eff139e1a01b0ade6d3fe8f;hp=d0e7f2e70cf70e28642d7f640cc7a1d1cc591da1;hb=3c0d58c901fd6f8265dad93f096d2ae03866fc6e;hpb=fe0566cb1f070bcad4d8afa20457d6937137482d diff --git a/Makefile b/Makefile index d0e7f2e..9c82be7 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,63 @@ -TARGETS=minimise -CWARNS= -Wall -Wwrite-strings -Wpointer-arith -Werror +VIEWDIMS=33 44 55 +TARGETS= minimise primer lumpy.cfm sgtatham.cfm ring.cfm \ + $(addprefix view+, $(VIEWDIMS)) +SGTATHAM=sgtatham + +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) $(DIMCFLAGS) +CXXFLAGS= -MMD $(OPTIMISE) -g $(CXXWARNS) + +LIBGSL= -lgsl -lgslcblas + +o= >$@.new && mv -f $@.new $@ all: $(TARGETS) -minimise: energy.o bgl.o common.o mgraph.o - $(CXX) $(CXXFLAGS) -o $@ $^ -lgsl -lgslcblas +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 + + +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$@ + + +# this ridiculous repetition is due to make being too lame + +view+%: view+%.o mgraph+%.o common.o + $(CC) $(CFLAGS) -o $@ $^ $(LIBGSL) -L/usr/X11R6/lib -lX11 + +view+%.o: view.c + $(CC) -c $(CPPFLAGS) $(CFLAGS) -DDEFBITS=$* $< -o $@ + +mgraph+%.o: mgraph.c + $(CC) -c $(CPPFLAGS) $(CFLAGS) -DDEFBITS=$* $< -o $@ + +.PRECIOUS: view+%.o mgraph+%.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