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