multipath-tools: replace install with its variable in makefiles
[multipath-tools/.git] / mpathpersist / Makefile
1 # Makefile
2 #
3 include ../Makefile.inc
4
5 OBJS = main.o
6
7 CFLAGS += -I$(multipathdir) -I$(mpathpersistdir)
8 LDFLAGS += -lpthread -ldevmapper -L$(mpathpersistdir) -lmpathpersist -L$(multipathdir) -L$(mpathcmddir) -lmpathcmd -lmultipath -ludev
9
10 EXEC = mpathpersist
11
12 all: $(EXEC)
13
14 $(EXEC): $(OBJS)
15         $(CC) -g $(OBJS) -o $(EXEC) $(LDFLAGS) $(CFLAGS)
16         $(GZIP) $(EXEC).8 > $(EXEC).8.gz
17         
18 install:
19         $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
20         $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
21         $(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
22         $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
23         
24 clean:
25         $(RM) *.o $(EXEC)
26         $(RM) mpathpersist.8.gz
27
28 uninstall:
29         $(RM) $(DESTDIR)$(bindir)/$(EXEC)
30         $(RM) $(DESTDIR)$(mandir)/$(EXEC).8.gz