Added GCC4 autodetection for -Wno-unused-parameter and -Wno-pointer-sign in Makefile

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10017 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
toms 2007-03-15 15:28:22 +00:00
parent 67e27505ff
commit 4670b25f7b

View File

@ -10,6 +10,9 @@ CC = gcc -pipe
MAKE = make MAKE = make
# MAKE = gmake # MAKE = gmake
# Detecting gcc version
GCC_VERSION = $(shell $(CC) -v 2>&1 | grep version | cut -d' ' -f3 | cut -d'.' -f1)
OPT = -g OPT = -g
OPT += -O2 OPT += -O2
# OPT += -O3 # OPT += -O3
@ -23,8 +26,9 @@ OPT += -ffast-math
# OPT += -fstack-protector # OPT += -fstack-protector
# OPT += -fomit-frame-pointer # OPT += -fomit-frame-pointer
OPT += -Wall -Wno-sign-compare OPT += -Wall -Wno-sign-compare
# Uncomment this one if you are using GCC 4.X ifeq ($(GCC_VERSION), 4)
# OPT += -Wno-unused-parameter -Wno-pointer-sign OPT += -Wno-unused-parameter -Wno-pointer-sign
endif
# Server Packet Protocol version (also defined in src/common/mmo.h) # Server Packet Protocol version (also defined in src/common/mmo.h)
# OPT += -DPACKETVER=8 # OPT += -DPACKETVER=8
# Makes map-wide script variables be saved to SQL instead of TXT files. # Makes map-wide script variables be saved to SQL instead of TXT files.