From 8e2913bfbd2ae3cd8a2d07b879f0e78e455fed6f Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Sat, 27 Nov 2010 06:39:23 +0000 Subject: [PATCH] added install target, README --- Makefile | 6 ++++++ README | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 README diff --git a/Makefile b/Makefile index 9b2f442..b551840 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ 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 @@ -24,6 +25,11 @@ 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 diff --git a/README b/README new file mode 100644 index 0000000..328553f --- /dev/null +++ b/README @@ -0,0 +1,18 @@ +Compiling + +A simple make will compile the library, run the tests, and create the +man page. Running the tests is dependent on having a 'prove' +command that will run a test harness. This would normally +be installed with perl. + +Installing + +make install will install the library to /usr/local. If you +want it somewhere else, you can pass PREFIX to make like so: + +make PREFIX=/usr install + +License + +This library is in the public domain. All of the code was +written by Nathan Wagner. -- 2.40.0