Commit 22b65fe2 authored by Ludovic Rousseau's avatar Ludovic Rousseau

Makefile: Use variables for installation paths

Thanks to Georgi D. Sotirov for the idea
https://github.com/LudovicRousseau/pcsc-tools/pull/5
parent 908904a3
......@@ -22,17 +22,22 @@ all: $(BIN) $(MAN)
pcsc_scan: pcsc_scan.o
INSTALL_PREFIX ?= /usr
INSTALL_BIN_DIR ?= $(INSTALL_PREFIX)/bin
INSTALL_DATA_DIR ?= $(INSTALL_PREFIX)/share
INSTALL_MAN_DIR ?= $(INSTALL_DATA_DIR)/man
install: all
install -d $(DESTDIR)/bin/
install $(BIN) $(DESTDIR)/bin/
install -d $(DESTDIR)$(INSTALL_BIN_DIR)/
install $(BIN) $(DESTDIR)$(INSTALL_BIN_DIR)/
install $(BIN_SCRIPT) $(DESTDIR)/bin/
install $(BIN_SCRIPT) $(DESTDIR)$(INSTALL_BIN_DIR)/
install -d $(DESTDIR)/share/pcsc
install -m 644 smartcard_list.txt $(DESTDIR)/share/pcsc
install -d $(DESTDIR)$(INSTALL_DATA_DIR)/pcsc
install -m 644 smartcard_list.txt $(DESTDIR)$(INSTALL_DATA_DIR)/pcsc
install -d $(DESTDIR)/share/man/man1/
install -m 644 $(MAN) $(DESTDIR)/share/man/man1/
install -d $(DESTDIR)$(INSTALL_MAN_DIR)/man1/
install -m 644 $(MAN) $(DESTDIR)$(INSTALL_MAN_DIR)/man1/
clean:
rm -f pcsc_scan.o $(BIN) $(MAN)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment