# This file is in the public domain. # # Makefile for table-and-glasses solver. PUZZLES is a list of puzzles # to build solvers for, in the form W-H. The rest is fairly simple. # # Make with VERBOSE= on the make command line to build with -DVERBOSE # (see solve.c for what this does). # # This does require a make which accepts BSD make syntax. If you're # stuck with something else, either get a BSD make or rewrite the # Makefile to fit whatever syntax your make provides for the various # non-least-common-denominator features used here. # CC_ADD = -g PUZZLES = \ 4-2 \ 5-2 5-3 \ 6-2 6-3 6-4 \ 7-2 7-3 7-4 7-5 \ 8-2 8-3 8-4 8-5 8-6 \ 9-2 9-3 9-4 9-5 9-6 9-7 BUILDBINS = .for p in $(PUZZLES) BUILDBINS += solve-$p OBJ_solve-$p = solve-$p.o LIBS_solve-$p = -lavl .endfor OBJ_gen-values = gen-values.o .if defined(VERBOSE) CC_ADD += -DVERBOSE .endif .MAIN: $(BUILDBINS) showv: @echo CC_ADD is $(CC_ADD) .for p in $(PUZZLES) solve-$p.o: solve.c inc-$p $(CC) -c -o solve-$p.o -DINC_NAME=\"inc-$p\" solve.c inc-$p: gen-values gen-values $(p:C/-.*//) $(p:C/.*-//) > inc-$p CLEANFILES += inc-$p .endfor .include