I would like to know if it is possible to create 2 different executables on the same module, main1.go -> main1.exe main2.go -> main2.exe
root
-> main2.go
-> main1.go
the goal is to run Makefile, which will create 2 different executables. Thanks
LATE_TARGET_HOOK=make_main
LATE_TARGET_HOOK=make_client
DS_CONF = ds.conf
export GOROOT := $(UV_golang_PKG)
export GOPROXY := http://****-product.****.com:****/artifactory/api/go/go
export GOSUMDB := off
export PATH := $(PATH):$(GOROOT)/bin
export VERSION := $(shell (cat $(SRCROOT)/VERSION))
GO =$(GOROOT)/bin/go
CONF_FILES = VERSION
include $(MODULEMK)
ifndef UV_BUILDNUMBER
UV_BUILDNUMBER = 0000
endif
make_main:
${GO} mod tidy
GOARCH=amd64 GOOS=linux CGO_CFLAGS=$(CGO_CFLAGS) CGO_LDFLAGS=$(CGO_LDFLAGS) $(GO) build $(BUILD_FLAGS) -o $(SRCROOT)/CMpub/bin/$(UV_O)/agentExporters .
make_client:
${GO} mod tidy
GOARCH=amd64 GOOS=linux CGO_CFLAGS=$(CGO_CFLAGS) CGO_LDFLAGS=$(CGO_LDFLAGS) $(GO) build $(BUILD_FLAGS) -o $(SRCROOT)/CMpub/bin/$(UV_O)/disableCollector .