# set ARCH in your environment if you want to do a multible architecture # build. This means you Mac users. # ARCH= -arch x386 -arch x86_64 LDFLAGS= $(ARCH) -lm CFLAGS= -Wall -Wno-parentheses $(ARCH) -I. -I.. OBJS= hexmap.o SRC=$(OBJS:.o=.c) TESTS= t/cantor.t t/distance.t t/adjacency.t t/range.t t/hexbin.t \ t/gridsize.t t/center.t all: test libhexmap.a clean: rm -f $(OBJS) libhexmap.a $(TESTS) t/%.t: t/%.o t/tap.o $(OBJS) $(CC) -I.. -I. -o $@ $+ $(LDFLAGS) test: $(TESTS) @prove --exec '' 2>/dev/null hextest: hextest.c libhexmap.a $(CC) $(CFLAGS) -o $@ hextest.c -L. -lhexmap libhexmap.a: $(OBJS) ar r $@ $+ ranlib $@ .c.o: $(CC) $(CFLAGS) -c -o $@ $< .SUFFIXES: .c .h