| 1 |
VERSION = 1.7 |
| 2 |
PACKAGE = aoeui-$(VERSION) |
| 3 |
SRCS = main.c mem.c die.c display.c text.c file.c locus.c buffer.c \ |
| 4 |
undo.c utf8.c window.c util.c clip.c mode.c search.c \ |
| 5 |
child.c bookmark.c help.c find.c tags.c tab.c fold.c macro.c \ |
| 6 |
keyword.c |
| 7 |
HDRS = all.h buffer.h child.h mode.h text.h locus.h utf8.h display.h \ |
| 8 |
window.h util.h clip.h macro.h mem.h die.h types.h rgba.h |
| 9 |
RELS = $(SRCS:.c=.o) |
| 10 |
LIBS = -lutil |
| •11 |
INST_DIR = $(CURDIR)/debian/aoeui/usr |
| •12 |
# CFLAGS = -Wall -Wno-parentheses \ |
| 13 |
# -Wpointer-arith -Wcast-align -Wwrite-strings -Wstrict-prototypes \ |
| 14 |
# -Wmissing-prototypes -Wmissing-declarations |
| 15 |
# -Werror |
| 16 |
|
| 17 |
# Uncomment this line if you want to develop aoeui yourself with exuberant-ctags |
| 18 |
# CTAGS = exuberant-ctags |
| 19 |
CTAGS = ctags |
| 20 |
|
| 21 |
STRINGIFY = sed 's/\\/\\\\/g;s/"/\\"/g;s/^/"/;s/$$/\\n"/' |
| 22 |
|
| •23 |
default: aoeui display-test aoeui.1 asdfg.1 |
| 24 |
|
| 25 |
aoeui: $(RELS) |
| •26 |
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(RELS) $(LIBS) |
| 27 |
$(RELS): $(HDRS) |
| 28 |
help.o: aoeui.help asdfg.help |
| 29 |
aoeui.help: help.m4 |
| 30 |
m4 help.m4 | $(STRINGIFY) >$@ |
| 31 |
asdfg.help: help.m4 |
| 32 |
m4 -D ASDFG help.m4 | $(STRINGIFY) >$@ |
| 33 |
|
| 34 |
display-test: display-test.o display.o mem.o utf8.o |
| 35 |
$(CC) $(CFLAGS) -o $@ display-test.o display.o mem.o utf8.o |
| 36 |
display-test.o: types.h utf8.h display.h |
| 37 |
|
| 38 |
aoeui.1.gz: aoeui.1 |
| 39 |
gzip -9 -c aoeui.1 >$@ |
| 40 |
asdfg.1.gz: asdfg.1 |
| 41 |
gzip -9 -c asdfg.1 >$@ |
| 42 |
aoeui.1.html: aoeui.1 |
| 43 |
man2html aoeui.1 >$@ |
| 44 |
asdfg.1.html: asdfg.1 |
| 45 |
man2html asdfg.1 >$@ |
| 46 |
aoeui.1: aoeui.1.m4 |
| 47 |
m4 aoeui.1.m4 >$@ |
| 48 |
asdfg.1: aoeui.1.m4 |
| 49 |
m4 -D ASDFG aoeui.1.m4 >$@ |
| 50 |
|
| 51 |
optimized: |
| 52 |
$(MAKE) CFLAGS="-O3 $(CFLAGS)" aoeui |
| 53 |
static: |
| 54 |
$(MAKE) CFLAGS="-O3 $(CFLAGS) -static" aoeui |
| 55 |
debug: clean |
| 56 |
$(MAKE) CFLAGS="-g -O0 -DDEBUG $(CFLAGS)" aoeui |
| 57 |
profile: clean |
| 58 |
$(MAKE) CFLAGS="-pg $(CFLAGS)" aoeui |
| 59 |
|
| 60 |
TAGS: $(SRCS) $(HDRS) |
| 61 |
$(CTAGS) -x $(SRCS) $(HDRS) >$@ |
| 62 |
|
| 63 |
install: aoeui aoeui.1.gz asdfg.1.gz |
| 64 |
install -d $(INST_DIR)/bin |
| 65 |
install -d $(INST_DIR)/share/man/man1 |
| 66 |
install aoeui $(INST_DIR)/bin |
| 67 |
ln -nf $(INST_DIR)/bin/aoeui $(INST_DIR)/bin/asdfg |
| 68 |
install *.1.gz $(INST_DIR)/share/man/man1 |
| 69 |
clean: |
| 70 |
rm -f *.o *.help core gmon.out screenlog.* |
| 71 |
clobber: clean |
| 72 |
rm -f aoeui display-test unicode TAGS *.1 *.1.gz *.1.html |
| 73 |
spotless: clobber |
| 74 |
rm -f *~ *.tgz |
| 75 |
release: spotless |
| 76 |
rm -rf .tar $(PACKAGE) $(PACKAGE).tgz |
| 77 |
mkdir .tar |
| 78 |
find . | egrep -v '/\.' | egrep -v '[~#]' | cpio -o | (cd .tar; cpio -id) |
| 79 |
mv .tar $(PACKAGE) |
| 80 |
ls -CF $(PACKAGE) |
| 81 |
tar czf $(PACKAGE).tgz $(PACKAGE) |
| 82 |
rm -rf $(PACKAGE) |