# Makefile for src/string
# Copyright (C) TOYODA Eizi, 2000.  All rights reserved.

OBJS=dc_string.obj dc_chars.obj iso_varying_string.obj string.obj
HTMS=iso_varying_string.htm dc_chars.htm dc_string.htm

.SUFFIXES: .f90 .obj .exe .3f .1 .htm .mod

# --- select one ---
#CHOICE=p                # pointer allocation version
CHOICE=b                # limited buffer version
#CHOICE=psr              # for PSR vf90 compiler

STRDIR=..\string
MODDIR=..\..\lib
LIBDIR=..\..\lib

LIBPATH=$(LIBDIR)\gtool4.lib

all: lib doc

lib: $(OBJS)

.f90.obj:
        df/c /mod:$(MODDIR) $<

string.obj: string_$(CHOICE).f90
	df/c /mod:$(MODDIR) /obj:$@ $?

test: test.exe

.f90.exe:
	df /mod:$(MODDIR) $< *.obj

.3f.htm:
	htroff -man -u -a $<

doc: $(HTMS)

clean:
	-del *.obj
	-del *.bak
        -del *.mod
        -del *.exe

iso_varying_string.obj: string.obj
dc_string.obj: string.obj
dc_string.htm: iso_varying_string.htm

