#
# $Id: GNUmakefile,v 1.4 2003/02/14 18:49:46 lijewski Exp $
#
PBOXLIB_HOME = ..

TOP = $(PBOXLIB_HOME)

PRECISION = DOUBLE
PROFILE   = FALSE
COMP      = g++
#FCOMP     = Intel
DEBUG     = TRUE
DEBUG     = FALSE
DIM       = 2
USE_MPI   = FALSE
#
# Base name of the executable.
#
EBASE = run
#
# Where libraries and include files will be installed.
#
include $(TOP)/mk/Make.defs ./Make.package

include $(TOP)/BoxLib/Make.package $(TOP)/bndrylib/Make.package

INCLUDE_LOCATIONS += . $(TOP)/bndrylib  $(TOP)/BoxLib

DEFINES += -DBL_USE_SETBUF
#
# ArrayView
#
ifeq (USE_ARRAYVIEW, TRUE)
  DEFINES += -DBL_USE_ARRAYVIEW
  INCLUDE_LOCATIONS += .
  LIBRARIES += -lX11
endif

vpath %.H   . $(TOP)/bndrylib $(TOP)/BoxLib
vpath %.cpp . $(TOP)/bndrylib $(TOP)/BoxLib
vpath %.F   . $(TOP)/bndrylib $(TOP)/BoxLib
vpath %.h   . $(TOP)/bndrylib $(TOP)/BoxLib
vpath %.f   . $(TOP)/bndrylib $(TOP)/BoxLib

all: $(executable)

libs:
	cd $(PBOXLIB_HOME)/BoxLib; \
	make PRECISION=$(PRECISION) PROFILE=$(PROFILE) COMP=$(COMP) \
	DEBUG=$(DEBUG) DIM=$(DIM) USE_MPI=$(USE_MPI) install
	cd $(PBOXLIB_HOME)/bndrylib; \
	make PRECISION=$(PRECISION) PROFILE=$(PROFILE) COMP=$(COMP) \
	DEBUG=$(DEBUG) DIM=$(DIM) USE_MPI=$(USE_MPI) install

include ../mk/Make.rules
