2009-12-13 13:40:33 +00:00
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
2002-04-10 22:29:30 +00:00
|
|
|
|
2009-12-13 13:40:33 +00:00
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
bindir = @bindir@
|
|
|
|
mandir = @mandir@
|
2009-12-06 14:25:07 +00:00
|
|
|
datarootdir = @datarootdir@
|
2009-12-13 13:40:33 +00:00
|
|
|
installcmd = @INSTALL@
|
2002-03-31 09:02:21 +00:00
|
|
|
|
2009-12-13 13:40:33 +00:00
|
|
|
CC = @CC@
|
|
|
|
CFLAGS = @CFLAGS@
|
2010-02-26 20:24:09 +00:00
|
|
|
CPPFLAGS = @CPPFLAGS@ -I.
|
2009-12-13 13:40:33 +00:00
|
|
|
LDFLAGS = @LDFLAGS@
|
|
|
|
EXEEXT = @EXEEXT@
|
2002-03-31 09:02:21 +00:00
|
|
|
|
2010-04-22 20:08:33 +00:00
|
|
|
ASCIIDOC = asciidoc
|
|
|
|
XSLTPROC = xsltproc
|
|
|
|
MANPAGE_XSL = /etc/asciidoc/docbook-xsl/manpage.xsl
|
|
|
|
|
2009-11-14 15:14:55 +00:00
|
|
|
libs = @LIBS@ -lm
|
2009-11-08 19:39:41 +00:00
|
|
|
|
|
|
|
sources = \
|
2009-12-13 13:40:33 +00:00
|
|
|
ccache.c mdfour.c hash.c execute.c util.c args.c stats.c \
|
|
|
|
cleanup.c snprintf.c unify.c manifest.c hashtable.c hashtable_itr.c \
|
2010-02-17 18:49:54 +00:00
|
|
|
murmurhashneutral2.c hashutil.c comments.c getopt_long.c
|
2010-02-25 22:27:58 +00:00
|
|
|
all_sources = $(sources) @extra_sources@
|
2009-12-13 13:40:33 +00:00
|
|
|
|
|
|
|
headers = \
|
|
|
|
ccache.h hashtable.h hashtable_itr.h hashtable_private.h hashutil.h \
|
2010-02-17 18:49:54 +00:00
|
|
|
manifest.h mdfour.h murmurhashneutral2.h comments.h getopt_long.h
|
2009-11-08 19:39:41 +00:00
|
|
|
|
2010-02-25 22:27:58 +00:00
|
|
|
objs = $(all_sources:.c=.o)
|
2002-03-31 09:02:21 +00:00
|
|
|
|
2010-02-26 21:22:00 +00:00
|
|
|
files_to_clean = $(objs) *~ ccache$(EXEEXT) ccache.1
|
|
|
|
|
2009-12-29 23:25:09 +00:00
|
|
|
.PHONY: all
|
2003-04-17 12:06:14 +00:00
|
|
|
all: ccache$(EXEEXT)
|
2002-04-01 00:23:31 +00:00
|
|
|
|
2009-12-29 23:25:09 +00:00
|
|
|
.PHONY: docs
|
2010-04-24 08:31:10 +00:00
|
|
|
docs: ccache.1 ccache.html NEWS.html
|
2002-03-31 09:02:21 +00:00
|
|
|
|
2009-11-08 19:39:41 +00:00
|
|
|
ccache$(EXEEXT): $(objs)
|
2009-11-14 15:14:55 +00:00
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(objs) $(libs)
|
2002-03-31 09:02:21 +00:00
|
|
|
|
2010-04-22 20:08:33 +00:00
|
|
|
ccache.xml: ccache.txt
|
|
|
|
$(ASCIIDOC) -d manpage -b docbook $<
|
|
|
|
|
2010-04-22 20:18:20 +00:00
|
|
|
ccache.html: ccache.txt
|
2010-04-22 20:55:26 +00:00
|
|
|
$(ASCIIDOC) -a toc -b xhtml11 $<
|
2010-04-22 20:18:20 +00:00
|
|
|
|
2010-04-22 20:08:33 +00:00
|
|
|
ccache.1: ccache.xml
|
|
|
|
$(XSLTPROC) --nonet $(MANPAGE_XSL) $<
|
2002-04-01 00:23:31 +00:00
|
|
|
|
2010-04-24 08:31:10 +00:00
|
|
|
NEWS.html: NEWS.txt
|
|
|
|
$(ASCIIDOC) -a toc -b xhtml11 $<
|
|
|
|
|
2009-12-29 23:25:09 +00:00
|
|
|
.PHONY: install
|
2009-12-13 13:40:33 +00:00
|
|
|
install: all
|
|
|
|
$(installcmd) -d $(DESTDIR)$(bindir)
|
|
|
|
$(installcmd) -s -m 755 ccache$(EXEEXT) $(DESTDIR)$(bindir)
|
|
|
|
$(installcmd) -d $(DESTDIR)$(mandir)/man1
|
2010-02-15 07:42:28 +00:00
|
|
|
-$(installcmd) -m 644 $(srcdir)/ccache.1 $(DESTDIR)$(mandir)/man1/
|
2009-12-13 13:40:33 +00:00
|
|
|
|
2009-12-29 23:25:09 +00:00
|
|
|
.PHONY: clean
|
2002-03-31 09:02:21 +00:00
|
|
|
clean:
|
2010-02-26 21:22:00 +00:00
|
|
|
rm -f $(files_to_clean)
|
2002-03-31 12:38:07 +00:00
|
|
|
|
2010-03-02 06:04:36 +00:00
|
|
|
.PHONY: perf
|
2010-03-03 21:05:31 +00:00
|
|
|
perf:
|
2010-03-03 21:04:44 +00:00
|
|
|
$(srcdir)/perf.sh
|
2010-03-02 06:04:36 +00:00
|
|
|
|
2009-12-29 23:25:09 +00:00
|
|
|
.PHONY: test
|
2010-03-03 21:05:31 +00:00
|
|
|
test:
|
2009-12-29 22:24:37 +00:00
|
|
|
CC='$(CC)' $(srcdir)/test.sh
|
2003-02-17 00:46:43 +00:00
|
|
|
|
2009-12-29 23:25:09 +00:00
|
|
|
.PHONY: check
|
2004-09-06 13:04:22 +00:00
|
|
|
check: test
|
2003-02-17 01:09:12 +00:00
|
|
|
|
2009-12-29 23:25:09 +00:00
|
|
|
.PHONY: distclean
|
2002-04-03 04:10:55 +00:00
|
|
|
distclean: clean
|
2010-02-26 20:24:09 +00:00
|
|
|
rm -rf Makefile dev.mk config.h config.log config.status .deps
|
2003-02-24 03:56:03 +00:00
|
|
|
|
2009-12-29 23:25:09 +00:00
|
|
|
.PHONY: installcheck
|
2009-11-07 08:09:39 +00:00
|
|
|
installcheck:
|
2009-12-29 22:24:37 +00:00
|
|
|
CCACHE=$(bindir)/ccache $(srcdir)/test.sh
|
2009-11-01 18:49:59 +00:00
|
|
|
|
2010-02-28 09:27:24 +00:00
|
|
|
.c.o:
|
|
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
|
|
|
|
2010-02-26 20:24:09 +00:00
|
|
|
@include_dev_mk@
|