84 lines
2.7 KiB
Makefile
84 lines
2.7 KiB
Makefile
datarootdir = @datarootdir@
|
|
srcdir=@srcdir@
|
|
VPATH=@srcdir@
|
|
|
|
prefix=@prefix@
|
|
exec_prefix=@exec_prefix@
|
|
bindir=@bindir@
|
|
mandir=@mandir@
|
|
INSTALLCMD=@INSTALL@
|
|
PACKAGE_NAME=@PACKAGE_NAME@
|
|
PROGRAM_NAME=@PROGRAM_NAME@
|
|
# Soft link test can be skipped on systems that don't support soft linking
|
|
NOSOFTLINKSTEST=
|
|
|
|
CC=@CC@
|
|
CFLAGS=@CFLAGS@ -I.
|
|
SWIG=swig
|
|
SWIG_LIB=../$(srcdir)/../Lib
|
|
EXEEXT=@EXEEXT@
|
|
|
|
# Use standard autoconf approach to transform executable name using --program-prefix and --program-suffix
|
|
transform = @program_transform_name@
|
|
|
|
LIBS= @LIBS@
|
|
OBJS= ccache.o mdfour.o hash.o execute.o util.o args.o stats.o \
|
|
cleanup.o snprintf.o unify.o
|
|
HEADERS = ccache.h mdfour.h
|
|
|
|
all: $(PROGRAM_NAME)$(EXEEXT)
|
|
|
|
# Regenerate Makefile if Makefile.in or config.status have changed.
|
|
Makefile: $(srcdir)/Makefile.in ./config.status
|
|
$(SHELL) ./config.status
|
|
|
|
# Note that HTML documentation is actually generated and used from the main SWIG documentation Makefile
|
|
docs: $(srcdir)/$(PROGRAM_NAME).1 $(srcdir)/web/$(PROGRAM_NAME)-man.html
|
|
|
|
$(PROGRAM_NAME)$(EXEEXT): $(OBJS) $(HEADERS)
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
|
|
|
$(srcdir)/$(PROGRAM_NAME).1: $(srcdir)/ccache.yo
|
|
-yodl2man -o $(srcdir)/$(PROGRAM_NAME).1 $(srcdir)/ccache.yo
|
|
|
|
$(srcdir)/web/$(PROGRAM_NAME)-man.html: $(srcdir)/ccache.yo
|
|
yodl2html -o $(srcdir)/web/$(PROGRAM_NAME)-man.html $(srcdir)/ccache.yo
|
|
|
|
install: $(PROGRAM_NAME)$(EXEEXT)
|
|
@echo "Installing $(PROGRAM_NAME)"
|
|
@echo "Installing $(DESTDIR)${bindir}/$(PROGRAM_NAME)$(EXEEXT)"
|
|
${INSTALLCMD} -d $(DESTDIR)${bindir}
|
|
${INSTALLCMD} -m 755 $(PROGRAM_NAME)$(EXEEXT) $(DESTDIR)${bindir}/$(PROGRAM_NAME)$(EXEEXT)
|
|
|
|
install-docs: $(srcdir)/$(PROGRAM_NAME).1
|
|
@echo "Installing $(DESTDIR)${mandir}/man1/$(PROGRAM_NAME).1"
|
|
${INSTALLCMD} -d $(DESTDIR)${mandir}/man1
|
|
${INSTALLCMD} -m 644 $(srcdir)/$(PROGRAM_NAME).1 $(DESTDIR)${mandir}/man1/$(PROGRAM_NAME).1
|
|
|
|
uninstall: $(PROGRAM_NAME)$(EXEEXT)
|
|
rm -f $(DESTDIR)${bindir}/$(PROGRAM_NAME)$(EXEEXT)
|
|
|
|
uninstall-docs: $(srcdir)/$(PROGRAM_NAME).1
|
|
rm -f $(DESTDIR)${mandir}/man1/$(PROGRAM_NAME).1
|
|
|
|
clean:
|
|
/bin/rm -f $(OBJS) *~ $(PROGRAM_NAME)$(EXEEXT)
|
|
|
|
test: test.sh
|
|
SWIG_LIB='$(SWIG_LIB)' PATH=../..:$$PATH SWIG='$(SWIG)' CC='$(CC)' NOSOFTLINKSTEST='$(NOSOFTLINKSTEST)' CCACHE='../$(PROGRAM_NAME)' $(srcdir)/test.sh
|
|
|
|
check: test
|
|
|
|
distclean: clean
|
|
/bin/rm -f Makefile config.h config.sub config.log build-stamp config.status ccache_swig_config.h config_win32.h
|
|
/bin/rm -rf autom4te.cache
|
|
|
|
maintainer-clean: distclean
|
|
/bin/rm -f $(srcdir)/$(PROGRAM_NAME).1 $(srcdir)/web/$(PROGRAM_NAME)-man.html
|
|
|
|
|
|
# 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
|