######################################################################################################
###  This file is based on file in the runjags package (version 2.0)
###  The previous version of the file is Copyright (C) Matthew Denwood, licensed under GPL-2.
###
###  The previous file is based on that in the rjags package (version 4-10)
###  Original file is Copyright (C) Martyn Plummer, licensed under GPL-2
###
###  This file allows compilation with JAGS 4 without modifying RoBMA.
###  To force the package to compile assuming a given JAGS version is installed, use the
###  JAGS_MAJOR_FORCED environmental variable.  This should not be necessary on unix.
###
######################################################################################################


###############
###  Flags
###  Prepending 0 to JAGS_MAJOR_VERSION prevents it being set as blank (the C++ code requires a number)
###  JAGS_MAJOR_ASSUMED is not needed (always 0) on unix
###############
LAPACK_LIBS=`"${R_HOME}/bin/R" CMD config LAPACK_LIBS`
BLAS_LIBS=`"${R_HOME}/bin/R" CMD config BLAS_LIBS`
FLIBS=`"${R_HOME}/bin/R" CMD config FLIBS`

PKG_CPPFLAGS=@JAGS_CFLAGS@ -D JAGS_MAJOR_FORCED=0$(JAGS_MAJOR_VERSION) -D JAGS_MAJOR_ASSUMED=0 -DR_NO_REMAP
PKG_LIBS=@JAGS_LIBS@ @JAGS_RPATH@ -ljrmath $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

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


###############
###  LIBS and objects to be compiled
###############

OBJECTS = distributions/DWN.o \
		  distributions/DWB.o \
		  distributions/DWP.o \
		  distributions/DSELNORMSTEP.o \
		  distributions/DSELNORMSTEPSWITCH.o \
		  distributions/DSELNORMKERNEL.o \
		  selnorm/selnorm.o \
		  r-glmm.o r-regplot.o r-selnorm.o init.o RoBMA.o testRoBMA.o

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



