# -*- mode: makefile -*-
#
# Makefile of ROOT for AIX 5.x with xlC

PLATFORM      = aix5

DEBUGFLAGS    = -g
OPTFLAGS      = -O -qmaxmem=-1
ifeq (debug,$(findstring debug,$(ROOTBUILD)))
OPT           = $(DEBUGFLAGS)
NOOPT         =
else
OPT           = $(OPTFLAGS)
NOOPT         =
endif

# Compiler:
CXX           = xlC
CC            = xlC
CXXFLAGS      = -qchars=signed -qnoro -qnoroconst -qrtti $(EXTRA_CXXFLAGS)
CFLAGS        = -qchars=signed -qnoro -qnoroconst $(EXTRA_CFLAGS)
CINTCXXFLAGS  = -qchars=signed -qnoro -qnoroconst -qrtti -DG__REGEXP \
                -D_POSIX2_SOURCE -DG__P2FCAST -DG__SHAREDLIB -DG__OSFDLL \
                -DG__ROOT -DG__REDIRECTIO $(EXTRA_CXXFLAGS)
CINTCFLAGS    = -qchars=signed -qnoro -qnoroconst -DG__REGEXP -D_POSIX2_SOURCE \
                -DG__P2FCAST -DG__SHAREDLIB -DG__OSFDLL -DG__ROOT \
                -DG__REDIRECTIO $(EXTRA_CFLAGS)
MAKESHAREDLIB = cd \$$BuildDir ; $(CXX) -c $(OPT) $(CXXFLAGS) \$$IncludePath \
                \$$SourceFiles ; /usr/vacpp/bin/makeC++SharedLib \
                -o \$$SharedLib \$$LinkedLibs -p 0 \$$ObjectFiles

# Linker:
LD            = xlC
LDFLAGS       = $(OPT) $(EXTRA_LDFLAGS)
SOFLAGS       =
SOEXT         = a

# System libraries:
SYSLIBS       = -lm -lld
XLIBS         = $(XPMLIBDIR) $(XPMLIB) $(X11LIBDIR) -lX11
CILIBS        = -lm -lld

# Fortran:
F77           = xlf
F77FLAGS      = -qextname -qcharlen=32767
F77LIBS       = -lxlf -lxlf90

# Extras
