#**********************************************************************#
#*                                                                    *#
#* Copyright (c) 2001 by Sun Microsystems, Inc.                       *#
#* All rights reserved.                                               *#
#*                                                                    *#
#**********************************************************************#



# The makefile may be invoked in the following manner:
#
# make clen (To clean up)
#
# make all (To compile all demo programs )
#
# ***********************************************
# rules
# ***********************************************
ESQLCBL=esqlcbl

.SUFFIXES:	.c .int .o .cbl .cob .cl2 .scb .bth .bms .map

.cbl.int:
	rm -f $*.int $*.idy
	$(COBOL) $(COBFLAGS) -C $(COBOPT) $<

.cob.int:
	rm -f $*.int $*.idy
	$(COBOL) $(COBFLAGS) -C $(COBOPT1) $<

.cl2.cbl:
	kixclt $*.cl2

.scb.cl2:
	$(ESQLCBL) -a -f$*.cl2 $*.scb 

.bth.cob:
	$(ESQLCBL) -a -f$*.cob $*.bth 

.bms.map:
	kixbms -c $*.bms

# ***********************************************
# variables to rules
# ***********************************************

COBOL=cob

#
# Default Cobol flag settings (none).
#

COBFLAGS= -ia

# cobol option for online programs 
COBOPT="ibmcomp noalter notrunc defaultbyte=0 ans85" 

# cobol option for batch programs 
COBOPT1="ibmcomp noalter notrunc defaultbyte=0 ans85" 

# ***********************************************
# standard variables
# ***********************************************

#
# This directory is the target for the user executable files.
#


all:	ACCTBTCH.int ish/jobora


ACCTBTCH.int:	ACCTBTCH.bth	ACCTBTCH.cob

ish/jobora: jmvs/jobing $(FILEMAP)
	haltrans jobing -fs

clean:
	rm -f ACCTBTCH.cob ACCTBTCH.i*
	rm -f *.lis *.err *.log *.bad
	rm -f ish/jobing
