From ba59f1020040d31fbe7a8109e6fc489d978087fc Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Mon, 14 Mar 2011 17:38:06 +0100 Subject: install script --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) 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)) -- cgit v1.2.3