1## Rules.mk -- Common variables and rules for all Makefiles -*- Makefile -*- 2 3SHELL = /bin/sh 4 5PACKAGE = ccze 6VERSION = 0.2.${PATCHLEVEL} 7DIST = stable 8 9PROGRAM = ${PACKAGE} 10VPATH = ${srcdir} 11 12## -- User modifiable variables -- ## 13prefix = @prefix@ 14exec_prefix = @exec_prefix@ 15sysconfdir = @sysconfdir@ 16bindir = @bindir@ 17mandir = @mandir@ 18man1dir = ${mandir}/man1 19man7dir = ${mandir}/man7 20libdir = @libdir@ 21includedir = @includedir@ 22pkglibdir = ${libdir}/${PACKAGE} 23 24CC = @CC@ 25CFLAGS = @CFLAGS@ 26LDFLAGS = @LDFLAGS@ 27TAR = tar 28GZIP = gzip 29TAR_OPTIONS = 30GZIP_ENV = --best 31 32ETAGS = etags 33 34INSTALL = @INSTALL@ 35INSTALL_PROGRAM = @INSTALL_PROGRAM@ 36INSTALL_DATA = @INSTALL_DATA@ 37INSTALL_DIR = @INSTALL@ -d 38EXTRAVERSION = 39 40## -- Private variables -- ## 41ifeq (${subdir},) 42top_builddir = . 43else 44top_builddir = .. 45endif 46builddir = @builddir@ 47 48PATCHLEVEL = $(shell head -5 ${top_srcdir}/ChangeLog | tail -1 | \ 49 sed -e "s,^.*patch-,,g" -e "s,^.*base-,,g") 50DISTFILES = ${SOURCES} ${HEADERS} Makefile.in ${TESTS} ${EXTRA_DIST} 51 52## -- Generic rules -- ## 53all: 54 55TAGS:: ${SOURCES} ${HEADERS} 56 test -z "${SOURCES}${HEADERS}" || ${ETAGS} ${SOURCES} ${HEADERS} 57 58mostlyclean clean:: 59 rm -f *~ *.o *.so *.da ${PROGRAM} TAGS 60 test -z "${CLEANFILES}" || rm -rf ${CLEANFILES} 61distclean:: clean 62 rm -f Makefile 63 test -z "${DISTCLEANFILES}" || rm -rf ${DISTCLEANFILES} 64maintainer-clean:: distclean 65 test -z "${MAINTCLEANFILES}" || rm -rf ${MAINTCLEANFILES} 66 67distdir = ${top_builddir}/${PACKAGE}-${VERSION}/${subdir} 68distdir: ${DISTFILES} 69 ${INSTALL_DIR} ${distdir} 70 @list='${DISTFILES}'; for f in $$list; do \ 71 if test -e ${srcdir}/$$f; then \ 72 fn=${srcdir}/$$f; \ 73 else \ 74 fn=$$f; \ 75 fi ; \ 76 echo cp -p $$fn ${distdir}/$$f ;\ 77 cp -p $$fn ${distdir}/$$f ;\ 78 done 79 80${top_builddir}/Rules.mk: ${top_srcdir}/Rules.mk.in ${top_builddir}/config.status 81 cd ${top_builddir} && ./config.status 82${builddir}/Makefile: ${srcdir}/Makefile.in ${top_builddir}/config.status 83 cd ${top_builddir} && ./config.status 84 85## -- ${MAKE} control -- ## 86.PHONY: all install clean distclean mostlyclean uninstall maintainer-clean \ 87 distdir dist distcheck 88.SUFFIXES: 89.SUFFIXES: .c .o .so 90.DEFAULT: all 91