GNU and BSD Make compatible makefile

This commit is contained in:
Sergey Matveev 2015-10-06 10:59:13 +03:00
parent 62b4ca67a0
commit e80115cf69
4 changed files with 10 additions and 4 deletions

3
BSDmakefile Normal file
View File

@ -0,0 +1,3 @@
VERSION != git describe --tags
include common.mk

3
GNUmakefile Normal file
View File

@ -0,0 +1,3 @@
VERSION = $(shell git describe --tags)
include common.mk

4
common.mk Normal file
View File

@ -0,0 +1,4 @@
LDFLAGS = -X main.version=$(VERSION)
goircd: *.go
go build -ldflags "$(LDFLAGS)"

View File

@ -1,4 +0,0 @@
LDFLAGS=-X main.version \"$(shell git describe --tags)\"
goircd:
go build -ldflags "$(LDFLAGS)" $(BUILD_FLAGS)