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



# This makefile should be used to generate demo programs for Informix
#
# The makefile may be invoked in the following manner:
#
# make clean (To clean up)
#
# make all (To compile all demo programs )
#
# ***********************************************
# rules
# ***********************************************
PCC=procob

.SUFFIXES:	.c .int .o .cbl .cob .clt .eco .bth .bms .map

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

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

.clt.cbl:
	kixclt $*.clt

.eco.clt:
	esqlcobol -e $*.eco
	mv $*.cob $*.clt

.bth.cob:
	cp $*.bth $*.eco
	esqlcobol -e $*.eco

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

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

COBOL=cob

#
# Default Cobol flag settings (none).
#

COBFLAGS= -ia

# cobol option for online programs 
COBOPT="cics 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/jobinf


ACCTBTCH.int:	ACCTBTCH.bth	ACCTBTCH.cob

ish/jobinf: jmvs/jobinf $(FILEMAP)
	haltrans jobinf -fs

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