aboutsummaryrefslogtreecommitdiffstats
path: root/src/monitor/Makefile
diff options
context:
space:
mode:
authorRitu Sood <Ritu.Sood@intel.com>2019-08-28 20:35:09 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-28 20:35:09 +0000
commitc5218d2a9d3d6ff009a87e7f1e999a8b5c0332d3 (patch)
tree8d3522a941fdc85ef24e6294c9bd9eb9d4b1b251 /src/monitor/Makefile
parentb8f0a1c74947c50b3f1a5b3e3ca7cb6e4ccc7ab9 (diff)
parentab8c95eff5c1228237f758d3ccfc99c751f713f7 (diff)
Merge "Adding monitor operator to monitor edge resources"
Diffstat (limited to 'src/monitor/Makefile')
-rw-r--r--src/monitor/Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/monitor/Makefile b/src/monitor/Makefile
new file mode 100644
index 00000000..b783bf63
--- /dev/null
+++ b/src/monitor/Makefile
@@ -0,0 +1,41 @@
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2019 Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+PWD := $(shell pwd)
+GOPATH := $(shell realpath "$(PWD)/../../")
+PLATFORM := linux
+BINARY := monitor
+
+export GOPATH ...
+export GO111MODULE=on
+
+all: test build
+deploy: test build
+
+build: clean test cover
+ CGO_ENABLED=0 GOOS=$(PLATFORM) GOARCH=amd64
+ go build -a -ldflags '-extldflags "-static"' \
+ -o $(PWD)/$(BINARY) cmd/manager/main.go
+
+deploy: build
+
+.PHONY: test
+test: clean
+ @go test -v ./...
+
+format:
+ @go fmt ./...
+
+clean:
+ @rm -f $(BINARY)
+
+.PHONY: cover
+cover:
+ @go test -p 2 ./... -coverprofile=coverage.out
+ @go tool cover -html=coverage.out -o coverage.html