# Makefile for rest agent project

PROJECT = restproxy_go
VERSION = 2.2502.3
PLATFORM = amd64
# ARMPLATFORM = aarch64
# BUILDDIR = ../../build
# DEBBUILDDIR = ../../debbuild
# RPMBUILDDIR = $(HOME)/goprojects/rpmbuild
# INSTALLDIR = /usr/local/omc
# RELEASEDIR = ../../release
# LIBDIR = be.ems/lib
BINDIR = ../bin
BINNAME = $(BINDIR)/restproxy_go

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

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

clean:
	rm ./$(BINNAME)