1# Time-stamp: <08/01/12 00:51:07 ptr> 2# 3# Copyright (c) 1997-1999, 2002, 2003, 2005-2008 4# Petr Ovtchenkov 5# 6# Portion Copyright (c) 1999-2001 7# Parallel Graphics Ltd. 8# 9# Licensed under the Academic Free License version 3.0 10# 11 12ifndef _FORCE_CXX 13CXX := aCC 14else 15CXX := ${_FORCE_CXX} 16endif 17 18ifndef _FORCE_CC 19CC := aCC 20else 21CC := ${_FORCE_CC} 22endif 23 24CXX_VERSION := $(shell ${CXX} --version 2>&1 | grep ${CXX} | awk '{ print $$6; }') 25ifeq ($(CXX_VERSION),) 26CXX_VERSION := $(shell ${CXX} --version) 27endif 28CXX_VERSION_MAJOR := $(shell echo ${CXX_VERSION} | awk 'BEGIN { FS = "."; } { print $$2; }') 29CXX_VERSION_MINOR := $(shell echo ${CXX_VERSION} | awk 'BEGIN { FS = "."; } { print $$3; }') 30 31DEFS ?= 32OPT ?= 33 34ifndef WITHOUT_THREAD 35DEFS += -D_REENTRANT 36endif 37OUTPUT_OPTION = -o $@ 38LINK_OUTPUT_OPTION = ${OUTPUT_OPTION} 39CPPFLAGS = $(DEFS) $(INCLUDES) 40 41CFLAGS = -Aa +z $(OPT) 42CXXFLAGS = -Aa +z -mt $(OPT) 43 44CDEPFLAGS = -E +Md 45CCDEPFLAGS = -E +Md 46 47# STLport DEBUG mode specific defines 48stldbg-static : DEFS += -D_STLP_DEBUG 49stldbg-shared : DEFS += -D_STLP_DEBUG 50stldbg-static-dep : DEFS += -D_STLP_DEBUG 51stldbg-shared-dep : DEFS += -D_STLP_DEBUG 52 53# optimization and debug compiler flags 54release-static : OPT += +O2 55release-shared : OPT += +O2 56 57dbg-static : OPT += -g 58dbg-shared : OPT += -g 59#dbg-static-dep : OPT += -g 60#dbg-shared-dep : OPT += -g 61 62stldbg-static : OPT += -g 63stldbg-shared : OPT += -g 64#stldbg-static-dep : OPT += -g 65#stldbg-shared-dep : OPT += -g 66 67OPT += +W495,749,2186,2191,2340,2430,2550 68 69# dependency output parser (dependencies collector) 70 71DP_OUTPUT_DIR = | sed 's|\($*\)\.o[ :]*|$(OUTPUT_DIR)/\1.o $@ : |g' > $@; \ 72 [ -s $@ ] || rm -f $@ 73 74DP_OUTPUT_DIR_DBG = | sed 's|\($*\)\.o[ :]*|$(OUTPUT_DIR_DBG)/\1.o $@ : |g' > $@; \ 75 [ -s $@ ] || rm -f $@ 76 77DP_OUTPUT_DIR_STLDBG = | sed 's|\($*\)\.o[ :]*|$(OUTPUT_DIR_STLDBG)/\1.o $@ : |g' > $@; \ 78 [ -s $@ ] || rm -f $@ 79 80