add DESTDIR support, needed for crosscompiling; dont hardcode /usr/include - use...
authorStephan Raue <stephan@openelec.tv>
Sat, 11 Jun 2011 21:25:07 +0000 (23:25 +0200)
committerStephan Raue <stephan@openelec.tv>
Sat, 11 Jun 2011 21:25:07 +0000 (23:25 +0200)
Signed-off-by: Stephan Raue <stephan@openelec.tv>
Makefile.in

index 64f03d814c08bdbea36eae606a4b25950f6bf317..d86a1b7cadc0958d7e20eb8997a8c8760b6e3a9d 100644 (file)
@@ -1,6 +1,7 @@
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 libdir = @libdir@
+includedir = @includedir@
 bindir = @bindir@
 LIBS=@LIBS@
 INSTALLCMD = @install@ -c
@@ -109,22 +110,16 @@ rquota/libnfs-raw-rquota.o: rquota/libnfs-raw-rquota.c rquota/libnfs-raw-rquota.
        $(CC) $(CFLAGS) -c rquota/libnfs-raw-rquota.c -o $@
 
 install: $(LIBNFS_A) $(LIBNFS_SO)
-ifeq ("$(LIBDIR)x","x")
-       mkdir -p $(libdir)
-       $(INSTALLCMD) -m 755 $(LIBNFS_SO) $(libdir)
-       $(INSTALLCMD) -m 755 $(LIBNFS_A) $(libdir)
+       mkdir -p $(DESTDIR)$(libdir)
+       $(INSTALLCMD) -m 755 $(LIBNFS_SO) $(DESTDIR)$(libdir)
+       $(INSTALLCMD) -m 755 $(LIBNFS_A) $(DESTDIR)$(libdir)
        @ldconfig@
-else
-       mkdir -p $(LIBDIR)
-       $(INSTALLCMD) -m 755 $(LIBISCSI_SO) $(LIBDIR)
-       $(INSTALLCMD) -m 755 $(LIBNFS_A) $(LIBDIR)
-endif
-       mkdir -p $(prefix)/include/nfsc
-       $(INSTALLCMD) -m 644 include/libnfs.h $(prefix)/include/nfsc
-       $(INSTALLCMD) -m 644 include/libnfs-private.h $(prefix)/include/nfsc
-       $(INSTALLCMD) -m 644 mount/libnfs-raw-mount.h $(prefix)/include/nfsc
-       $(INSTALLCMD) -m 644 nfs/libnfs-raw-nfs.h $(prefix)/include/nfsc
-       $(INSTALLCMD) -m 644 portmap/libnfs-raw-portmap.h $(prefix)/include/nfsc
+       mkdir -p $(DESTDIR)$(includedir)/nfsc
+       $(INSTALLCMD) -m 644 include/libnfs.h $(DESTDIR)$(includedir)/nfsc
+       $(INSTALLCMD) -m 644 include/libnfs-private.h $(DESTDIR)$(includedir)/nfsc
+       $(INSTALLCMD) -m 644 mount/libnfs-raw-mount.h $(DESTDIR)$(includedir)/nfsc
+       $(INSTALLCMD) -m 644 nfs/libnfs-raw-nfs.h $(DESTDIR)$(includedir)/nfsc
+       $(INSTALLCMD) -m 644 portmap/libnfs-raw-portmap.h $(DESTDIR)$(includedir)/nfsc
 
 distclean: clean
        rm -f config.h config.log config.status configure Makefile