1 |
pippijn |
1.3 |
# Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team |
2 |
pippijn |
1.1 |
# Copyright © 2005 Atheme Development Group. |
3 |
pippijn |
1.2 |
# Rights to this code are documented in doc/pod/license.pod. |
4 |
pippijn |
1.1 |
# |
5 |
|
|
# This file contains common rules. |
6 |
|
|
# |
7 |
pippijn |
1.3 |
# $Id: Makefile.common.in,v 1.2 2007-07-21 01:29:08 pippijn Exp $ |
8 |
pippijn |
1.1 |
# |
9 |
|
|
|
10 |
|
|
default: all |
11 |
|
|
|
12 |
|
|
SRCS = ${BASE_SRCS} |
13 |
|
|
|
14 |
pippijn |
1.3 |
OBJS = ${SRCS:.C=.o} |
15 |
pippijn |
1.1 |
|
16 |
|
|
all: build |
17 |
|
|
|
18 |
|
|
.build.stamp: |
19 |
|
|
@${MAKE} ${SILENT} build |
20 |
|
|
@touch .build.stamp |
21 |
|
|
|
22 |
pippijn |
1.3 |
build: $(OBJS) extra-build |
23 |
|
|
@touch .build.stamp |
24 |
pippijn |
1.1 |
|
25 |
pippijn |
1.3 |
install: |
26 |
pippijn |
1.1 |
|
27 |
pippijn |
1.3 |
.SUFFIXES: .o .xs |
28 |
pippijn |
1.1 |
|
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 |
pippijn |
1.3 |
@echo ${OBJS} > ${SRCDIR}/.objects |
38 |
|
|
@${MKDEP} ${PICFLAGS} ${CPPFLAGS} ${CXXFLAGS} ${SRCS} | sed -e 's|\([^.]*\)\.o:|$(SRCDIR)/\1.o:|' > .depend |
39 |
pippijn |
1.1 |
|
40 |
|
|
clean: extra-clean |
41 |
pippijn |
1.3 |
@${RM} -f $(OBJS) lib${MODULE}.a |
42 |
pippijn |
1.1 |
@${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 |
pippijn |
1.3 |
extra-build: |
53 |
pippijn |
1.1 |
|
54 |
|
|
include .depend |