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: test libhexagon.a docs
16 rm -f $(OBJS) libhexagon.a $(TESTS)
18 t/%.t: t/%.o t/tap.o $(OBJS)
19 $(CC) -I.. -I. -o $@ $+ $(LDFLAGS)
22 @prove --exec '' 2>/dev/null
28 install: libhexagon.a hexagon.h doc/hexagon.3
29 cp libhexagon.a $(PREFIX)/lib
30 cp hexagon.h $(PREFIX)/include
31 cp doc/hexagon.3 $(PREFIX)/share/man/man3
37 $(CC) $(CFLAGS) -c -o $@ $<