makefile
This commit is contained in:
21
Makefile
21
Makefile
@ -2,26 +2,27 @@ PROJECT_NAME := "alchemyst-go"
|
||||
PKG := "lab.zaar.be/thefish/$(PROJECT_NAME)"
|
||||
GO=$(shell which go)
|
||||
CWD=$(shell pwd)
|
||||
DISTFOLDER=$(CWD)/dist
|
||||
CP=$(shell cp)
|
||||
GLIDE=$(shell which glide)
|
||||
|
||||
LDFLAGS="-X \"main.versionInfo=${PKG_VER}-${CI_PIPELINE_ID} built at $(shell date) on $(shell hostname) with $(shell go version)\""
|
||||
|
||||
.PHONY: all build test get-dep
|
||||
.PHONY: all build test
|
||||
|
||||
all: build test
|
||||
|
||||
#build: build.spec build.server
|
||||
build: build.server
|
||||
build: build.game
|
||||
|
||||
#build.spec:
|
||||
# $(CWD)/bin/oapi-codegen --generate types,spec -o $(CWD)/api/inner/inner.gen.go $(CWD)/public/schema/api.yaml
|
||||
build.deps:
|
||||
GIT_SSL_NO_VERIFY=true $(GO) mod vendor
|
||||
|
||||
build.server:
|
||||
$(GO) build -ldflags $(LDFLAGS) -o $(CWD)/bin/game $(CWD)/cmd/game/main.go
|
||||
build.game:
|
||||
cp $(CWD)/vendor/lab.zaar.be/thefish/bearlibterminal/libBearLibTerminal.so $(DISTFOLDER)
|
||||
cp $(CWD)/config.json $(DISTFOLDER)
|
||||
cp -r $(CWD)/resources $(DISTFOLDER)
|
||||
$(GO) build -ldflags $(LDFLAGS) -o $(DISTFOLDER)/game $(CWD)/cmd/game/main.go
|
||||
|
||||
test:
|
||||
$(GO) test -v $(go list ./... | grep -v /vendor/)
|
||||
|
||||
get-dep:
|
||||
GIT_SSL_NO_VERIFY=true go mod vendor
|
||||
|
||||
|
Reference in New Issue
Block a user