]> pd.if.org Git - hexagon/blobdiff - Makefile
Removed test from default make target.
[hexagon] / Makefile
index 9b2f4426ffc8f1cda05ba94a46b00e0bf69184af..e0789e5ba9888d6286f8dec34dfd107911e8f0f1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,8 +8,9 @@ OBJS= hexagon.o astar.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 t/astar.t
+PREFIX=/usr/local
 
-all:   test libhexagon.a docs
+all:   libhexagon.a docs
 
 clean:
        rm -f $(OBJS) libhexagon.a $(TESTS)
@@ -17,13 +18,18 @@ clean:
 t/%.t:  t/%.o t/tap.o $(OBJS)
        $(CC) -I.. -I. -o $@ $+ $(LDFLAGS)
 
-test:   $(TESTS)
+test:   libhexagon.a $(TESTS)
        @prove --exec '' 2>/dev/null
 
 libhexagon.a:  $(OBJS)
        ar r $@ $+
        ranlib $@
 
+install: libhexagon.a hexagon.h doc/hexagon.3
+       cp libhexagon.a $(PREFIX)/lib
+       cp hexagon.h $(PREFIX)/include
+       cp doc/hexagon.3 $(PREFIX)/share/man/man3
+
 docs:
        make -C doc