aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..47075ac
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,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