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

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

CMAPFILE0	= colormap.x11
CMAPLIST	= cmaplist
CMAPFILES	= colormap_01.x11              colormap_02.x11 \
		  colormap_03.x11              colormap_04.x11 \
		  colormap_05.x11              colormap_06.x11 \
		  colormap_07.x11              colormap_08.x11 \
		  colormap_09.x11              colormap_10.x11 \
		  colormap_11.x11              colormap_12.x11 \
		  colormap_13.x11              colormap_14.x11 \
		  colormap_15.x11              colormap_16.x11 \
		  colormap_17.x11              colormap_18.x11 \
		  colormap_19.x11              colormap_20.x11 \
		  colormap_21.x11              colormap_22.x11 \
		  colormap_23.x11              colormap_24.x11 \
		  colormap_25.x11              colormap_26.x11 \
		  colormap_27.x11              colormap_28.x11 \
		  colormap_29.x11              colormap_30.x11 \
		  colormap_31.x11              colormap_32.x11 \
		  colormap_33.x11              colormap_34.x11 \
		  colormap_35.x11              colormap_36.x11 \
		  colormap_37.x11              colormap_38.x11 \
		  colormap_39.x11              colormap_40.x11 \
		  colormap_41.x11              colormap_42.x11 \
		  colormap_43.x11              colormap_44.x11 \
		  colormap_45.x11              colormap_46.x11 \
		  colormap_47.x11              colormap_48.x11 \
		  colormap_49.x11              colormap_50.x11 \
		  colormap_51.x11              colormap_52.x11 \
		  colormap_53.x11              colormap_54.x11 \
		  colormap_55.x11              colormap_56.x11 \
		  colormap_57.x11              colormap_58.x11 \
		  colormap_59.x11              colormap_60.x11 \
		  colormap_61.x11              colormap_62.x11 \
		  colormap_63.x11              colormap_64.x11 \
		  colormap_65.x11              colormap_66.x11 \
		  colormap_67.x11              colormap_68.x11 \
		  colormap_69.x11              colormap_70.x11 \
		  colormap_71.x11              colormap_72.x11 \
		  colormap_73.x11              colormap_74.x11 \
		  colormap_75.x11              colormap_76.x11 \
		  colormap_77.x11              colormap_78.x11 \
		  colormap_79.x11              colormap_80.x11


FSRC        = cmap01.f cmap02.f

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

!include $(ROOTDIR)\MkInclude.win

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

install:
    $(MAKE) /$(MAKEFLAGS) /NOLOGO /S /f makefile.win subdirs \
            SUBDIRS_PRETARGET=install-exec
install-exec-unique:
	$(CP) colormap.x11 $(DSPATH)
	$(CP) colormap_??.x11 $(DSPATH)

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

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

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

colormap1.x11: cmap01.exe
	@echo "Creating colormap file colormap1.x11"
	@cmap01.exe > colormap1.x11

colormap2.x11: cmap02.exe
	@echo "Creating colormap file colormap2.x11"
	@cmap02.exe > colormap2.x11


