summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2008-12-31 21:34:03 +0000
committerShawn O. Pearce <spearce@spearce.org>2008-12-31 13:45:34 -0800
commit8ed341c55ed4d6f4cdc8bf4f0ca18a08c93f6962 (patch)
tree88c3c7230f3d49807323df8f01546b8a7fdce9fc
parent0c01d80a09b0908856d5494d3c7ac7e6d22f1126 (diff)
downloadlibgit2-8ed341c55ed4d6f4cdc8bf4f0ca18a08c93f6962.tar.gz
Add a build variable to allow supression of -fvisibility
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e5aedc064..3ae3c8511 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,28 @@
all::
+# Define NO_VISIBILITY if your compiler does not support symbol
+# visibility in general (and the -fvisibility switch in particular).
+
DOXYGEN = doxygen
RANLIB = ranlib
prefix=/usr/local
+uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo no')
+
CFLAGS = -g -O2 -Wall
OS = unix
+# Platform specific tweaks
+
+ifneq (,$(findstring CYGWIN,$(uname_S)))
+ NO_VISIBILITY=YesPlease
+endif
+
BASIC_CFLAGS := -Isrc
+ifndef NO_VISIBILITY
BASIC_CFLAGS += -fvisibility=hidden
+endif
ALL_CFLAGS = $(CFLAGS) $(BASIC_CFLAGS)
SRC_C = $(wildcard src/*.c)