#
#       Makefile for fonts
#
#       Copyright (C) 2000-2022 GFD Dennou Club. All rights reserved.
#

ROOTDIR     = ..\..\..
OBJDIR      = ..

FSRC        = cvfont.f

FOBJ = $(FSRC:.f=.obj)

!include $(ROOTDIR)\MkInclude.win

build:
    $(MAKE) /$(MAKEFLAGS) /NOLOGO /S /f makefile.win subdirs \
            SUBDIRS_PRETARGET=build-exec
build-exec: font1u font2u

install:
    $(MAKE) /$(MAKEFLAGS) /NOLOGO /S /f makefile.win subdirs \
            SUBDIRS_PRETARGET=install-exec
install-exec-unique:
	$(CP) font1u $(DSPATH)
	$(CP) font2u $(DSPATH)

clean:
    $(MAKE) /$(MAKEFLAGS) /NOLOGO /S /f makefile.win subdirs \
            SUBDIRS_PRETARGET=clean-exec
clean-exec-unique:
    @IF EXIST cvfont.obj $(RM)  cvfont.obj
    @IF EXIST *.exe $(RM)  *.exe
    @IF EXIST font1u $(RM) font1u
    @IF EXIST font2u $(RM) font2u

cvfont.exe: cvfont.f
    @ifort cvfont.f
    @IF EXIST cvfont.obj $(RM)  cvfont.obj

font1u: cvfont.exe
    @IF EXIST font1u $(RM) font1u
    @echo 'font1n' 'font1u' | cvfont.exe

font2u: cvfont.exe
    @IF EXIST font2u $(RM) font2u
    @echo 'font2n' 'font2u' | cvfont.exe

