# Makefile for rest agent project

PROJECT = OMC
VERSION = 1.6.2
PLATFORM = amd64
ARMPLATFORM = aarch64
BUILDDIR = ../../build
DEBBUILDDIR = ../../debbuild
RPMBUILDDIR = $(HOME)/goprojects/rpmbuild
INSTALLDIR = /usr/local/omc
RELEASEDIR = ../../release
LIBDIR = ems.agt/lib
BINNAME = restagent

.PHONY: build $(BINNAME)
build $(BINNAME):
	go build -o $(BINNAME) -v -ldflags "-X '$(LIBDIR)/global.Version=$(VERSION)' \
		-X '$(LIBDIR)/global.BuildTime=`date`' \
		-X '$(LIBDIR)/global.GoVer=`go version`'"

run: $(BINNAME)	
	./$(BINNAME) 

clean:
	rm ./$(BINNAME)

