| 1 |
# $Id: Makefile,v 1.6 2000/06/17 18:49:22 baran Exp $ |
| 2 |
# slightly rewritten original Wilhelm Noeker's Makefile |
| 3 |
|
| 4 |
targets = cookietool cdbsplit cdbdiff |
| 5 |
objects = cookietool.o cdbsplit.o cdbdiff.o strstuff.o \ |
| 6 |
cookio.o compress.o |
| 7 |
prefix = usr |
| 8 |
binprefix = $(prefix)/games |
| 9 |
manprefix = $(prefix)/share/man/man6 |
| •10 |
CC ?= gcc |
| 11 |
RM = rm -v |
| 12 |
INSTALL = install |
| •13 |
CFLAGS ?= -O2 -Wall |
| 14 |
|
| 15 |
build : $(targets) |
| 16 |
|
| 17 |
strstuff.o : strstuff.c strstuff.h |
| 18 |
cookio.o : cookio.c cookio.h |
| 19 |
compress.o : compress.c compress.h |
| 20 |
|
| 21 |
cookietool : cookietool.o strstuff.o compress.o cookio.o |
| 22 |
cookietool.o : cookietool.c strstuff.h compress.h cookio.h |
| 23 |
|
| 24 |
cdbdiff : cdbdiff.o strstuff.o compress.o cookio.o |
| 25 |
cdbdiff.o : cdbdiff.c strstuff.h compress.h cookio.h |
| 26 |
|
| 27 |
cdbsplit : cdbsplit.o strstuff.o cookio.o |
| 28 |
cdbsplit.o : cdbsplit.c strstuff.h cookio.h |
| 29 |
|
| 30 |
clean : |
| 31 |
@-$(RM) $(targets) $(objects) |
| 32 |
|
| 33 |
# for AmigaOS installation change install-binary-unix to |
| 34 |
# install-binary-amiga; for non-debian-installation, use `make all' |
| 35 |
|
| 36 |
install : install-binary # install-manpages |
| 37 |
|
| 38 |
install-binary : |
| 39 |
@for file in $(targets); do \ |
| 40 |
$(INSTALL) -m 0755 $$file $(DESTDIR)/$(binprefix)/$$file; \ |
| 41 |
done; |
| 42 |
|
| 43 |
install-manpages : |
| 44 |
@for file in doc/*.6; do \ |
| 45 |
$(INSTALL) -m 0644 $$file $(DESTDIR)/$(manprefix)/$$file; \ |
| 46 |
done; |
| 47 |
|
| 48 |
all : build install install-manpages |