Build fixes for mpath_persist and multipath
[multipath-tools/.git] / multipath / Makefile
1 # Makefile
2 #
3 # Copyright (C) 2003 Christophe Varoqui, <christophe.varoqui@opensvc.com>
4 #
5 include ../Makefile.inc
6
7 OBJS = main.o
8
9 CFLAGS += -I$(multipathdir)
10 LDFLAGS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath -ludev
11
12 EXEC = multipath
13
14 all: $(EXEC)
15
16 $(EXEC): $(OBJS)
17         $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS)
18         $(GZIP) $(EXEC).8 > $(EXEC).8.gz
19         $(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gz
20
21 install:
22         $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
23         $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
24         $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
25         $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
26         $(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir)
27         $(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5.gz $(DESTDIR)$(man5dir)
28
29 uninstall:
30         rm $(DESTDIR)$(bindir)/$(EXEC)
31         rm $(DESTDIR)$(mandir)/$(EXEC).8.gz
32         rm $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz
33
34 clean:
35         rm -f core *.o $(EXEC) *.gz