Merge pull request #66 from mrunalp/make_install
[make] Add install and uninstall targets
This commit is contained in:
commit
f46888f429
1 changed files with 14 additions and 1 deletions
15
Makefile
15
Makefile
|
@ -7,6 +7,8 @@ OCID_LINK := ${CURDIR}/vendor/src/github.com/kubernetes-incubator/cri-o
|
||||||
OCID_LINK_DIR := ${CURDIR}/vendor/src/github.com/kubernetes-incubator
|
OCID_LINK_DIR := ${CURDIR}/vendor/src/github.com/kubernetes-incubator
|
||||||
OCID_INSTANCE := ocid_dev
|
OCID_INSTANCE := ocid_dev
|
||||||
SYSTEM_GOPATH := ${GOPATH}
|
SYSTEM_GOPATH := ${GOPATH}
|
||||||
|
PREFIX ?= ${DESTDIR}/usr
|
||||||
|
INSTALLDIR=${PREFIX}/bin
|
||||||
export GOPATH := ${CURDIR}/vendor
|
export GOPATH := ${CURDIR}/vendor
|
||||||
|
|
||||||
default: help
|
default: help
|
||||||
|
@ -59,6 +61,15 @@ localintegration: binaries
|
||||||
|
|
||||||
binaries: ${OCID_LINK} ocid ocic conmon
|
binaries: ${OCID_LINK} ocid ocic conmon
|
||||||
|
|
||||||
|
install:
|
||||||
|
install -D -m 755 ocid ${INSTALLDIR}/ocid
|
||||||
|
install -D -m 755 ocic ${INSTALLDIR}/ocic
|
||||||
|
install -D -m 755 conmon/conmon ${INSTALLDIR}/conmon
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm -f ${INSTALLDIR}/{ocid,ocic,conmon}
|
||||||
|
|
||||||
|
|
||||||
.PHONY: .gitvalidation
|
.PHONY: .gitvalidation
|
||||||
# When this is running in travis, it will only check the travis commit range
|
# When this is running in travis, it will only check the travis commit range
|
||||||
.gitvalidation:
|
.gitvalidation:
|
||||||
|
@ -86,4 +97,6 @@ install.tools: .install.gitvalidation .install.gometalinter
|
||||||
ocid \
|
ocid \
|
||||||
ocic \
|
ocic \
|
||||||
clean \
|
clean \
|
||||||
lint
|
lint \
|
||||||
|
install \
|
||||||
|
uninstall
|
||||||
|
|
Loading…
Reference in a new issue