Increase the size of the 'message' buffer, which is currently
[sgt/tweak] / Makefile
index a2286ec..91086bb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,31 @@
+# Useful options you might want to put on the make command line:
+#
+#  - `SLANG=yes' to build against libslang instead of libncurses
+#    (libncurses is better and more reliable, but libslang might be
+#    all you have on a particular platform if you're unlucky).
+#
+#  - `XFLAGS=-DNO_LARGE_FILES' to leave out the 64-bit file access
+#    support (restricts Tweak to editing files under 2Gb, but
+#    should cause it to compile successfully on platforms without
+#    fseeko and ftello and/or long long support).
+#
+#  - `VERSION=X.XX' (for whatever X.XX you like) to cause the `make
+#    release' target to build a release tarball called
+#    `tweak-X.XX.tar.gz' which unpacks into a directory
+#    `tweak-X.XX'. Note that you also need to modify the version
+#    number in tweak.h, or else the resulting binary won't match
+#    the version number on the archive.
+
 CC := gcc
 CFLAGS := -g -c -Wall $(XFLAGS)
 LINK := gcc
 LFLAGS :=
 LIBS := 
 
+PREFIX=/usr/local
+BINDIR=$(PREFIX)/bin
+MANDIR=$(PREFIX)/man/man1
+
 TWEAK := main.o keytab.o actions.o search.o rcfile.o buffer.o btree.o
 
 ifeq ($(SLANG),yes)
@@ -34,12 +56,18 @@ btree.html:  btree.but
 # command like `make release VERSION=3.00'.
 release: tweak.1 btree.html
        mkdir -p reltmp/tweak-$(VERSION)
-       for i in *.c *.h *.but tweak.1 btree.html Makefile; do   \
+       for i in LICENCE *.c *.h *.but tweak.1 btree.html Makefile; do   \
                ln -s ../../$$i reltmp/tweak-$(VERSION);         \
        done
        (cd reltmp; tar chzvf ../tweak-$(VERSION).tar.gz tweak-$(VERSION))
        rm -rf reltmp
 
+install: tweak tweak.1
+       mkdir -p $(BINDIR)
+       install tweak $(BINDIR)/tweak
+       mkdir -p $(MANDIR)
+       install -m 0644 tweak.1 $(MANDIR)/tweak.1
+
 clean:
        rm -f *.o tweak tweak.1 btree.html