aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authortjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-09-11 16:41:55 +0000
committertjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-09-11 16:41:55 +0000
commit55cb337dd8025f0a21c2b65c024bf33dd89f2071 (patch)
tree0ac9f2e0954c94cb211e4f49f33598658296333e /Makefile
parentb2f2a4ad4238415682e406dda5bedab1d3c84c79 (diff)
downloadioquake3-aero-55cb337dd8025f0a21c2b65c024bf33dd89f2071.tar.gz
ioquake3-aero-55cb337dd8025f0a21c2b65c024bf33dd89f2071.zip
* add cURL support for HTTP/FTP downloading (bug 2661)
git-svn-id: svn://svn.icculus.org/quake3/trunk@898 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile51
1 files changed, 51 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 8ade2cd..c4f743b 100644
--- a/Makefile
+++ b/Makefile
@@ -100,6 +100,18 @@ ifndef USE_OPENAL_DLOPEN
USE_OPENAL_DLOPEN=0
endif
+ifndef USE_CURL
+USE_CURL=1
+endif
+
+ifndef USE_CURL_DLOPEN
+ ifeq ($(PLATFORM),mingw32)
+ USE_CURL_DLOPEN=0
+ else
+ USE_CURL_DLOPEN=1
+ endif
+endif
+
ifndef USE_CODEC_VORBIS
USE_CODEC_VORBIS=0
endif
@@ -187,6 +199,13 @@ ifeq ($(PLATFORM),linux)
BASE_CFLAGS += -DUSE_OPENAL_DLOPEN=1
endif
endif
+
+ ifeq ($(USE_CURL),1)
+ BASE_CFLAGS += -DUSE_CURL=1
+ ifeq ($(USE_CURL_DLOPEN),1)
+ BASE_CFLAGS += -DUSE_CURL_DLOPEN=1
+ endif
+ endif
ifeq ($(USE_CODEC_VORBIS),1)
BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
@@ -249,6 +268,12 @@ ifeq ($(PLATFORM),linux)
CLIENT_LDFLAGS += -lopenal
endif
endif
+
+ ifeq ($(USE_CURL),1)
+ ifneq ($(USE_CURL_DLOPEN),1)
+ CLIENT_LDFLAGS += -lcurl
+ endif
+ endif
ifeq ($(USE_CODEC_VORBIS),1)
CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg
@@ -348,6 +373,15 @@ ifeq ($(PLATFORM),darwin)
BASE_CFLAGS += -DUSE_OPENAL_DLOPEN=1
endif
endif
+
+ ifeq ($(USE_CURL),1)
+ BASE_CFLAGS += -DUSE_CURL=1
+ ifneq ($(USE_CURL_DLOPEN),1)
+ CLIENT_LDFLAGS += -lcurl
+ else
+ BASE_CFLAGS += -DUSE_CURL_DLOPEN=1
+ endif
+ endif
ifeq ($(USE_CODEC_VORBIS),1)
BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
@@ -404,6 +438,13 @@ ifeq ($(PLATFORM),mingw32)
ifeq ($(USE_OPENAL),1)
BASE_CFLAGS += -DUSE_OPENAL=1 -DUSE_OPENAL_DLOPEN=1
endif
+
+ ifeq ($(USE_CURL),1)
+ BASE_CFLAGS += -DUSE_CURL=1
+ ifneq ($(USE_CURL_DLOPEN),1)
+ BASE_CFLAGS += -DCURL_STATICLIB
+ endif
+ endif
ifeq ($(USE_CODEC_VORBIS),1)
BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
@@ -430,6 +471,12 @@ ifeq ($(PLATFORM),mingw32)
LDFLAGS= -mwindows -lshfolder -lwsock32 -lgdi32 -lwinmm -lole32
CLIENT_LDFLAGS=
+ ifeq ($(USE_CURL),1)
+ ifneq ($(USE_CURL_DLOPEN),1)
+ CLIENT_LDFLAGS += $(LIBSDIR)/win32/libcurl.a
+ endif
+ endif
+
ifeq ($(USE_CODEC_VORBIS),1)
CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg
endif
@@ -847,6 +894,8 @@ Q3OBJ = \
$(B)/client/qal.o \
$(B)/client/snd_openal.o \
\
+ $(B)/client/cl_curl.o \
+ \
$(B)/client/sv_bot.o \
$(B)/client/sv_ccmds.o \
$(B)/client/sv_client.o \
@@ -1067,6 +1116,8 @@ $(B)/client/snd_codec_ogg.o : $(CDIR)/snd_codec_ogg.c; $(DO_CC)
$(B)/client/qal.o : $(CDIR)/qal.c; $(DO_CC)
$(B)/client/snd_openal.o : $(CDIR)/snd_openal.c; $(DO_CC)
+$(B)/client/cl_curl.o : $(CDIR)/cl_curl.c; $(DO_CC)
+
$(B)/client/sv_bot.o : $(SDIR)/sv_bot.c; $(DO_CC)
$(B)/client/sv_client.o : $(SDIR)/sv_client.c; $(DO_CC)
$(B)/client/sv_ccmds.o : $(SDIR)/sv_ccmds.c; $(DO_CC)