# 
# $Id: Makefile.in,v 1.3.2.2 2000/06/30 15:42:18 yamauchi Exp $
#	for (M\pi)^2 : mpi2dataReader
#	(C) Copyright 1999 By YAMAUCHI Hitoshi 山内斉
# 	
# X を仮定しにくくなってきたので，環境に依存する部分を imake から configure 
# へと移行する．山内 1999年10月16日(土)
# 
# 
# CXX    = @CXX@
CXX    	= @CXX@
CC     	= ${CXX}
RM	= @RM@ -f

# LOCAL_LIBRARIES +=
# SYS_LIBRARIES   += -lm
LOCAL_LIBRARIES =
SYS_LIBRARIES   = -lm

CDEBUGFLAGS      = @WALLFLAG@ -g
CXXDEBUGFLAGS    = $(CDEBUGFLAGS)

#
#  for statistics 
#  if no use of statistics, set NSTAT
# 
# MPI2STATISTICS  = -DNSTAT -DCOUNT_SKIP_SPACE -DTRACE_RAY
# MPI2STATISTICS  = -DCOUNT_SKIP_SPACE

#
#  compiler optimization option
# 
OPTIMIZE_OPT     = -O2
# OPTIMIZE_OPT     =

#----------------------------------------------------------------------
# do not edit under this line.  YAMAUCHI Hitoshi
#----------------------------------------------------------------------
CFLAGS		= $(OPTIMIZE_OPT) $(CDEBUGFLAGS) $(MPI2STATISTICS) -DREADTEST -DFOR_STANDALONE
CXXFLAGS	= $(CFLAGS)


#----------------------------------------------------------------------
# source file and objects
#----------------------------------------------------------------------
FILES = lineParser.cc mpi2ReaderClass.cc 		\
	triangleObject.cc sphereObject.cc vector.cc 	\
	material.cc getvals.cc ray.cc myString.cc 	\
	readSpcParam.cc getopt.cc main.cc FileInfo.cc	\
	fileUtil.cc SLList.cc

OBJS  = ${FILES:.cc=.o}


#----------------------------------------------------------------------
# targets
#----------------------------------------------------------------------
PROGRAM = mpi2reader

all: mpi2reader

mpi2reader: $(OBJS) $(DEPLIBS)
	$(RM) $@
	$(CXX) -o $@ $(CXXLDOPTIONS) $(OBJS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES)

depend:
	$(CXX) -MM $(CFLAGS) $(FILES) > Makefile.depend

etags:
	find . \( -name '*.cc' -o -name '*.h' \) -print | xargs etags -d -t -a
	@echo "\`TAGS' is updated."

#----------------------------------------------------------------------
# include dependencies
#----------------------------------------------------------------------
include Makefile.depend

#----------------------------------------------------------------------
# common rules for all Makefiles - do not edit
#----------------------------------------------------------------------
.c.i:
	$(RM) $@
	 $(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@

emptyrule::

clean::
	$(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut *.core "#"* ${PROGRAM} a a.out 
	$(RM) -r Templates.DB

distclean:: clean
	$(RM) config.log config.cache config.status

