defs.mk: Support GCC 4.x

- Add -DGCC_HASCLASSVISIBILITY for gcc >= 4.x
  - Add USE_EXCEPTIONS_IN_C
This commit is contained in:
Jan Lindemann 2007-08-02 16:55:11 +00:00 committed by Jan Lindemann
commit b77035c416

View file

@ -28,6 +28,7 @@ HEX_VERSION = $(shell echo $(DIST_VERSION) | \
DEVELOPMENT ?= $(shell echo $(VERSION) | grep -q 'dev' && echo true)
USE_PROJECT_LIB ?= true
USE_YTOOLS ?= true
USE_EXCEPTIONS_IN_C ?= true
REENTRANT ?= true
USE_GFILTER ?= true
OS ?= $(shell sh $(MODDIR)/devutil/scripts/get_os.sh)
@ -244,6 +245,11 @@ CFLAGS += $(LOCAL_CFLAGS) $(PROJECT_CFLAGS) $(YLIB_CFLAGS) $(INCL
CPPFLAGS += $(LOCAL_CPPFLAGS) $(PROJECT_CPPFLAGS) $(YLIB_CPPFLAGS) $(INCLUDE)
CORE += $(wildcard core core.* vgcore vgcore.*)
ifeq ($(GCC_MAJOR),4)
CFLAGS += -DGCC_HASCLASSVISIBILITY
CPPFLAGS += -DGCC_HASCLASSVISIBILITY
endif
ifeq ($(USE_QT),true)
include $(MODDIR)/make/qt-defs.mk
endif
@ -460,6 +466,10 @@ ifeq ($(USE_COMPILER_OPTIMIZATION_OPTS),true)
CPPFLAGS += -funroll-loops -O2
endif
ifeq ($(USE_EXCEPTIONS_IN_C),true)
CFLAGS += -fexceptions
endif
ifeq ($(STRIP_SYMBOLS),true)
STRIP_DONE ?= strip.done
endif