1 Star 0 Fork 0

yyt030/mydata

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
yyt030 提交于 2024-04-28 18:53 . update
REPO := mydata
GOOS := $(if $(GOOS),$(GOOS),$(shell go env GOOS))
GOARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))
GOENV := GO111MODULE=on CGO_ENABLED=1 GOOS=$(GOOS) GOARCH=$(GOARCH)
GO := $(GOENV) go
GOBUILD := $(GO) build -trimpath
GORUN := $(GO) run
SHELL := /usr/bin/env bash
COMMIT := $(shell git describe --always --no-match --tags --dirty="-dev")
BUILDTS := $(shell date '+%Y-%m-%d %H:%M:%S')
GITHASH := $(shell git rev-parse HEAD)
GITREF := $(shell git rev-parse --abbrev-ref HEAD)
GOVER := $(shell go version)
LDFLAGS := -w -s
LDFLAGS += -X "$(REPO)/internal/version.ReleaseVersion=$(COMMIT)"
LDFLAGS += -X "$(REPO)/internal/version.BuildTS=$(BUILDTS)"
LDFLAGS += -X "$(REPO)/internal/version.GitHash=$(GITHASH)"
LDFLAGS += -X "$(REPO)/internal/version.GitBranch=$(GITREF)"
LDFLAGS += -X "$(REPO)/internal/version.GoVersion=$(GOVER)"
all: gen conv mydata
mydata:
CGO_CFLAGS=-I$(IBM_DB_HOME)/include CGO_LDFLAGS=-L$(IBM_DB_HOME)/lib $(GOBUILD) -ldflags '$(LDFLAGS)' -o ./dist/mydata main.go
gen:
CGO_CFLAGS=-I$(IBM_DB_HOME)/include CGO_LDFLAGS=-L$(IBM_DB_HOME)/lib $(GOBUILD) -ldflags '$(LDFLAGS)' -o ./dist/gen cmd/other/genschema/gen.go
conv:
CGO_CFLAGS=-I$(IBM_DB_HOME)/include CGO_LDFLAGS=-L$(IBM_DB_HOME)/lib $(GOBUILD) -ldflags '$(LDFLAGS)' -o ./dist/conv cmd/other/conv/conv.go
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yyt030/mydata.git
git@gitee.com:yyt030/mydata.git
yyt030
mydata
mydata
master

搜索帮助