]> pilppa.com Git - uci.git/commitdiff
add make install to the uci build directory
authorFelix Fietkau <nbd@openwrt.org>
Sun, 13 Apr 2008 13:20:29 +0000 (15:20 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 13 Apr 2008 13:20:29 +0000 (15:20 +0200)
Makefile

index edbdc4effcccc8e8bb42475432cbb818048b9c88..421c2d9c27f7141015c205e860f6e83eadd28f5a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,9 @@ PLUGIN_SUPPORT=1
 DEBUG=0
 DEBUG_TYPECAST=0
 
+prefix=/usr
+DESTDIR=
+
 COPTS=-O2
 WOPTS=-pedantic -Wno-unused -Werror
 FPIC=-fPIC
@@ -15,6 +18,7 @@ LD=ld
 CC=gcc
 LIBS=-lc
 RANLIB=ranlib
+INSTALL=install
 
 ifeq ($(DEBUG),1)
   COPTS = -O0
@@ -77,5 +81,11 @@ libuci.$(SHLIB_EXT): libuci-shared.o
 clean:
        rm -f uci uci-static *.[oa] *.so* *.dylib* uci_config.h
 
+install: all
+       $(INSTALL) -m0644 libuci.a $(DESTDIR)$(prefix)/lib/
+       $(INSTALL) -m0755 $(SHLIB_FILE) $(DESTDIR)$(prefix)/lib/
+       ln -sf $(SHLIB_FILE) $(DESTDIR)$(prefix)/lib/libuci.$(SHLIB_EXT)
+       $(INSTALL) -m0755 uci $(DESTDIR)/usr/bin/
+
 FORCE: ;
 .PHONY: FORCE