aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAaron Wood <aaronjwood@gmail.com>2017-01-28 17:16:34 -0500
committer无闻 <u@gogs.io>2017-01-28 17:16:34 -0500
commit263203ec28584d5c9c671257016b510783ef7c9f (patch)
tree98507d985e4d69211c4520d7250a8eceb5562f20 /Makefile
parent84f28fc5d667a24caf24a000047c4af6efe1af16 (diff)
Produce a position independent executable (#4011)
* Produce a position independent executable * Add OS detection to the main Makefile so we don't apply -pie on OS X
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c321f82b..1a60b686 100644
--- a/Makefile
+++ b/Makefile
@@ -5,8 +5,13 @@ DATA_FILES := $(shell find conf | sed 's/ /\\ /g')
LESS_FILES := $(wildcard public/less/gogs.less public/less/_*.less)
GENERATED := modules/bindata/bindata.go public/css/gogs.css
+OS := $(shell uname)
+
TAGS = ""
BUILD_FLAGS = "-v"
+ifeq ($(OS),Linux)
+ BUILD_FLAGS += " -buildmode=pie"
+endif
RELEASE_ROOT = "release"
RELEASE_GOGS = "release/gogs"