Makefile 931 Bytes
Newer Older
qiuqunfeng's avatar
qiuqunfeng committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
VERSION = 0.1.0

## 判断操作系统及内核架构
UNAME_S := $(shell uname -s)
UNAME_M := $(shell uname -m)

#ifeq ($(UNAME_S),Linux)
#	LDFLAGS = -extldflags "-static"
#endif

## 指定镜像仓库地址: "地址:端口/项目"
REPOPREFIX?=localhost:32000

## 指定镜像tag
IMAGE_TAG?=v0.0.1

## 指定国内源
MIRROR_SOURCE?=mirrors.aliyun.com

## holmes-packages的镜像tag
FETCHTAG?=latest

## base image的tag
BASE_IMAGE_TAG?=latest

## license版本: "sit"/"release"
LICENSE_SECRET?=sit

## 指定bin目录
BIN_DIR = $(shell pwd)/bin/

.PHONY: help
help:
	@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'

qiuqunfeng's avatar
commit  
qiuqunfeng committed
36 37 38
.PHONY: waf-console
waf-console:
	@echo "build waf-console"
qiuqunfeng's avatar
qiuqunfeng committed
39
	go build -v \
qiuqunfeng's avatar
commit  
qiuqunfeng committed
40 41 42
		-tags=jsoniter -o dist/waf-console gitlab.com/tensorsecurity-rd/waf-console/cmd
	#upx --lzma --best dist/waf-console
	docker build -t $(REPOPREFIX)/waf-console:$(IMAGE_TAG) -f ./build/Dockerfile .