# $Id$
#    edited by M. Shiotani 2000/10/07
#    edited by M. Shiotani 2000/11/18
#    edited by M. Shiotani 2002/01/18
#    edited by M. Shiotani 2003/06/23
#    edited by S. Nishizaw 2004/02/10
#    edited by M. Shiotani 2004/03/02
#    edited by M. Shiotani 2004/05/01
#    edited by M. Shiotani 2004/09/04
#    edited by M. Shiotani 2005/06/02
#
#       include file for Makefile
#

# suffix rules

.SUFFIXES : .o .f .c .f90

.c.o :
	$(CC) $(DEFS) $(CFLAGS) -c $<

.f.o :
	$(FC) $(FFLAGS) -c $<

.f90.o :
	$(FC) $(FFLAGS) -c $<

.c :
	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS)

.f :
	$(FC) $(FFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS)

.f90 :
	$(FC) $(FFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS)

# macro definitions

prefix		= @prefix@

DCLDIR		= @DCLDIR@
DCLVERSION	= @DCLVERSION@
DCLVERNUM	= @DCLVERNUM@
DCLLANG	= @DCLLANG@

BINDIR          = $(prefix)/bin
LIBDIR          = $(prefix)/lib
INCDIR          = $(prefix)/include
datarootdir			= @datarootdir@
MANDIR          = @mandir@


LBINDIR         = $(DCLDIR)/bin
LLIBDIR         = $(DCLDIR)/lib
LINCDIR         = $(DCLDIR)/include

DCLLIBNAME      = $(DCLLANG)dcl$(DCLVERNUM)
DCLLIBFILE      = $(LIBDIR)/lib$(DCLLIBNAME).a
LDCLLIBFILE     = $(LLIBDIR)/lib$(DCLLIBNAME).a
DCLSHLIBFILE    = $(LIBDIR)/lib$(DCLLIBNAME).@EXTSHLIB@
LDCLSHLIBFILE   = $(LLIBDIR)/lib$(DCLLIBNAME).@EXTSHLIB@
DCLLIBOPT       = -l$(DCLLIBNAME)
DCLLIBPATH      = -L$(LIBDIR)

MODINSTDIR 	= $(LIBDIR)/include
F90MODTYPE 	= std.mod
IFCCEM 		= :
MODEXT 		= .mod


DBASENAME       = dcldbase
DBASEDIR        = $(LIBDIR)/$(DBASENAME)
LDBASEDIR       = $(LLIBDIR)/$(DBASENAME)

#XINCPATH        = @X_INCLUDES@
#XLIBPATH        = @X_LIBS@
#XLIBOPT         = @X_PRE_LIBS@ @X_LIBRARIES@

GTKVERSION	= @GTKVERSION@

GTK_CFLAGS	= @GTK_CFLAGS@
GTK_LIBS	= @GTK_LIBS@

DCLNWS		= @DCLNWS@

MATHLIBOPT     = -lm

FCLIBOPT 	= @FCLIBOPT@

MISC1EXT        = clcklib fiolib randlib hexlib reallib
OLDSRC          = @OLDSRC@

DCLFRT          = dclfrt
DCLCONFIG	= dclconfig
DCLCONFVER	= $(DCLCONFIG)$(DCLVERNUM)

SHELL           = /bin/sh
MAKE            = make
CC		= @CC@
DEFS		= @DEFS@
CFLAGS		= @CFLAGS@ -fPIC -DGTKVERSION=$(GTKVERSION) $(GTK_CFLAGS) -I$(INCDIR)
#  $(XINCPATH)
FC		= @FC@
FFLAGS          = @FFLAGS@ -fPIC
LD              = ld
LDFLAGS         = -I$(INCDIR) $(DCLLIBPATH)
#$(XLIBPATH)
#LDLIBS          = $(DCLLIBOPT) $(GTK_LIBS) @X_EXTRA_LIBS@ $(XLIBOPT) @FLIBS@ @LINKOPT@ $(MATHLIBOPT)
LDLIBS          = $(DCLLIBOPT) $(GTK_LIBS) @FLIBS@ @LINKOPT@ $(MATHLIBOPT) $(FCLIBOPT)
AR              = ar
ARFLAGS         = vru
RM              = rm -f
CP              = cp
MV              = mv -f
INSTALL	  = install
RANLIB          = @RANLIB@
CAT             = cat
AWK		= @AWK@
SED		= @SED@

EXT		= @EXEEXT@

JLATEX         = @JLATEX@ -kanji=utf8
DVI2PDF        = @DVI2PDF@

# some constants used in math1/syslib/glpget.f

INTMAX          = @INTMAX@
REALMAX         = @REALMAX@
REALMIN         = @REALMIN@
REPSL           = @REPSL@

# some constants used in misc1/clcklib/clckst.c

CLK_PER_SEC     = @CLK_PER_SEC@
CLK_RSL_TCK     = @CLK_RSL_TCK@

# selection of source code in math1/oslib

OSQARN          = @OSQARN_OPT@
OSGARG          = @OSGARG_OPT@
OSQARN_EXT      = @OSQARN_EXT@
OSGARG_EXT      = @OSGARG_EXT@

# selection of source code of display driver 

DRV_EXT         = @DRV_EXT@

# selection of source code in grph1/csgi

CSGI            = @CSGI_OPT@

# window size for X in grph1/swpack

IWIDTH          = 900
IHEIGHT         = 650

# constant in grph2/uwpack (maximum number of grid points)

MAXNGRID        = 4000

#misc1/fiolib (number of CRLF)
ISLCT            =  1

macfontdir = /Library/Fonts/
winfontdir = /C/Windows/Fonts/
debfontdir = /usr/local/share/fonts/
usrfontdir = ~/.fonts/
