Rename the README to README.md
[multipath-tools/.git] / Makefile
1 #
2 # Copyright (C) 2003 Christophe Varoqui, <christophe.varoqui@opensvc.com>
3 #
4
5 BUILDDIRS := \
6         libmpathcmd \
7         libmultipath \
8         libmultipath/prioritizers \
9         libmultipath/checkers \
10         libmultipath/foreign \
11         libmpathpersist \
12         multipath \
13         multipathd \
14         mpathpersist \
15         kpartx
16
17 ifneq ($(ENABLE_LIBDMMP),0)
18 BUILDDIRS += \
19         libdmmp
20 endif
21
22 BUILDDIRS.clean := $(BUILDDIRS:=.clean) tests.clean
23
24 .PHONY: $(BUILDDIRS) $(BUILDDIRS:=.uninstall) $(BUILDDIRS:=.install) $(BUILDDIRS.clean)
25
26 all:    $(BUILDDIRS)
27
28 $(BUILDDIRS):
29         $(MAKE) -C $@
30
31 libmultipath libdmmp: libmpathcmd
32 libmpathpersist multipath multipathd: libmultipath
33 mpathpersist multipathd:  libmpathpersist
34
35 libmultipath/checkers.install \
36         libmultipath/prioritizers.install \
37         libmultipath/foreign.install: libmultipath.install
38
39 $(BUILDDIRS.clean):
40         $(MAKE) -C ${@:.clean=} clean
41
42 $(BUILDDIRS:=.install):
43         $(MAKE) -C ${@:.install=} install
44
45 $(BUILDDIRS:=.uninstall):
46         $(MAKE) -C ${@:.uninstall=} uninstall
47
48 clean: $(BUILDDIRS.clean)
49 install: $(BUILDDIRS:=.install)
50 uninstall: $(BUILDDIRS:=.uninstall)
51
52 test:   all
53         $(MAKE) -C tests
54
55 valgrind-test:  all
56         $(MAKE) -C tests valgrind
57
58 .PHONY: TAGS
59 TAGS:
60         etags -a libmultipath/*.c
61         etags -a libmultipath/*.h
62         etags -a multipathd/*.c
63         etags -a multipathd/*.h