1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-17 04:50:02 +02:00
antelope-api-healthcheck/Makefile
2021-12-02 13:23:19 +01:00

38 lines
850 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/$(PROGRAM_NAME) : $(SOURCES)
$(GO) build -o $@ $(GOCCFLAGS) $(GOLDFLAGS) $^
deps:
$(GO) get $(DEPENDANCIES)
info-file :
echo PACKAGE_NAME=\"$(PROGRAM_NAME)\" "\n"\
PACKAGE_DESCRIPTION=\"HAproxy healthcheck program for EOSIO API.\" "\n"\
PACKAGE_VERSION=\"1.0\" "\n"\
PACKAGE_PREFIX=\"$(PREFIX:/%=%)\" "\n"\
PACKAGE_PROGRAM=\"build/$(PROGRAM_NAME)\" > scripts/info
package_deb: info-file
./scripts/build.sh deb
package_freebsd: info-file
./scripts/build.sh freebsd
clean:
$(GO) clean
$(RM) -rf build/