added -Werror to compiler option checking so I don't have to edit

the Makefile whenever I want to use clang.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@776 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2012-10-25 11:15:15 +00:00
parent 6af46c6962
commit e31b3b4648
4 changed files with 28 additions and 28 deletions

View File

@ -1,4 +1,4 @@
# GNU Makefile for QuakeSpasm unix targets, May 30, 2012
# GNU Makefile for QuakeSpasm unix targets, Oct. 25, 2012
# You need the SDL library fully installed.
# "make DEBUG=1" to build a debug client.
# "make SDL_CONFIG=/path/to/sdl-config" for unusual SDL installations.
@ -18,22 +18,22 @@ MP3LIB=mad
# which library to use for ogg decoding: vorbis or tremor
VORBISLIB=vorbis
# ============================================================================
# ---------------------------
# Helper functions
# ============================================================================
# ---------------------------
check_gcc = $(shell if echo | $(CC) $(1) -S -o /dev/null -xc - > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi;)
check_gcc = $(shell if echo | $(CC) $(1) -Werror -S -o /dev/null -xc - > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi;)
# ============================================================================
# ---------------------------
HOST_OS := $(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]')
DEBUG ?= 0
SDLNET ?= 0
# ---------------------------------------
# ---------------------------
# build variables
# ---------------------------------------
# ---------------------------
CC ?= gcc
LINKER = $(CC)

View File

@ -1,4 +1,4 @@
# GNU Makefile for QuakeSpasm for Mac OS X, Sep. 05, 2012.
# GNU Makefile for QuakeSpasm for Mac OS X, Oct. 25, 2012.
# Usage: "make -f Makefile.darwin"
# You need the SDL library fully installed.
# "make DEBUG=1" to build a debug client.
@ -19,13 +19,13 @@ MP3LIB=mad
# which library to use for ogg decoding: vorbis or tremor
VORBISLIB=vorbis
# ============================================================================
# ---------------------------
# Helper functions
# ============================================================================
# ---------------------------
check_gcc = $(shell if echo | $(CC) $(1) -S -o /dev/null -xc - > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi;)
check_gcc = $(shell if echo | $(CC) $(1) -Werror -S -o /dev/null -xc - > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi;)
# ============================================================================
# ---------------------------
HOST_OS := $(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]')
MACH_TYPE= $(shell sh detect.sh arch)
@ -33,9 +33,9 @@ MACH_TYPE= $(shell sh detect.sh arch)
DEBUG ?= 0
SDLNET ?= 0
# ---------------------------------------
# ---------------------------
# build variables
# ---------------------------------------
# ---------------------------
CC ?= gcc
LINKER = $(CC)

View File

@ -1,5 +1,5 @@
# GNU Makefile for cross-compiling quakespasm.exe (Win32: MinGW)
# using cross-toolchains on a linux host, May 30, 2012
# using cross-toolchains on a linux host, Oct. 25, 2012
# "make DEBUG=1" to build a debug client.
# "make SDL_CONFIG=/path/to/sdl-config" for unusual SDL installations.
# "make WINSOCK2=1" to use WinSock2 api instead of old WinSock 1.1.
@ -19,21 +19,21 @@ MP3LIB=mad
# which library to use for ogg decoding: vorbis or tremor
VORBISLIB=vorbis
# ============================================================================
# ---------------------------
# Helper functions
# ============================================================================
# ---------------------------
check_gcc = $(shell if echo | $(CC) $(1) -S -o /dev/null -xc - > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi;)
check_gcc = $(shell if echo | $(CC) $(1) -Werror -S -o /dev/null -xc - > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi;)
# ============================================================================
# ---------------------------
DEBUG ?= 0
WINSOCK2?= 0
SDLNET ?= 0
# ---------------------------------------
# ---------------------------
# build variables
# ---------------------------------------
# ---------------------------
TARGET=i686-pc-mingw32

View File

@ -1,5 +1,5 @@
# GNU Makefile for cross-compiling quakespasm.exe (Win64: MinGW-w64)
# using cross-toolchains on a linux host, May 30, 2012
# using cross-toolchains on a linux host, Oct. 25, 2012
# "make DEBUG=1" to build a debug client.
# "make SDL_CONFIG=/path/to/sdl-config" for unusual SDL installations.
# "make WINSOCK2=0" to use the old WinSock 1.1 api (NOT recommended).
@ -19,21 +19,21 @@ MP3LIB=mad
# which library to use for ogg decoding: vorbis or tremor
VORBISLIB=vorbis
# ============================================================================
# ---------------------------
# Helper functions
# ============================================================================
# ---------------------------
check_gcc = $(shell if echo | $(CC) $(1) -S -o /dev/null -xc - > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi;)
check_gcc = $(shell if echo | $(CC) $(1) -Werror -S -o /dev/null -xc - > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi;)
# ============================================================================
# ---------------------------
DEBUG ?= 0
WINSOCK2?= 1
SDLNET ?= 0
# ---------------------------------------
# ---------------------------
# build variables
# ---------------------------------------
# ---------------------------
TARGET=x86_64-w64-mingw32