diff --git a/restagent/makefile b/restagent/makefile index 726503aa..492548fc 100644 --- a/restagent/makefile +++ b/restagent/makefile @@ -12,8 +12,19 @@ RELEASEDIR = ../../release LIBDIR = be.ems/lib BINNAME = restagent -.PHONY: build $(BINNAME) -build $(BINNAME): +# set the default target +all: build + +.PHONY: build debug run clean + +debug: + # Build with debug flags + go build -o $(BINNAME) -v -gcflags "all=-N -l" -ldflags "-s -w -X '$(LIBDIR)/global.Version=$(VERSION)' \ + -X '$(LIBDIR)/global.BuildTime=`date`' \ + -X '$(LIBDIR)/global.GoVer=`go version`'" + +build: + # Build with release flags go build -o $(BINNAME) -v -ldflags "-s -w -X '$(LIBDIR)/global.Version=$(VERSION)' \ -X '$(LIBDIR)/global.BuildTime=`date`' \ -X '$(LIBDIR)/global.GoVer=`go version`'"