Skip to content

Commit

Permalink
Merge pull request #51 from jpouellet/prefix2
Browse files Browse the repository at this point in the history
Use PREFIX & DESTDIR
  • Loading branch information
cseed authored Jan 17, 2017
2 parents 694beb7 + e0d2bb1 commit 814c062
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ SRC = src
CXXFLAGS = -I$(SRC) -std=c++11 -MD $(OPTDEBUGFLAGS) -Wall -Wshadow -Wsign-compare -Werror
LIBS = -lm

DESTDIR = /usr/local
ICEBOX = /usr/local/share/icebox
DESTDIR ?=
PREFIX ?= /usr/local
ICEBOX ?= $(PREFIX)/share/icebox

.PHONY: all
all: bin/arachne-pnr share/arachne-pnr/chipdb-1k.bin share/arachne-pnr/chipdb-8k.bin
Expand Down Expand Up @@ -104,16 +105,16 @@ mxebin:

.PHONY: install
install: all
mkdir -p $(DESTDIR)/bin
cp bin/arachne-pnr $(DESTDIR)/bin/arachne-pnr
mkdir -p $(DESTDIR)/share/arachne-pnr
cp share/arachne-pnr/chipdb-1k.bin $(DESTDIR)/share/arachne-pnr/chipdb-1k.bin
cp share/arachne-pnr/chipdb-8k.bin $(DESTDIR)/share/arachne-pnr/chipdb-8k.bin
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp bin/arachne-pnr $(DESTDIR)$(PREFIX)/bin/arachne-pnr
mkdir -p $(DESTDIR)$(PREFIX)/share/arachne-pnr
cp share/arachne-pnr/chipdb-1k.bin $(DESTDIR)$(PREFIX)/share/arachne-pnr/chipdb-1k.bin
cp share/arachne-pnr/chipdb-8k.bin $(DESTDIR)$(PREFIX)/share/arachne-pnr/chipdb-8k.bin

.PHONY: uninstall
uninstall:
rm -f $(DESTDIR)/bin/arachne-pnr
rm -f $(DESTDIR)/bin/share/arachne-pnr/*.bin
rm -f $(DESTDIR)$(PREFIX)/bin/arachne-pnr
rm -f $(DESTDIR)$(PREFIX)/bin/share/arachne-pnr/*.bin

.PHONY: clean
clean:
Expand Down

0 comments on commit 814c062

Please sign in to comment.