-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (33 loc) · 950 Bytes
/
Makefile
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
36
37
38
39
40
41
42
43
44
45
# Makefile for Cloudian gosbench
#
# USAGE:
# make gosserver # To generate a new gosbench-ctl binary
# make gosdriver # To generate a new gosbench-ctl binary
#
include vars.make
PROJECT_NAME := cloudian-gosbench
export PROJECT_NAME
PROJECT_DIR := $(CURDIR)
export PROJECT_DIR
BUILD_CONTAINER := golang:1.22.6
export BUILD_CONTAINER
MOD_DIR := $(CURDIR)
# ISO8601 UTC build timestamp
export BUILDTIME := $(shell date --utc +%FT%TZ)
SUBDIRS = ./cmd/gosserver ./cmd/gosdriver
.PHONY: clean build lint
all: build
clean:
for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir clean; \
done
rm -rf $(BUILD)
#clean_cache:
# sudo rm -rf $(BUILD)/golang/pkg
build: lint
for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir all; \
done
lint:
@echo "Running gofmt"
sudo docker run --rm --name ${PROJECT_NAME}-compiler -v $(CURDIR):/go/src/${PROJECT_NAME} -w /go/src/${PROJECT_NAME} ${BUILD_CONTAINER} gofmt -s -w .