#
# This makefile builds CHAREXMP.EXE from CHAR.FOR using fsplit.
#

# Nmake macros for building Visual Fortran applications
!include <dfinc.mak>

objs = reverse.obj findsubs.obj

all: charexmp.exe

# Use fsplit to break CHAR.FOR into CHAREXMP.FOR, FINDSUBS.FOR and
# REVERSE.FOR
#
charexmp.for: char.for
    fsplit90 char.for

charexmp.exe: charexmp.for reverse.for findsubs.for charlib.lib
    $(FOR) $(fflags) charexmp.for /link $(lflags) charlib.lib

charlib.lib:  $(objs)
    $(libr) $(objs) /out:charlib.lib

reverse.obj:  reverse.for char.for
    $(FOR) $(fflags) reverse.for /c
		
findsubs.obj: findsubs.for char.for
    $(FOR) $(fflags) findsubs.for /c

run:
     call charexmp.exe

clean:
    -del charexmp.exe
    -del reverse.obj
    -del findsubs.obj
    -del charlib.lib
    -del charexmp.for
    -del reverse.for
    -del findsubs.for
