#
#       MkInclude for nmake
#
#       Copyright (C) 2004 GFD Dennou Club. All rights reserved.
#

PREFIX = "C:\dcl-fortran"

FC    = ifort.exe /nologo /MD
FCVER = 150.221
CC    = cl.exe /nologo /MD /DHAVE_GTK_H  /DHAVE_GDK_PIXBUF_H /DWINDOWS
CCVER = 12.0
FTOL  = FTOL
CP    = @copy /y
MV    = @move /y
RM    = @del

INTMAX          = Z'7FFFFFFF'
REALMAX         = Z'7F7FFFFF'
REALMIN         = Z'00800000'
REPSL           = 1.19221E-06

IWIDTH         = 900
IHEIGHT         = 650
DCLNWS         = 2

#DSPATH = $(PREFIX)"\dbase\"

DSPATH = c:\dcl-fortran\dbase

MAXNGRID = 4000

SUFFIX = .obj .mod .f90 .f .c

all: build

subdirs:$(SUBDIRS_PRETARGET) $(SUBDIRS) $(SUBDIRS_POSTTARGET)

!if "$(SUBDIRS)" != ""
$(SUBDIRS):subdirs.mak.force-build
	cd $@
	@echo Entering $@
	nmake /NOLOGO /S /$(MAKEFLAGS) /f makefile.win subdirs
	cd ..
	@echo Leaving $@

subdirs.mak.force-build:

!endif

install-exec: install-exec-unique
	IF EXIST *.obj $(CP) *.obj $(ROOTDIR)
	IF EXIST *.mod $(CP) *.mod $(ROOTDIR)

clean-exec: clean-exec-unique
	IF EXIST *.mod $(RM) *.mod
	IF EXIST *.obj $(RM) *.obj
	IF EXIST *.lib $(RM) *.lib
	IF EXIST *.bak $(RM) *.bak
	IF EXIST *.exe $(RM) *.exe


.f90.obj:
	@echo $*.f90
	$(FC) /c $*.f90

.f90.mod:
	@echo $*.f90
	$(FC) /c $*.f90

.f.obj:
	@echo $*.f
	$(FC) /c $*.f

.c.obj:
	@echo $*.c
	$(CC) /c $*.c $(CFLAGS)
