Added GCC-4.1 support

Disabled potentially bad optimization
This commit is contained in:
David Anderson 2006-08-17 01:39:47 +00:00
parent 6295813723
commit 8b055fd1d0
2 changed files with 9 additions and 3 deletions

View File

@ -6,9 +6,9 @@ MM_ROOT = ../metamod/metamod
### EDIT BELOW FOR OTHER PROJECTS ### ### EDIT BELOW FOR OTHER PROJECTS ###
OPT_FLAGS = -O2 -funroll-loops -s -fomit-frame-pointer -pipe OPT_FLAGS = -O2 -fno-strict-aliasing -funroll-loops -s -fomit-frame-pointer -pipe
DEBUG_FLAGS = -g -ggdb3 DEBUG_FLAGS = -g -ggdb3
CPP = gcc CPP = gcc-4.1
NAME = amxmodx NAME = amxmodx
BIN_SUFFIX_32 = mm_i386.so BIN_SUFFIX_32 = mm_i386.so
@ -26,6 +26,12 @@ LINK = /lib/libstdc++.a
INCLUDE = -I. -I$(HLSDK) -I$(HLSDK)/dlls -I$(HLSDK)/engine -I$(HLSDK)/game_shared -I$(HLSDK)/game_shared \ INCLUDE = -I. -I$(HLSDK) -I$(HLSDK)/dlls -I$(HLSDK)/engine -I$(HLSDK)/game_shared -I$(HLSDK)/game_shared \
-I$(MM_ROOT) -Lzlib -I$(HLSDK)/common -I$(MM_ROOT) -Lzlib -I$(HLSDK)/common
GCC_VERSION := $(shell $(CPP) -dumpversion >&1 | cut -b1)
ifeq "$(GCC_VERSION)" "4"
OPT_FLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
endif
ifeq "$(DEBUG)" "true" ifeq "$(DEBUG)" "true"
BIN_DIR = Debug BIN_DIR = Debug
CFLAGS = $(DEBUG_FLAGS) CFLAGS = $(DEBUG_FLAGS)

View File

@ -38,7 +38,7 @@
#ifndef __linux__ #ifndef __linux__
#define DLLEXPORT __declspec(dllexport) #define DLLEXPORT __declspec(dllexport)
#else #else
#define DLLEXPORT #define DLLEXPORT __attribute__((visibility("default")))
#define WINAPI #define WINAPI
#endif #endif