-# $Header: /home/amb/routino/RCS/Makefile,v 1.3 2010/05/31 12:44:43 amb Exp $
+# $Header: /home/amb/routino/RCS/Makefile,v 1.5 2010/09/05 18:26:57 amb Exp $
#
# Makefile
#
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-FILES=$(wildcard */Makefile)
-DIRS=$(foreach f,$(FILES),$(dir $f))
+# Installation locations
+
+prefix=/usr/local
+bindir=$(prefix)/bin
+docdir=$(prefix)/doc/routino
+datadir=$(prefix)/share/routino
+
+# Sub-directories and sub-makefiles
+
+TOPFILES=$(wildcard */Makefile)
+TOPDIRS=$(foreach f,$(TOPFILES),$(dir $f))
+
+########
+
+all$(top):
+ for dir in $(TOPDIRS); do \
+ ( cd $$dir && $(MAKE) $@ ); \
+ done
########
-all:
- for dir in $(DIRS); do \
+install$(top): all$(top)
+ for dir in $(TOPDIRS); do \
( cd $$dir && $(MAKE) $@ ); \
done
+ @echo "Note: web directory is not installed automatically"
########
-clean:
- for dir in $(DIRS); do \
+clean$(top):
+ for dir in $(TOPDIRS); do \
( cd $$dir && $(MAKE) $@ ); \
done
########
-distclean: clean
- for dir in $(DIRS); do \
+distclean$(top): clean$(top)
+ for dir in $(TOPDIRS); do \
( cd $$dir && $(MAKE) $@ ); \
done