Imported Upstream version 0.7.0
[platform/upstream/multipath-tools.git] / libmpathpersist / Makefile
index 1c4b2e1..857c8d8 100644 (file)
@@ -13,9 +13,8 @@ OBJS = mpath_persist.o mpath_updatepr.o mpath_pr_ioctl.o
 
 all: $(LIBS)
 
-$(LIBS):
-       $(CC) -c $(CFLAGS) *.c
-       $(CC) $(SHARED_FLAGS) $(LIBDEPS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS)
+$(LIBS): $(OBJS)
+       $(CC) $(LDFLAGS) $(SHARED_FLAGS) $(LIBDEPS) -Wl,-soname=$@ -o $@ $(OBJS)
        $(LN) $(LIBS) $(DEVLIB)
        $(GZIP) mpath_persistent_reserve_in.3 > mpath_persistent_reserve_in.3.gz
        $(GZIP) mpath_persistent_reserve_out.3 > mpath_persistent_reserve_out.3.gz
@@ -25,17 +24,17 @@ install: $(LIBS)
        $(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(syslibdir)/$(LIBS)
        $(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(syslibdir)
        $(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(man3dir)
-       $(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(incdir)
+       $(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(includedir)
        $(LN) $(LIBS) $(DESTDIR)$(syslibdir)/$(DEVLIB)
        $(INSTALL_PROGRAM) -m 644 mpath_persistent_reserve_in.3.gz $(DESTDIR)$(man3dir)
        $(INSTALL_PROGRAM) -m 644 mpath_persistent_reserve_out.3.gz $(DESTDIR)$(man3dir)
-       $(INSTALL_PROGRAM) -m 644 mpath_persist.h $(DESTDIR)$(incdir)
+       $(INSTALL_PROGRAM) -m 644 mpath_persist.h $(DESTDIR)$(includedir)
 
 uninstall:
        $(RM) $(DESTDIR)$(syslibdir)/$(LIBS)
        $(RM) $(DESTDIR)$(man3dir)/mpath_persistent_reserve_in.3.gz
        $(RM) $(DESTDIR)$(man3dir)/mpath_persistent_reserve_out.3.gz
-       $(RM) $(DESTDIR)$(incdir)/mpath_persist.h
+       $(RM) $(DESTDIR)$(includedir)/mpath_persist.h
        $(RM) $(DESTDIR)$(syslibdir)/$(DEVLIB)
 
 clean: