Updating AAI wit resource info : part4
[multicloud/k8s.git] / src / monitor / Makefile
1 # SPDX-license-identifier: Apache-2.0
2 ##############################################################################
3 # Copyright (c) 2019 Intel Corporation
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 PWD := $(shell pwd)
11 PLATFORM := linux
12 BINARY := monitor
13
14 export GO111MODULE=on
15
16 all: test build
17 deploy: test build
18
19 build: clean test cover
20         CGO_ENABLED=0 GOOS=$(PLATFORM) GOARCH=amd64
21         go build -a -ldflags '-extldflags "-static"' \
22         -o $(PWD)/$(BINARY) cmd/manager/main.go
23
24 deploy: build
25
26 .PHONY: test
27 test: clean
28         @go test -v ./...
29
30 format:
31         @go fmt ./...
32
33 clean:
34         @rm -f $(BINARY)
35
36 .PHONY: cover
37 cover:
38         @go test -p 2 ./... -coverprofile=coverage.out
39         @go tool cover -html=coverage.out -o coverage.html