srcdir=@srcdir@ VPATH=@srcdir@ prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ mandir=@mandir@ datarootdir = @datarootdir@ INSTALLCMD=@INSTALL@ CC=@CC@ CPPFLAGS=@CPPFLAGS@ -MD -MP -I. CFLAGS=$(CPPFLAGS) @CFLAGS@ LDFLAGS=@LDFLAGS@ EXEEXT=@EXEEXT@ 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 objs = $(sources:.c=.o) all: ccache$(EXEEXT) docs: ccache.1 web/ccache-man.html ccache$(EXEEXT): $(objs) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(objs) $(libs) ccache.1: ccache.yo -yodl2man -o ccache.1 ccache.yo web/ccache-man.html: ccache.yo mkdir -p man yodl2html -o web/ccache-man.html ccache.yo install: ccache$(EXEEXT) ccache.1 ${INSTALLCMD} -d $(DESTDIR)${bindir} ${INSTALLCMD} -m 755 ccache$(EXEEXT) $(DESTDIR)${bindir} ${INSTALLCMD} -d $(DESTDIR)${mandir}/man1 ${INSTALLCMD} -m 644 ${srcdir}/ccache.1 $(DESTDIR)${mandir}/man1/ clean: /bin/rm -f $(objs) *~ ccache$(EXEEXT) *.d test: test.sh CC='$(CC)' ./test.sh check: test distclean: clean /bin/rm -f Makefile config.h config.sub config.log build-stamp config.status # FIXME: To fix this, test.sh needs to be able to take ccache from the # installed prefix, not from the source dir. installcheck: @echo "WARNING! This is not really \"installcheck\" yet." $(MAKE) check check-syntax: $(CC) $(filter-out -M%, $(CPPFLAGS)) $(CFLAGS) -S -o /dev/null $(CHK_SOURCES) -include $(sources:.c=.d)