9cda94c444b0e0bb9f70d1dfdaf2a9deef6361c2
[multipath-tools/.git] / libmpathcmd / Makefile
1 include ../Makefile.inc
2
3 SONAME = 0
4 DEVLIB = libmpathcmd.so
5 LIBS = $(DEVLIB).$(SONAME)
6
7 OBJS = mpath_cmd.o
8
9 all: $(LIBS)
10
11 $(LIBS): $(OBJS)
12         $(CC) $(LDFLAGS) $(SHARED_FLAGS) -Wl,-soname=$@ -o $@ $(OBJS) $(LIBDEPS)
13         $(LN) $@ $(DEVLIB)
14
15 install: $(LIBS)
16         $(INSTALL_PROGRAM) -d $(DESTDIR)$(syslibdir)
17         $(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(syslibdir)/$(LIBS)
18         $(LN) $(LIBS) $(DESTDIR)$(syslibdir)/$(DEVLIB)
19         $(INSTALL_PROGRAM) -d $(DESTDIR)$(includedir)
20         $(INSTALL_PROGRAM) -m 644 mpath_cmd.h $(DESTDIR)$(includedir)
21
22 uninstall:
23         $(RM) $(DESTDIR)$(syslibdir)/$(LIBS)
24         $(RM) $(DESTDIR)$(syslibdir)/$(DEVLIB)
25         $(RM) $(DESTDIR)$(includedir)/mpath_cmd.h
26
27 clean:
28         $(RM) core *.a *.o *.so *.so.* *.gz