X-Git-Url: http://git.maemo.org/git/?p=routino;a=blobdiff_plain;f=Makefile;h=d1d42503eae9142c6626ad0814ecf41d36218202;hp=b6ee93324bf3fff4f1c3a22032c141fa454e29b4;hb=HEAD;hpb=20283c6cf5c6951cc1f2787492c67a7fb72aee9a diff --git a/Makefile b/Makefile index b6ee933..d1d4250 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $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 # @@ -20,26 +20,43 @@ # along with this program. If not, see . # -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