1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-16 04:44:55 +02:00
antelope-api-healthcheck/Makefile
2021-12-30 19:08:39 +01:00

41 lines
942 B
Makefile

GO = go
GOCCFLAGS = -v
GOLDFLAGS = -ldflags="-s -w"
PREFIX = /usr/local
PROGRAM_NAME=eosio-api-healthcheck
SOURCES=src/main.go src/server.go
DEPENDANCIES= github.com/firstrow/tcp_server \
github.com/liamylian/jsontime/v2 \
github.com/imroc/req \
github.com/pborman/getopt/v2
all: build
build: build/$(PROGRAM_NAME) build/.buildinfo
build/$(PROGRAM_NAME) : $(SOURCES)
$(GO) build -o $@ $(GOCCFLAGS) $(GOLDFLAGS) $^
build/.buildinfo:
$(GO) env > $@
deps:
$(GO) get $(DEPENDANCIES)
info-file :
echo PACKAGE_NAME=\"$(PROGRAM_NAME)\" "\n"\
PACKAGE_DESCRIPTION=\"HAproxy healthcheck program for EOSIO API.\" "\n"\
PACKAGE_VERSION=\"1.1\" "\n"\
PACKAGE_PREFIX=\"$(PREFIX:/%=%)\" "\n"\
PACKAGE_PROGRAM=\"build/$(PROGRAM_NAME)\" > scripts/pkg_info
package_deb: info-file
./scripts/build.sh deb $(realpath build)
package_freebsd: info-file
./scripts/build.sh freebsd $(realpath build)
clean:
$(GO) clean
$(RM) -rf build/