#
# Type "make all" to test COBOL and PL/I date/time
#
# Type "make coboltest" to test COBOL date/time only
#
# Type "make plitest" to test PL/I date/time only
#

CBLLIB=./

EBM_COBOPT="osvs callfh=ebmlsfile ibmcomp nobound noalter \
		notrunc vsc2 defaultbyte=0 assign=external odoslide"

STD_COBOPT="osvs                  ibmcomp nobound noalter \
		notrunc vsc2 defaultbyte=0 assign=external odoslide"

COBOL=cob

all: coboltest plitest

coboltest: TSTCBLDT

plitest: TSTPLIDT

TSTCBLDT: TSTCBLDT.cbl
	@echo "#"
	@echo "# Compiling COBOL program: TSTCBLDT"
	@echo "#"
	cob -C ${STD_COBOPT} $@.cbl
	rm $@.idy
	@echo "#"
	@echo "# Translating MVS/JCL Job: coboltest"
	@echo "#"
	haltrans coboltest -f

TSTPLIDT: TSTPLIDT.pl1
	@echo "#"
	@echo "# Compiling PL/I program: TSTPLIDT"
	@echo "#"
	lpipl1 -defext TSTPLIDT.pl1
	@echo "#"
	@echo "# Linking PL/I program: TSTPLIDT"
	@echo "#"
	ldpl1 -V -ebm TSTPLIDT.o -o TSTPLIDT.plx
	rm $@.o
	@echo "#"
	@echo "# Translating MVS/JCL Job: plitest"
	@echo "#"
	haltrans plitest -f

clean:
	rm -f TSTCBLDT.int
	rm -f TSTCBLDT.gnt
	rm -f TSTCBLDT.idy
	rm -f TSTCBLDT.lst
	rm -f TSTPLIDT.plx
	rm -f .ebm_pli_obj.lst
	rm -f ish/coboltest
	rm -f ish/plitest
