
#  Makefile macros.  See `Makefile' for explanations.

# Additional defines:
SYS_DEFS	+= -imacros system/BigFileDefines.h -pthread
# From user-defined options in Makefile:

ifeq ($(QUIET),yes)
  SYS_WARN	+= -w
else
  ifeq ($(GPP_VERSION),3.4.3)
    SYS_WARN	+= -Wextra -Wall -Wno-unused -Wno-deprecated
  else
    SYS_WARN	+= -W -Wall -Wno-unused -Wno-deprecated
  endif
endif

ifeq ($(DEBUG),yes)
  SYS_DEBUG	+= -ggdb3
endif

ifeq ($(FAST),yes)
  # Force minor optimizations:
  OPTIM		= -O 
endif

ifeq ($(OPTIM),none)
  SYS_OPT	+=
else
  ifeq ($(OPTIM),)
    SYS_OPT	+= -O3
  else
    SYS_OPT	+= $(OPTIM)
  endif
endif

ifeq ($(PROFILE),yes)
  SYS_DEBUG	+= -pg
endif

ifeq ($(FORCE_DEBUG),yes)
  SYS_DEFS	+= -DFORCE_DEBUG
endif

ifeq ($(TRACK_MEMORY),yes)
  SYS_DEBUG     += -DTRACK_MEMORY
  SYS_MEMTRACK  += -include system/MemTracker.h
endif

ifeq ($(ASSERT),FAST)
  SYS_DEFS	+= -DFAST_ASSERT
endif

ifeq ($(OPEN_MP),yes)
  OMP_FLAGS	= -fopenmp
  OMP_LINK	= -fopenmp
endif

# No Posix threads for g++ < v3.0.3:
ifeq ($(PTHREADS),yes)
  PTHREAD_DEFS	=
  PTHREAD_FLAGS =
  PTHREAD_LIBS	=
endif

ifeq ($(GCOV),yes)
  SYS_DEBUG	+= -fprofile-arcs -ftest-coverage
endif

ifeq ($(GPP_VERSION),3.4.3)
  SYS_LANG	+= -ftemplate-depth-17 -fno-strict-aliasing
else
  SYS_LANG	+= -ftemplate-depth-30 -fno-strict-aliasing
endif

SYS_INCS	+=

SYS_LINK	+= 


ifeq ($(OS_MACHINE),alpha)
include Makefile_g++_alpha
else
     ifeq ($(OS_MACHINE),ia64)
     include Makefile_g++_ia64
     else
          ifeq ($(OS_MACHINE),i686)
          include Makefile_g++_i686
          else
               ifeq ($(OS_MACHINE),macosx)
               include Makefile_g++_macosx
               else
                    ifeq ($(OS_MACHINE),x86_64)
                    include Makefile_g++_x86_64
                    else
                    ifeq ($(OS_MACHINE),amd64)
                    include Makefile_g++_x86_64
                    else
			ifeq ($(OS_MACHINE),i386)
		        include Makefile_g++_i386
                    	else
                             ifeq ($(OS_MACHINE),i86pc)
                             include Makefile_g++_i86pc
                             else
                                  $(error No appropriate Makefile_g++ file for this platform.)
		             endif
                         endif
                    endif
                    endif
               endif
          endif
     endif
endif
