Skip to content

Commit

Permalink
add makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmonsays committed Feb 25, 2021
1 parent 1a28114 commit 888b239
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.PHONY: install

TOPDIR = $(shell pwd)

export GOWORKSPACE := $(shell pwd)
export GOBIN := $(GOWORKSPACE)/bin
export GO111MODULE := on

GO_BINS =
GO_BINS += runitcmd

all:
$(MAKE) compile

compile:
mkdir -p tmp
mkdir -p $(GOBIN)
go install github.com/...

install:
mkdir -p $(DESTDIR)/$(INSTALL_PREFIX)/bin/
$(MAKE) install-bins

install-bins: $(addprefix installbin-, $(GO_BINS))

$(addprefix installbin-, $(GO_BINS)):
$(eval BIN=$(@:installbin-%=%))
cp -v $(GOBIN)/$(BIN) $(DESTDIR)/$(INSTALL_PREFIX)/bin/

0 comments on commit 888b239

Please sign in to comment.