Er, that's svn:keywords not svn_keywords. Fix property.
[sgt/tweak] / Makefile
CommitLineData
6e182d98 1CC := gcc
2CFLAGS := -g -c -Wall $(XFLAGS)
3LINK := gcc
4LFLAGS :=
5LIBS :=
6
7TWEAK := main.o keytab.o actions.o search.o rcfile.o buffer.o btree.o
8
9ifeq ($(SLANG),yes)
10# INCLUDE += -I/path/to/slang/include
11# LIBS += -L/path/to/slang/lib
12LIBS += -lslang
13TWEAK += slang.o
14else
15LIBS += -lncurses
16TWEAK += curses.o
17endif
18
19.c.o:
20 $(CC) $(CFLAGS) $*.c
21
d28a4799 22all: tweak tweak.1 btree.html
6e182d98 23
24tweak: $(TWEAK)
25 $(LINK) -o tweak $(TWEAK) $(LIBS)
26
27tweak.1: manpage.but
28 halibut --man=$@ $<
29
d28a4799 30btree.html: btree.but
31 halibut --html=$@ $<
32
33# Ensure tweak.h reflects this version number, and then run a
34# command like `make release VERSION=3.00'.
35release: tweak.1 btree.html
36 mkdir -p reltmp/tweak-$(VERSION)
37 for i in *.c *.h *.but tweak.1 btree.html Makefile; do \
38 ln -s ../../$$i reltmp/tweak-$(VERSION); \
39 done
40 (cd reltmp; tar chzvf ../tweak-$(VERSION).tar.gz tweak-$(VERSION))
41 rm -rf reltmp
42
6e182d98 43clean:
d28a4799 44 rm -f *.o tweak tweak.1 btree.html
6e182d98 45
46main.o: main.c tweak.h
47keytab.o: keytab.c tweak.h
48actions.o: actions.c tweak.h
49search.o: search.c tweak.h
50rcfile.o: rcfile.c tweak.h
51buffer.o: buffer.c tweak.h btree.h
52slang.o: slang.c tweak.h
53curses.o: curses.c tweak.h
54btree.o: btree.c btree.h