
#**********************************************************************#
#*                                                                    *#
#* 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="noalter notrunc defaultbyte=0 callfh=ebmlsfile assign=external" 

# 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:	GENESDS.int READESDS.int ish/jobppf ish/jobdef


READESDS.int:	READESDS.cbl

GENESDS.int:	GENESDS.cbl

ish/jobdef: jmvs/jobdef $(FILEMAP)
	haltrans jobdef -f

ish/jobppf: jmvs/jobppf $(FILEMAP)
	sh UpdateFile_Map
	haltrans jobppf -fU

clean:
	rm -f *.int
	rm -f *.lis *.err *.log *.bad
	rm -f ish/jobppf ish/jobdef
