]> arthur.barton.de Git - ax-linux.git/blob - Makefile.ax
Make PREFIX, GROUP, and AX_SILENT configurable on make command line
[ax-linux.git] / Makefile.ax
1 #
2 # ax-linux: Alex' Linux Tools & Scripts
3 # Copyright (c)2013 Alexander Barton (alex@barton.de)
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10
11 AX_SILENT ?= @
12
13 PREFIX ?= /usr/local
14 GROUP ?= staff
15
16 $(SUBDIRS):
17         $(MAKE) -C $@
18
19 clean: clean-ax clean-local
20
21 clean-ax:
22         $(AX_SILENT)for subdir in $(SUBDIRS); do \
23           $(MAKE) -C $$subdir clean || exit 1; \
24          done
25
26 distclean: distclean-ax distclean-local
27
28 distclean-ax:
29         $(AX_SILENT)for subdir in $(SUBDIRS); do \
30           $(MAKE) -C $$subdir distclean || exit 1; \
31          done
32
33 maintainer-clean: maintainer-clean-ax maintainer-clean-local
34
35 maintainer-clean-ax:
36         $(AX_SILENT)for subdir in $(SUBDIRS); do \
37           $(MAKE) -C $$subdir maintainer-clean || exit 1; \
38          done
39
40 check: check-ax check-local
41
42 check-ax:
43         $(AX_SILENT)for subdir in $(SUBDIRS); do \
44           $(MAKE) -C $$subdir check || exit 1; \
45          done
46
47 install: install-ax install-local
48
49 install-ax:
50         $(AX_SILENT)for subdir in $(SUBDIRS); do \
51           $(MAKE) -C $$subdir install || exit 1; \
52          done
53
54 .PHONY: all clean distclean maintainer-clean check install
55 .PHONY: clean-ax distclean-ax maintainer-clean-ax check-ax install-ax
56 .PHONY: clean-local distclean-local maintainer-clean-local check-local install-local
57 .PHONY: $(SUBDIRS)