summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-03-14 17:38:06 +0100
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-03-14 17:38:06 +0100
commitba59f1020040d31fbe7a8109e6fc489d978087fc (patch)
treee6286e46a5115725357c3462e60d2f903b312982 /Makefile
parent30998baf652d4e66a92cd912519f9358be2cf628 (diff)
downloadipecamera-ba59f1020040d31fbe7a8109e6fc489d978087fc.tar.gz
ipecamera-ba59f1020040d31fbe7a8109e6fc489d978087fc.tar.bz2
ipecamera-ba59f1020040d31fbe7a8109e6fc489d978087fc.tar.xz
ipecamera-ba59f1020040d31fbe7a8109e6fc489d978087fc.zip
install script
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 3dee6b5..a1e3968 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ BINARIES += pci
INCDIR +=
LDINC += $(addprefix -L ,$(LIBDIR))
LDFLAGS +=
+DESTDIR ?= /usr/local
all: $(BINARIES)
@@ -23,6 +24,12 @@ pci: cli.o libpcilib.so
echo -e "LD \t$@"
$(Q)$(CC) $(LDINC) $(LDFLAGS) $(CFLAGS) -L. -lpcilib -o $@ $<
+install: pci
+ install -m 644 pcilib.h $(DESTDIR)/include
+ if [ -d $(DESTDIR)/lib64 ]; then install -m 755 libpcilib.so $(DESTDIR)/lib64; else install -m 755 libpcilib.so $(DESTDIR)/lib; fi
+ install -m 755 pci $(DESTDIR)/bin
+ ldconfig
+
clean:
@echo -e "CLEAN \t$(shell pwd)"
-$(Q)rm -f $(addprefix $(BINDIR)/,$(BINARIES))