# This Makefile is for Mac OSX 10.0 (Darwin)

# USE_ZLIB = -DHAVE_ZLIB
# LZLIB    = -lz

CCDEBS = -DAFNI_DEBUG -DIMSEQ_DEBUG -DDISPLAY_DEBUG -DTHD_DEBUG
CEXTRA = -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE -no-cpp-precomp -DDONT_USE_MCW_MALLOC
CC     = cc -O2 -ffast-math -DDARWIN $(CEXTRA) -DNEED_UNDERSCORE
CCVOL  = cc -O2 -ffast-math -DDARWIN $(CEXTRA) -DNEED_UNDERSCORE
CCFAST = cc -O3 -ffast-math -DDARWIN $(CEXTRA) -DNEED_UNDERSCORE
CCMIN  = cc
CCD    = $(CC) $(CCDEBS)
# IFLAGS = -I. -I/usr/include -I/usr/include/sys -I/usr/X11R6/include
IFLAGS = -I. -I/usr/X11R6/include
LFLAGS = -L. -L/usr/X11R6/lib -Wl,-force_flat_namespace -Wl,-x

CCSVD  = cc -O0 -no-cpp-precomp


PLUGIN_SUFFIX = so
PLUGIN_LFLAGS = -flat_namespace -bundle -undefined suppress -Wl,-x
PLUGIN_CC     = $(CC) -dynamic -fno-common
PLFLAGS       = -dynamic -L. -L/usr/X11R6/lib -Wl,-force_flat_namespace -Wl,-x

AR     = /usr/bin/ar
RANLIB = /usr/bin/ranlib
TAR    = /usr/bin/tar
MKDIR  = /bin/mkdir
GZIP   = /usr/bin/gzip
LD     = cc

RM = /bin/rm -f
MV = /bin/mv -f
CP = /bin/cp -f

LINT = /usr/bin/lint -a -b -u -v -x $(IFLAGS) $(CCDEFS)

INSTALLDIR = ./macosx_10.2
LIBDIR = $(INSTALLDIR)
SHOWOFF = -DSHOWOFF=macosx_10.2

INSTALL_PREREQ = suma

LIBDL = libdl.a

# for dynamic linking

LLIBS  = -lmri -lXm -lXp -lXpm -lXext -lXmu -lXt -lX11 $(LZLIB) -lm -lmri -ldl -lc

# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# For suma 
SUMA_INCLUDE_PATH = -I/usr/X11R6/include -I./ -I../ -I../niml/ -Igts/src -I/sw/include/glib-1.2 -I/sw/lib/glib/include
SUMA_LINK_PATH = -L/usr/lib -L/usr/X11R6/lib -L../ -L/usr/local/lib -L/sw/lib
SUMA_LINK_LIB = -lXm -lGLw -lGLU -lGL -lXmu -lXp -lXt -lXext -lX11 -lmri $(LZLIB) -lm -lmx -lglib -bind_at_load
SUMA_MAKEFILE_NAME = SUMA_Makefile
SUMA_BIN_ARCHIVE = SUMA_MacOSX.tar

# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


###############################################################

MAKE = make
include Makefile.INCLUDE