1 # set ARCH in your environment if you want to do a multible architecture
2 # build. This means you Mac users.
3 # ARCH= -arch x386 -arch x86_64
6 CFLAGS= -Wall -Wno-parentheses $(ARCH) -I. -I..
7 OBJS= hexagon.o astar.o
9 TESTS= t/cantor.t t/distance.t t/adjacency.t t/range.t t/hexbin.t \
10 t/gridsize.t t/center.t t/astar.t
13 all: libhexagon.a docs testfiles
16 rm -f $(OBJS) libhexagon.a $(TESTS)
18 t/%.t: t/%.o t/tap.o $(OBJS)
19 $(CC) -I.. -I. -o $@ $+ $(LDFLAGS)
23 test: libhexagon.a $(TESTS)
24 @prove --exec '' 2>/dev/null
30 install: libhexagon.a hexagon.h doc/hexagon.3
31 cp libhexagon.a $(PREFIX)/lib
32 cp hexagon.h $(PREFIX)/include
33 cp doc/hexagon.3 $(PREFIX)/share/man/man3
39 $(CC) $(CFLAGS) -c -o $@ $<