aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 47075ac2ff5593982f9e2aa2324fd9cc184f8ea9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
VERSION=`git describe --tags`
BUILD=`date +%FT%T%z`

LDFLAGS=-X github.com/FChannel0/FChannel-Server/config.Version=${VERSION} -X github.com/FChannel0/FChannel-Server/config.BuildTime=${BUILD}
FLAGS=-ldflags "-w -s ${LDFLAGS}"
FLAGS_DEBUG=-ldflags "${LDFLAGS}"

debug:
	go build -o fchan ${FLAGS_DEBUG}

build:
	go build -o fchan ${FLAGS}

clean:
	if [ -f "fchan" ]; then rm "fchan"; fi

.PHONY: clean install