working linux Makefile

needed to add a configure script to add GOPATH as Makefile variable. Otherwise sudo make install may run into issues getting a non-root user's GOPATH.
This commit is contained in:
Cayman Nava 2014-03-08 22:02:09 -08:00
parent fbd53f0e34
commit 6c91aa0f4c
2 changed files with 10 additions and 6 deletions

View File

@ -1,18 +1,20 @@
UNAME = $(shell uname)
FILES=qml *.png
# Default is building
all:
go install
cp *.go $(GOPATH)/src/github.com/ethereum/go-ethereum
cp -r ui $(GOPATH)/src/github.com/ethereum/go-ethereum
go install github.com/ethereum/go-ethereum
install:
# Linux build
ifeq ($(UNAME),Linux)
mkdir /usr/local/ethereal
files=(wallet.qml net.png network.png new.png tx.png)
for file in "${files[@]}"; do
cp $file /usr/share/ethereal
mkdir /usr/share/ethereal
for file in $(FILES); do \
cp -r $$file /usr/share/ethereal; \
done
cp $GOPATH/bin/go-ethereum /usr/local/bin/ethereal
cp $(GOPATH)/bin/go-ethereum /usr/local/bin/ethereal
endif
# OS X build
ifeq ($(UNAME),Darwin)

2
configure vendored Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
sed -i '1i\GOPATH='$GOPATH Makefile