ccache/Makefile.in
2010-04-24 10:36:57 +02:00

92 lines
1.9 KiB
Makefile

srcdir = @srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
mandir = @mandir@
datarootdir = @datarootdir@
installcmd = @INSTALL@
CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@ -I.
LDFLAGS = @LDFLAGS@
EXEEXT = @EXEEXT@
ASCIIDOC = asciidoc
XSLTPROC = xsltproc
MANPAGE_XSL = /etc/asciidoc/docbook-xsl/manpage.xsl
libs = @LIBS@ -lm
sources = \
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 \
murmurhashneutral2.c hashutil.c comments.c getopt_long.c
all_sources = $(sources) @extra_sources@
headers = \
ccache.h hashtable.h hashtable_itr.h hashtable_private.h hashutil.h \
manifest.h mdfour.h murmurhashneutral2.h comments.h getopt_long.h
objs = $(all_sources:.c=.o)
files_to_clean = $(objs) *~ ccache$(EXEEXT) ccache.1
.PHONY: all
all: ccache$(EXEEXT)
.PHONY: docs
docs: ccache.1 ccache.html NEWS.html
ccache$(EXEEXT): $(objs)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(objs) $(libs)
ccache.xml: ccache.txt
$(ASCIIDOC) -d manpage -b docbook $<
ccache.html: ccache.txt
$(ASCIIDOC) -a toc -b xhtml11 $<
ccache.1: ccache.xml
$(XSLTPROC) --nonet $(MANPAGE_XSL) $<
NEWS.html: NEWS.txt
$(ASCIIDOC) -a toc -b xhtml11 $<
.PHONY: install
install: all
$(installcmd) -d $(DESTDIR)$(bindir)
$(installcmd) -s -m 755 ccache$(EXEEXT) $(DESTDIR)$(bindir)
$(installcmd) -d $(DESTDIR)$(mandir)/man1
-$(installcmd) -m 644 $(srcdir)/ccache.1 $(DESTDIR)$(mandir)/man1/
.PHONY: clean
clean:
rm -f $(files_to_clean)
.PHONY: perf
perf:
$(srcdir)/perf.sh
.PHONY: test
test:
CC='$(CC)' $(srcdir)/test.sh
.PHONY: check
check: test
.PHONY: distclean
distclean: clean
rm -rf Makefile dev.mk config.h config.log config.status .deps
.PHONY: installcheck
installcheck:
CCACHE=$(bindir)/ccache $(srcdir)/test.sh
.c.o:
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
@include_dev_mk@