1 # Useful options you might want to put on the make command line:
3 # - `SLANG=yes' to build against libslang instead of libncurses
4 # (libncurses is better and more reliable, but libslang might be
5 # all you have on a particular platform if you're unlucky).
7 # - `XFLAGS=-DNO_LARGE_FILES' to leave out the 64-bit file access
8 # support (restricts Tweak to editing files under 2Gb, but
9 # should cause it to compile successfully on platforms without
10 # fseeko and ftello and/or long long support).
12 # - `VERSION=X.XX' (for whatever X.XX you like) to cause the `make
13 # release' target to build a release tarball called
14 # `tweak-X.XX.tar.gz' which unpacks into a directory
15 # `tweak-X.XX'. Note that you also need to modify the version
16 # number in tweak.h, or else the resulting binary won't match
17 # the version number on the archive.
20 CFLAGS
:= -g
-c
-Wall
$(XFLAGS
)
27 MANDIR
=$(PREFIX
)/man
/man1
29 TWEAK
:= main.o keytab.o actions.o search.o rcfile.o buffer.o btree.o
32 # INCLUDE += -I/path/to/slang/include
33 # LIBS += -L/path/to/slang/lib
44 all: tweak tweak
.1 btree.html
47 $(LINK
) -o tweak
$(TWEAK
) $(LIBS
)
55 # Ensure tweak.h reflects this version number, and then run a
56 # command like `make release VERSION=3.00'.
57 release
: tweak
.1 btree.html
58 mkdir
-p reltmp
/tweak-
$(VERSION
)
59 for i in LICENCE
*.c
*.h
*.but tweak
.1 btree.html Makefile
; do \
60 ln
-s ..
/..
/$$i reltmp
/tweak-
$(VERSION
); \
62 (cd reltmp
; tar chzvf ..
/tweak-
$(VERSION
).
tar.gz tweak-
$(VERSION
))
65 install: tweak tweak
.1
67 install tweak
$(BINDIR
)/tweak
69 install -m
0644 tweak
.1 $(MANDIR
)/tweak
.1
72 rm -f
*.o tweak tweak
.1 btree.html
74 main.o
: main.c tweak.h
75 keytab.o
: keytab.c tweak.h
76 actions.o
: actions.c tweak.h
77 search.o
: search.c tweak.h
78 rcfile.o
: rcfile.c tweak.h
79 buffer.o
: buffer.c tweak.h btree.h
80 slang.o
: slang.c tweak.h
81 curses.o
: curses.c tweak.h
82 btree.o
: btree.c btree.h