# Makefile configuration for the Tachyon ray tracing library.
# Copyright 1994-2011 John E. Stone
# All Rights Reserved
#
# $Id: Make-config,v 1.65 2013/04/21 08:30:06 johns Exp $
#


#
# Raytracer configuration variables
#   Edit any of these settings as needed to configure directories
#   and source areas for your system.  
#   Important items to edit are the X11 configuration and MPI
#


##########################################################################
# Bourne Shell Configuration:
#   set SHELL=/bin/sh or wherever your bourne shell is
##########################################################################
SHELL=/bin/sh



##########################################################################
# X-Windows Configuration:
# For use with sequential binaries only, tested on Suns only so far..
#  (pops up a display window while rendering is in progress)
##########################################################################

# The following line should be set to -Ixxx where xxx is your X11 include path
# Sun puts X11 in /usr/openwin/xxx
X11INC= -I/usr/openwin/include

# Others typically use /usr/X11 or /usr/X11R6
#X11INC= -I/usr/X11

# The following line should be set to -lX11 or whatever your X library is.
X11LIB= -lX11



##########################################################################
# Threads and Atomics Configuration:
#   To enable multithreading in general, THREADSFLAGS must be set 
#   with at least:
#     -DTHR
#
#   To force use of POSIX threads, set:
#     -DUSEPOSIXTHREADS
#
#   To force use of Unix International threads, set:
#     -DUSEUITHREADS
#
#   To enable use of fast atomic integer row/scanline synchronization
#   barriers for mixed-mode MPI/Threads builds, set:
#     -DUSEATOMICBARRIERS
#
#   To enable fast hardware-specific GCC atomic operations, set:
#     -DUSEGCCATOMICS
#
#   To force assignment of CPU affinity at runtime, set:
#     -DUSECPUAFFINITY
#
#   To use the hardware reported number of processors rather than the
#   number of "online" processors (needed on platforms that power off
#   entire CPU cores as part of power management, such as Android), set:
#     -DUSEPHYSCPUCOUNT
#
##########################################################################
#THREADSFLAGS=-DTHR
THREADSFLAGS=-DTHR -DUSEATOMICBARRIERS
#THREADSFLAGS=-DTHR -DUSEATOMICBARRIERS -DUSEGCCATOMICS
#THREADSFLAGS=-DTHR -DUSEATOMICBARRIERS -DUSEPHYSCPUCOUNT



##########################################################################
# MPI Configuration:
#   Set MPIDIR to the directory where your MPI distribution is installed.
#
# MPI libraries are available from:
#   http://www.mcs.anl.gov/mpi/
#   http://www.mcs.anl.gov/mpi/mpich/
#   http://www.lam-mpi.org/
#
#   To enable MPI in general, MPIFLAGS must be set with at least:
#     -DMPI
#
#   To support MPI 2.x, the MPI_IN_PLACE flags must be used on several
#   of the parallel reduction ops in Tachyon.  This is set with:
#     -DUSE_MPI_IN_PLACE
#
#   To enable alternative MPI message passing strategies, Tachyon 
#   can be compiled with one of several tuning flags.
#   For the standard MPI_Testsome() strategy, set:
#     -DMPI_TUNE=0
#   For the MPI_Testany() strategy, set:
#     -DMPI_TUNE=1
#   For the MPI_Testall() strategy, set:
#     -DMPI_TUNE=2
#   For the loop-based MPI_Testany() strategy, set:
#     -DMPI_TUNE=3
#
##########################################################################
# Customize MPI directories and includes as-needed.
# A typical MPICH installation location:
MPIDIR=/usr/local/mpi
MPIINC=$(MPIDIR)/include
MPILIB=$(MPIDIR)/lib

# MPI defines and any flags needed by the local installation.
# Always list -DMPI at a minimum.  
#
# All MPI 2.x implementations require -DUSE_MPI_IN_PLACE.
# The -DMPI_IN_PLACE flag must be used for MPI 2.x builds, otherwise 
# a runtime error will occur during Tachyon collective operations 
# (e.g. MPI_Allgather) that use the same send/recv buffer.
# MPI 2.x flags:
MPIFLAGS=-DMPI -DUSE_MPI_IN_PLACE

# Although MPI 1.x didn't technically allow in-place gather operations,
# it worked in practice on most open source implementations. 
# Old MPI 1.x implementations therefore don't need -DUSE_MPI_IN_PLACE
# MPI 1.x flags:
#MPIFLAGS=-DMPI 



##########################################################################
# Floating point configuration:
#   Leaving this blank will cause the library to use double precision floats
#   Setting -DUSESINGLEFLT causes the library to use single precision floats 
##########################################################################
# Uncomment the following line for double precision floating point math
# uses about twice as much memory per object as single precision math.
FLT=
# Uncomment the following line for single precision floating point math,
# uses about half as much memory per object as double precision math.
#FLT= -DUSESINGLEFLT


##########################################################################
# Object mailbox storage configuration:
#   Leaving this blank will cause the library to use auxiliary mailbox data
#   structures for improving the effectiveness of grid-based ray tracing.
#   Setting -DDISABLEMBOX will cause the library to disable this feature. 
##########################################################################
# Uncomment the following line for full mailbox data structure use, this
# uses a per-thread mailbox array, or either 4 or 8 bytes per scene object,
# depending on whether -LP64 is defined.
MBOX=
# Uncomment the following line to disable the use of mailbox data structures,
# this eliminates per-thread storage normally allocated for the mailbox
# data structure, but may incur a rendering speed penalty. 
#MBOX=-DDISABLEMBOX


##########################################################################
# JPEG support configuration:
#   JPEGINC is the directory where your Independent JPEG Group include files
#   are made available.  JPEGLIB is the directory where your Independent 
#   JPEG Group libraries are made available. 
#
# IJG JPEG library version 6b can be downloaded from:
#   http://www.ijg.org/files/
##########################################################################
# Uncomment the following lines to disable JPEG support
USEJPEG=
JPEGINC=
JPEGLIB=

# Uncomment the following lines to enable JPEG support
#USEJPEG= -DUSEJPEG
#JPEGINC= -I/usr/local/include
#JPEGLIB= -L/usr/local/lib -ljpeg


##########################################################################
# PNG support configuration:
#   PNGINC is the directory where your libpng and libz include files
#   are made available.  PNGLIB is the directory where your libpng
#   and libz libraries are made available. 
#
# LibPNG can be downlaoded from:
#   http://www.libpng.org/
##########################################################################
# Uncomment the following lines to disable PNG support
USEPNG=
PNGINC=
PNGLIB=

# Uncomment the following lines to enable PNG support
#USEPNG= -DUSEPNG
#PNGINC= -I/usr/local/include
#PNGLIB= -L/usr/local/lib -lpng -lz


##########################################################################
# OMF (Open Media Framework) configuration 
#   Requires OMF Toolkit version 2.x
##########################################################################
#OMFDIR = /disk5/users/johns/graphics/OMFKT202/Toolkit
#OMFINC = -I$(OMFDIR)/include -I$(OMFDIR)/kitomfi -I$(OMFDIR)/bento -I$(OMFDIR)/jpeg -I$(OMFDIR)/portinc -I$(OMFDIR)/avidjpg
#OMFLIB = -L$(OMFDIR)/DO_sun5_opt/usr/lib -lAJPG -lOMFI -lbento -ljpeg 
#OMFDEF = -DUSEOMF


##########################################################################
# Spaceball I/O library configuration:
#   A spaceball can used for fly-throughs of scenes when running on  
#   a fast multiprocessor, parallel machine, or PC cluster.
#
# Libsball can be downloaded from:
#   http://jedi.ks.uiuc.edu/~johns/projects/libsball
##########################################################################
#SPACEBALL_HOME = ../../libsball
#SPACEBALLINC = -DUSESPACEBALL -I$(SPACEBALL_HOME)
#SPACEBALLLIB = -L$(SPACEBALL_HOME) -lsball


##########################################################################
# MGF Materials and Geometry Format scene parser library
#   If enabled, this allows Tachyon to read MGF scene files using 
#   compiled-in MGF scene parser code.
##########################################################################
#MGFDIR=../../libmgf
#MGFLIB=${MGFDIR}/libmgf.a
#MGFLIBDIR=${MGFDIR}
#MGFINC=-I${MGFDIR} -DUSELIBMGF


##########################################################################
#
# Android SDK paths
#
##########################################################################
ANDROIDBINS = /Projects/collaboratory/kvandivo/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin
ANDROIDINCS = -I/home/kvandivo/Proj/ndk/platforms/android-14/arch-arm/usr/include
ANDROIDLIBS = -L/home/kvandivo/Proj/ndk/platforms/android-14/arch-arm/usr/lib
ANDROIDSYSROOT = --sysroot=/home/kvandivo/Proj/ndk/platforms/android-14/arch-arm


##########################################################################
# Optionally override built-in Android / JNI paths so that Tachyon can
# easily be incorporated into an arbitrary Android application, with
# whatever class name and wrapper function name that is required by the
# calling app.
##########################################################################
JNIDEFS = -DTACHYON_JNI_CLASSNAME='\"com/photonlimited/Tachyon/Tachyon\"' \
	-DTACHYON_JNI_WRAPFUNC=Java_com_photonlimited_Tachyon_Tachyon_nativeMain


##########################################################################
# Location of source files
##########################################################################
SRCDIR=../src


##########################################################################
# Location of demo program source files
##########################################################################
DEMOSRC=../demosrc


