From f8f0cecb4a88961829f4c7cd013823fa075daf38 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Thu, 25 Oct 2012 11:15:15 +0000 Subject: [PATCH] added -Werror to compiler option checking so I don't have to edit the Makefile whenever I want to use clang. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@776 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/Makefile | 14 +++++++------- Quake/Makefile.darwin | 14 +++++++------- Quake/Makefile.w32 | 14 +++++++------- Quake/Makefile.w64 | 14 +++++++------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Quake/Makefile b/Quake/Makefile index 65abbb6f..6ad9a724 100644 --- a/Quake/Makefile +++ b/Quake/Makefile @@ -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) diff --git a/Quake/Makefile.darwin b/Quake/Makefile.darwin index c71d10c0..fbd77814 100644 --- a/Quake/Makefile.darwin +++ b/Quake/Makefile.darwin @@ -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) diff --git a/Quake/Makefile.w32 b/Quake/Makefile.w32 index b24c1ca1..0d836e93 100644 --- a/Quake/Makefile.w32 +++ b/Quake/Makefile.w32 @@ -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 diff --git a/Quake/Makefile.w64 b/Quake/Makefile.w64 index bdcf0c70..b67e06fa 100644 --- a/Quake/Makefile.w64 +++ b/Quake/Makefile.w64 @@ -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