1 |
# Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team |
2 |
# Copyright © 2005 Atheme Development Group. |
3 |
# Rights to this code are documented in doc/pod/license.pod. |
4 |
# |
5 |
# This file contains common rules. |
6 |
# |
7 |
# $Id: Makefile.common.in,v 1.2 2007-07-21 01:29:08 pippijn Exp $ |
8 |
# |
9 |
|
10 |
default: all |
11 |
|
12 |
SRCS = ${BASE_SRCS} |
13 |
|
14 |
OBJS = ${SRCS:.C=.o} |
15 |
|
16 |
all: build |
17 |
|
18 |
.build.stamp: |
19 |
@${MAKE} ${SILENT} build |
20 |
@touch .build.stamp |
21 |
|
22 |
build: $(OBJS) extra-build |
23 |
@touch .build.stamp |
24 |
|
25 |
install: |
26 |
|
27 |
.SUFFIXES: .o .xs |
28 |
|
29 |
.C.o: |
30 |
@echo " CC $@" |
31 |
@${CXX} -c ${PICFLAGS} ${CPPFLAGS} ${CXXFLAGS} $< -o $@ |
32 |
|
33 |
.PHONY: depend clean distclean |
34 |
|
35 |
# This sed command sucks but I don't know a better way -- jilles |
36 |
depend: |
37 |
@echo ${OBJS} > ${SRCDIR}/.objects |
38 |
@${MKDEP} ${PICFLAGS} ${CPPFLAGS} ${CXXFLAGS} ${SRCS} | sed -e 's|\([^.]*\)\.o:|$(SRCDIR)/\1.o:|' > .depend |
39 |
|
40 |
clean: extra-clean |
41 |
@${RM} -f $(OBJS) lib${MODULE}.a |
42 |
@${RM} -f .build.stamp |
43 |
|
44 |
distclean: clean |
45 |
@${RM} -f Makefile .depend |
46 |
|
47 |
maintainer-clean: distclean |
48 |
@${RM} -f $(MAINTAINERCLEANFILES) |
49 |
|
50 |
extra-clean: |
51 |
|
52 |
extra-build: |
53 |
|
54 |
include .depend |