aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com>2021-11-07 00:32:39 -0300
committerFChannel <>2022-06-19 12:53:29 -0700
commit972223c992ca5aa5e5d93cff3b2ee4e30182025b (patch)
treeff61695c734852aeafdc0e872cc6f47085a8e787 /Makefile
parentbc9051fd1a17e793647cf309c973a7feefebd98f (diff)
restructuring part 5
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