# configure.nps
#
# This file was automatically generated by the configure script in the
# top level directory. You may make changes to the settings in this
# file but be aware they will be overwritten each time you run configure.
# Ordinarily, it is necessary to run configure once, when the code is
# first installed.
#
# To permanently change options, change the settings for your platform
# in the file arch/configure.defaults, the preamble, and the postamble -
# then rerun configure.
#

.SUFFIXES: .F90 .f90 .F .f .c .o

SHELL           	=       /bin/sh

COMPRESSION_LIBS        =       /nwprod/lib/libjasper.a \
                                /nwprod/lib/libpng.a \
                                /nwprod/lib/libz.a

COMPRESSION_INC         =       -I/nwprod/lib/include

NCARG_LIBS              =
NCARG_LIBS2		=

DIO                     =       $(DEV_TOP)/dio
DIO_INC                 =       -I${DIO}
DIO_LIBS                =       -L${DIO} -ldio

G2_LIBS                 =       -L/nwprod/lib -lg2_4 $(COMPRESSION_LIBS)
G2_INCMOD               =       -I/nwprod/lib/incmod/g2_4

W3_LIBS                 =       -L/nwprod/lib -lw3nco_v2.0.3_4 -lw3emc_v2.0.3_4
W3D_LIBS                =       -L/nwprod/lib -lw3nco_v2.0.3_d -lw3emc_v2.0.3_d
IP_LIBS                 =       -L/nwprod/lib -lip_d
SP_LIBS                 =       -L/nwprod/lib -lsp_4
SIGIO_LIBS              =       -L/nwprod/lib -lsigio_4
SIGIO_INCMOD            =       -I/nwprod/lib/incmod/sigio_4

BACIO_LIBS              =       -L/nwprod/lib -lbacio_4

NEMSIO_INC              =       -I/nwprod/lib/incmod/nemsio
NEMSIO_LIBS             =       -L/nwprod/lib -lnemsio_v2.2.0

LANDSFCUTIL_INC         =       -I/nwprod/lib/incmod/landsfcutil_d
LANDSFCUTIL_LIBS        =       -L/nwprod/lib -llandsfcutil_d

FDEFS			=	-DUSE_JPEG2000 -DUSE_PNG

# Listing of options that are usually independent of machine type.
# When necessary, these are over-ridden by each architecture.

ARFLAGS			=

PERL			=	perl

RANLIB			=	echo

#### Architecture specific settings ####

# Settings for PC Linux x86_64 (wcoss), Intel(ifort) compiler, DM parallel
#
FC              =       mpfort -O3 -fp-model strict -g -traceback # -debug all -check all -O0 -ftrapuv -fpe0
SFC             =       ifort -O3 -fp-model strict -g -traceback # -debug all -check all -O0 -ftrapuv -fpe0
FFLAGS          =       -FR -convert big_endian -assume noold_ldout_format
F77FLAGS        =       -convert big_endian -assume noold_ldout_format
FNGFLAGS        =       $(FFLAGS)
R8              =       -r8
LDFLAGS         =       -openmp -auto
CC              =       mpcc -O3
SCC             =       icc -O3
CFLAGS          =       -O
CPP             =       /lib/cpp -C -P -traditional
CPPFLAGS        =       -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DIO_BINARY -DIO_GRIB1 -D_MPI -DBIT32

###########################################################
#
#	Macros, these should be generic for all machines

LN		=	ln -sf
MAKE		=	make -i -r
RM		= 	/bin/rm -f
CP		= 	/bin/cp
AR		=	ar ru

.IGNORE:
.SUFFIXES: .c .f90 .F90 .f .F .o

#	There is probably no reason to modify these rules

.c.o:
	$(RM) $@
	$(CC) $(CPPFLAGS) $(CFLAGS) -c $<	

.f90.o:
	$(RM) $@ $*.mod
	$(CP) $< $*.f
	$(FC) $(FFLAGS) $(DIO_INC) $(NEMSIO_INC) $(G2_INCMOD) -c $*.f
	$(RM) $*.f

.f.o:
	$(RM) $@ $*.mod
	$(FC) $(F77FLAGS) -c $<

.F90.o:
	$(RM) $@ $*.mod
	$(CPP) $(CPPFLAGS) $(FDEFS) $< > $*.f
	$(FC) $(FFLAGS) $(DIO_INC) $(NEMSIO_INC) $(G2_INCMOD) -c $*.f
	$(RM) $*.f

.F.o:
	$(RM) $@ $*.mod
	$(CPP) $(CPPFLAGS) $(FDEFS) $< > $*.f
	$(FC) $(F77FLAGS) $(DIO_INC) $(NEMSIO_INC) $(G2_INCMOD) -c $*.f
	$(RM) $*.f