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



# This makefile should be used to generate demo programs for DB2 for Unix
#
# The makefile may be invoked in the following manner:
#
# make clen (To clean up)
#
# make all (To compile all demo programs )
#
# ***********************************************
# rules
# ***********************************************
.SUFFIXES:	.c .int .o .cbl .cob .clt .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

.bth.cob:
	cp $*.bth $*.cob

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

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

COBOL=cob

#
# Default Cobol flag settings (none).
#

COBFLAGS= -ia

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

# cobol options 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/jobdb2

ACCTBTCH.int:	ACCTBTCH.bth	ACCTBTCH.cob

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

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