summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2006-03-23 20:19:03 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2006-03-23 20:19:03 +0000
commit4c7a6f4f5c92c35cf48cb4816bd386b9b2985221 (patch)
tree7fcf02868350f9928f398d6854df5153ebf92725
parentf6197574b67dd95a6983c82645a4fcfa614b368b (diff)
downloadnetsurf-4c7a6f4f5c92c35cf48cb4816bd386b9b2985221.tar.gz
netsurf-4c7a6f4f5c92c35cf48cb4816bd386b9b2985221.tar.bz2
[project @ 2006-03-23 20:19:03 by jmb]
Makefile changes to allow compilation under Cygwin. svn path=/import/netsurf/; revision=2156
-rw-r--r--makefile12
-rw-r--r--posix.mk5
2 files changed, 15 insertions, 2 deletions
diff --git a/makefile b/makefile
index a2b4a6235..2e1af2a81 100644
--- a/makefile
+++ b/makefile
@@ -122,6 +122,14 @@ CFLAGS_GTK = -std=c9x -D_BSD_SOURCE -D_POSIX_C_SOURCE -Dgtk \
$(WARNFLAGS) -I.. -g -O \
`pkg-config --cflags gtk+-2.0` `xml2-config --cflags`
+# Stop GCC under Cygwin throwing a fit
+# If you pass -std=<whatever> it appears to define __STRICT_ANSI__
+# This causes use of functions such as vsnprintf to fail (as Cygwin's header
+# files surround declarations of such things with #ifndef __STRICT_ANSI__)
+ifeq ($(shell echo $$OS),Windows_NT)
+CFLAGS_GTK += -U__STRICT_ANSI__
+endif
+
AFLAGS_RISCOS = -I..,. $(PLATFORM_AFLAGS_RISCOS)
AFLAGS_RISCOS_SMALL = $(AFLAGS_RISCOS) -Dsmall
AFLAGS_NCOS = $(AFLAGS_RISCOS) -Dncos
@@ -148,8 +156,8 @@ nsrodebug,ff8: $(OBJS_DEBUGRO)
gtk: nsgtk
nsgtk: $(OBJS_GTK)
- /usr/bin/gcc -o nsgtk `pkg-config --cflags --libs gtk+-2.0 gthread-2.0` \
- $(LDFLAGS_DEBUG) $^
+ /usr/bin/gcc -o nsgtk $^ `pkg-config --cflags --libs gtk+-2.0 gthread-2.0` \
+ $(LDFLAGS_DEBUG)
netsurf.zip: $(RUNIMAGE)
rm netsurf.zip; riscos-zip -9vr, netsurf.zip !NetSurf
diff --git a/posix.mk b/posix.mk
index a6ea7e815..33da3d035 100644
--- a/posix.mk
+++ b/posix.mk
@@ -19,5 +19,10 @@ LDFLAGS_SMALL = -L$(GCCSDK_INSTALL_ENV)/lib -lxml2 -lz -lucurl \
LDFLAGS_DEBUG = -L/usr/lib -lxml2 -lz -lm -lcurl -lssl -lcrypto -ldl -lmng \
-ljpeg -llcms
+# Hackery for Cygwin - it has no libdl, so remove it from LDFLAGS
+ifeq ($(shell echo $$OS),Windows_NT)
+LDFLAGS_DEBUG := $(subst -ldl,,$(LDFLAGS_DEBUG))
+endif
+
RUNIMAGE = !NetSurf/!RunImage,ff8
NCRUNIMAGE = !NCNetSurf/!RunImage,ff8