# Makefile.common.in: Common rules for module Makefiles. # # Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team # Rights to this code are as documented in COPYING. # # # Portions of this file were derived from sources bearing the following license: # Copyright © 2005 Atheme Development Group. # Rights to this code are documented in doc/pod/license.pod. # # $Id: Makefile.common.in,v 1.4 2007/09/22 14:27:26 pippijn Exp $ # default: all SRCS = ${BASE_SRCS} OBJS = ${SRCS:.C=.o} all: build .build.stamp: @${MAKE} ${SILENT} build @touch .build.stamp build: $(OBJS) extra-build @touch .build.stamp install: .SUFFIXES: .o .xs .C.o: @echo " CC $@" @${CXX} -c ${PICFLAGS} ${CPPFLAGS} ${CXXFLAGS} $< -o $@ .PHONY: depend clean distclean # This sed command sucks but I don't know a better way -- jilles depend: @echo ${OBJS} > ${SRCDIR}/.objects @${MKDEP} ${PICFLAGS} ${CPPFLAGS} ${CXXFLAGS} ${SRCS} | sed -e 's|\([^.]*\)\.o:|$(SRCDIR)/\1.o:|' > .depend clean: extra-clean @${RM} -f $(OBJS) lib${MODULE}.a @${RM} -f .build.stamp distclean: clean @${RM} -f Makefile .depend maintainer-clean: distclean @${RM} -f $(MAINTAINERCLEANFILES) extra-clean: extra-build: include .depend