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



# This makefile should be used to generate demo programs for Oracle
#
# The makefile may be invoked in the following manner:
#
# make clean (To clean up)
#
# make all (To compile all demo programs )
#
# ***********************************************
# rules
# ***********************************************
PCC=procob
PCCINC=$(ORACLE_HOME)/procob/lib
# ---------------------- Oracle 7.3 uncomment this line -----------------------
# PCCINC=$(ORACLE_HOME)/precomp/public
# -----------------------------------------------------------------------------

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

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

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

.pco.clt:
	$(PCC) iname=$*.pco oname=$*.clt include=`pwd` \
	include=$(PCCINC) ireclen=132 maxliteral=161 \
	mode=ansi hold_cursor=no release_cursor=yes maxopencursors=50 \
	dbms=v7

.bth.cob:
	$(PCC) iname=$*.bth oname=$*.cob include=`pwd` \
	include=$(PCCINC) ireclen=132 maxliteral=161 \
	mode=ANSI hold_cursor=no release_cursor=yes maxopencursors=50 \
	dbms=v7

.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 callfh=ebmlsfile 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/jload ish/junload ish/jobtest ish/jobtest1


ACCTBTCH.int:	ACCTBTCH.bth	ACCTBTCH.cob

ish/jobtest1: jdos/jobtest1 $(FILEMAP)
	dostrans jobtest1 -f

ish/jload: jmvs/jload $(FILEMAP)
	mvstrans jload -f

ish/junload: jmvs/junload $(FILEMAP)
	mvstrans junload -f

ish/jobtest: jmvs/jobtest $(FILEMAP)
	sh UpdateFile_Map
	mvstrans jobtest -f

clean:
	rm -f ACCTBTCH.cob ACCTBTCH.i*
	rm -f *.lis *.err *.log *.bad
	rm -f ish/jobora ish/jload ish/junload ish/jobtest ish/jobtest1
	rm -f $(JOBLIB)/ACCTBTCH.int
