summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2009-10-13 17:17:27 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:49 +0000
commit6efd4cef3cfcc44d6727cb0e54da26fbb74a7533 (patch)
treefdb5ee764999ac868d00c54cefb8c290f1735fd6 /Makefile
parentfafe107646105e680e2bd4a82d9330dffaf69c9a (diff)
* Merge ioq3-r1666
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile62
1 files changed, 34 insertions, 28 deletions
diff --git a/Makefile b/Makefile
index 9edae1fd..fbb833f2 100644
--- a/Makefile
+++ b/Makefile
@@ -106,11 +106,7 @@ USE_OPENAL=1
endif
ifndef USE_OPENAL_DLOPEN
- ifeq ($(PLATFORM),mingw32)
- USE_OPENAL_DLOPEN=1
- else
- USE_OPENAL_DLOPEN=0
- endif
+USE_OPENAL_DLOPEN=1
endif
ifndef USE_CURL
@@ -176,22 +172,25 @@ LIBSDIR=$(MOUNT_DIR)/libs
MASTERDIR=$(MOUNT_DIR)/master
TEMPDIR=/tmp
-# set PKG_CONFIG_PATH to influence this, e.g.
-# PKG_CONFIG_PATH=/opt/cross/i386-mingw32msvc/lib/pkgconfig
-ifeq ($(shell which pkg-config > /dev/null; echo $$?),0)
- CURL_CFLAGS=$(shell pkg-config --cflags libcurl)
- CURL_LIBS=$(shell pkg-config --libs libcurl)
- OPENAL_CFLAGS=$(shell pkg-config --cflags openal)
- OPENAL_LIBS=$(shell pkg-config --libs openal)
- # FIXME: introduce CLIENT_CFLAGS
- SDL_CFLAGS=$(shell pkg-config --cflags sdl|sed 's/-Dmain=SDL_main//')
- SDL_LIBS=$(shell pkg-config --libs sdl)
-endif
-# Use sdl-config if all else fails
-ifeq ($(SDL_CFLAGS),)
- ifeq ($(shell which sdl-config > /dev/null; echo $$?),0)
- SDL_CFLAGS=$(shell sdl-config --cflags)
- SDL_LIBS=$(shell sdl-config --libs)
+# We won't need this if we only build the server
+ifneq ($(BUILD_CLIENT),0)
+ # set PKG_CONFIG_PATH to influence this, e.g.
+ # PKG_CONFIG_PATH=/opt/cross/i386-mingw32msvc/lib/pkgconfig
+ ifeq ($(shell which pkg-config > /dev/null; echo $$?),0)
+ CURL_CFLAGS=$(shell pkg-config --silence-errors --cflags libcurl)
+ CURL_LIBS=$(shell pkg-config --silence-errors --libs libcurl)
+ OPENAL_CFLAGS=$(shell pkg-config --silence-errors --cflags openal)
+ OPENAL_LIBS=$(shell pkg-config --silence-errors --libs openal)
+ # FIXME: introduce CLIENT_CFLAGS
+ SDL_CFLAGS=$(shell pkg-config --silence-errors --cflags sdl|sed 's/-Dmain=SDL_main//')
+ SDL_LIBS=$(shell pkg-config --silence-errors --libs sdl)
+ endif
+ # Use sdl-config if all else fails
+ ifeq ($(SDL_CFLAGS),)
+ ifeq ($(shell which sdl-config > /dev/null; echo $$?),0)
+ SDL_CFLAGS=$(shell sdl-config --cflags)
+ SDL_LIBS=$(shell sdl-config --libs)
+ endif
endif
endif
@@ -428,6 +427,10 @@ else # ifeq darwin
ifeq ($(PLATFORM),mingw32)
+ # Some MinGW installations define CC to cc, but don't actually provide cc,
+ # so explicitly use gcc instead (which is the only option anyway)
+ CC=gcc
+
ifndef WINDRES
WINDRES=windres
endif
@@ -1141,17 +1144,17 @@ endef
define DO_CGAME_Q3LCC
$(echo_cmd) "CGAME_Q3LCC $<"
-$(Q)$(Q3LCC) -DPRODUCT_VERSION=\\\"$(VERSION)\\\" -DCGAME -o $@ $<
+$(Q)$(Q3LCC) -DPRODUCT_VERSION=\"$(VERSION)\" -DCGAME -o $@ $<
endef
define DO_GAME_Q3LCC
$(echo_cmd) "GAME_Q3LCC $<"
-$(Q)$(Q3LCC) -DPRODUCT_VERSION=\\\"$(VERSION)\\\" -DGAME -o $@ $<
+$(Q)$(Q3LCC) -DPRODUCT_VERSION=\"$(VERSION)\" -DGAME -o $@ $<
endef
define DO_UI_Q3LCC
$(echo_cmd) "UI_Q3LCC $<"
-$(Q)$(Q3LCC) -DPRODUCT_VERSION=\\\"$(VERSION)\\\" -DUI -o $@ $<
+$(Q)$(Q3LCC) -DPRODUCT_VERSION=\"$(VERSION)\" -DUI -o $@ $<
endef
@@ -1809,11 +1812,14 @@ dist:
# DEPENDENCIES
#############################################################################
-OBJ_D_FILES=$(filter %.d,$(OBJ:%.o=%.d))
-TOOLSOBJ_D_FILES=$(filter %.d,$(TOOLSOBJ:%.o=%.d))
--include $(OBJ_D_FILES) $(TOOLSOBJ_D_FILES)
+ifneq ($(B),)
+ OBJ_D_FILES=$(filter %.d,$(OBJ:%.o=%.d))
+ TOOLSOBJ_D_FILES=$(filter %.d,$(TOOLSOBJ:%.o=%.d))
+ -include $(OBJ_D_FILES) $(TOOLSOBJ_D_FILES)
+endif
.PHONY: all clean clean2 clean-debug clean-release copyfiles \
debug default dist distclean makedirs \
release targets \
- toolsclean toolsclean2 toolsclean-debug toolsclean-release
+ toolsclean toolsclean2 toolsclean-debug toolsclean-release \
+ $(OBJ_D_FILES) $(TOOLSOBJ_D_FILES)