From e80115cf6921d4fc2d64b3b809c76a5019f82309 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Tue, 6 Oct 2015 10:59:13 +0300 Subject: [PATCH] GNU and BSD Make compatible makefile --- BSDmakefile | 3 +++ GNUmakefile | 3 +++ common.mk | 4 ++++ makefile | 4 ---- 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 BSDmakefile create mode 100644 GNUmakefile create mode 100644 common.mk delete mode 100644 makefile diff --git a/BSDmakefile b/BSDmakefile new file mode 100644 index 0000000..e3e6326 --- /dev/null +++ b/BSDmakefile @@ -0,0 +1,3 @@ +VERSION != git describe --tags + +include common.mk diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..04d452d --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,3 @@ +VERSION = $(shell git describe --tags) + +include common.mk diff --git a/common.mk b/common.mk new file mode 100644 index 0000000..888e048 --- /dev/null +++ b/common.mk @@ -0,0 +1,4 @@ +LDFLAGS = -X main.version=$(VERSION) + +goircd: *.go + go build -ldflags "$(LDFLAGS)" diff --git a/makefile b/makefile deleted file mode 100644 index 26e28a7..0000000 --- a/makefile +++ /dev/null @@ -1,4 +0,0 @@ -LDFLAGS=-X main.version \"$(shell git describe --tags)\" - -goircd: - go build -ldflags "$(LDFLAGS)" $(BUILD_FLAGS) -- 2.44.0