# Makefile Makefile_testhelp_g77
#
# g77 g77 g77 g77 g77 g77 g77 g77 g77 g77 g77 g77 g77 g77 g77 g77 g77 g77 
 DIALECT = -fno-backslash -fno-automatic -finit-local-zero 
 WARN= -Wall -W
 DEBUG = -O
 FC=g77
 OPTLINKER=-o
 CC=gcc
 CFLAGS =-c -g -Wall -W
# g77 g77 g77 g77 g77 g77 g77 g77 g77 g77 g77 g77 g77 g77 g77 g77 g77 g77 
#
# DEC unix fortran DEC unix fortran DEC unix fortran DEC unix fortran
#DECUNIX
#DECUNIX DIALECT= -assume backslash
#DECUNIX WARN= -warn general -show include -show xref -v -V
#DECUNIX DEBUG= 
#DECUNIX FC=f77 -old_f77
#DECUNIX OPTLINKER=-o
#DECUNIX CC=cc
#DECUNIX CFLAGS =-c 
# DEC unix fortran DEC unix fortran DEC unix fortran DEC unix fortran

# sgi sgi sgi sgi sgi sgi sgi sgi sgi sgi sgi sgi sgi sgi sgi sgi sgi
# -vms_cc is vms carriange return on unit 6 (standard output)
#sgi DIALECT = -backslash -static -vms_cc
#sgi# -C range checking
#sgi WARN= -listing -C
#sgi DEBUG =
#sgi FC=f77
#sgi OPTLINKER=-v -o
#sgi CC=cc
#sgi CFLAGS =-c 
#sgi RANLIB=ranlib
# sgi sgi sgi sgi sgi sgi sgi sgi sgi sgi sgi sgi sgi sgi sgi sgi sgi

# Fortran flags for all operating systems
 FFLAGS =-c $(DIALECT) $(WARN) $(DEBUG)
# Fortran flags for all operating systems
#
# g77 g77 g77 g77 compiler options: g77 g77 g77 g77 
# DIALECT switches for g77
# -fno-backslash    since VMS defaults to non-hollerith string constants
# -fvxt-not-f90     prefer VAX extensions to F90 extensions (default)
# -fno-automatic    always save data between function invocations
#		  ugly, but Jess's code depends on it.
#		  (some compilers call this -static)
# -finit-local-zero Tanya depends on it, so Jess probably does to
# -fno-f2c	Don't bother with f2c compatibility
# -fno-second-underscore Causes problems with "loc_batch__" in BATCH-UNX.C.
#
#
# WARN switches for g77
# -Wimplicit    show variables declared implicitly
# -Wunused	show unused variables
# -Wuninitialized   show (some) uninitialized variables (if -O)
# -Wsurprising      show compiler dependent arithmetic constructs
# -W	    show unused procedure parameters
# -fpedantic    show (some) non-conforming extensions
#
# DEBUG switches
# -Idir      also search dir for include files (note no space)
# -g	    debug
# -O	    optimize (not yet thanks)
#		   (dataflow analysis means unitialized vars can be detected)
# g77 g77 g77 g77 compiler options: g77 g77 g77 g77 
# 
# DEC unix compiler DEC unix compiler DEC unix compiler DEC unix compiler
# Makefile MAKEFILE_decunix_pgdb.
# DEC Unix
#  -assume backslash
#	       Treats the backslash (\) character literally in character
#	       literals.  The default is -assume nobackslash, which treats
#	       the backslash character as C-style control (escape) character
#	       syntax.
#
#  -vms	 Causes the run-time system to behave like DIGITAL Fortran on
#	       OpenVMS VAX systems (VAX FORTRAN) in the following ways:
#
#	       +   Reinforces certain defaults
#
#		   Reinforces the following DIGITAL Fortran 77 defaults:
#		   -fpe0, -static, -names lowercase (so A is equivalent to
#		   a), and -norecursive.  You can override this by specifying
#		   the option on the command line.  For example, if you
#		   specify -vms -fpe2, you get -fpe2.  The -vms option also
#		   forces -check format and -check output_conversion.
#
#	       +   Alignment
#
#		   -vms does not affect the alignment of fields in records or
#		   items in COMMON.  Use -align norecords to pack fields of
#		   records on the next byte boundary for compatibility with
#		   DIGITAL Fortran on OpenVMS VAX systems.
#
#	       +   INCLUDE qualifiers
#
#		   Recognizes /LIST and /NOLIST at the end of the file path-
#		   name in an INCLUDE statement at compile time.
#
#		   If the file name in the INCLUDE statement does not specify
#		   the complete path, the path used is the current directory.
#
#	       +   Quotation mark character (")
#
#		   Recognizes a quotation mark as starting an octal constant
#		   (such as "177) instead of a character literal ("...").
#
#	       +   Control character syntax
#
#		   Does not recognize the \n control character syntax in
#		   character literals (same as the -assume backslash option).
#
#	       +   Deleted records in relative files
#
#		   When a record in a relative file is deleted, the first
#		   byte of that record is set to a known character (currently
#		   '@').  Attempts to read that record later result in
#		   ATTACCNON errors.  The rest of the record (the whole
#		   record, if -vms is not set) is set to nulls for unformat-
#		   ted files and spaces for formatted files.
#
#	       +   ENDFILE records
#
#		   When an ENDFILE is performed on a sequential unit, an
#		   actual one byte record containing a Ctrl/D is written to
#		   the file.  If -vms is not set, an internal ENDFILE flag is
#		   set and the file is truncated.
#
#		   The -vms option does not affect ENDFILE on relative files;
#		   such files are truncated.
#
#	       +   Reading deleted records and ENDFILE records
#
#		   The run-time direct access READ routine checks the first
#		   byte of the retrieved record. If this byte is '@' or NULL
#		   ("\0"), then ATTACCNON is returned.
#
#		   The run-time sequential access READ routine checks to see
#		   if the record it just read is one byte long and contains a
#		   Ctrl/D. If this is true, it returns EOF.
#
#	       +   OPEN effects
#
#		   Carriage control defaults to FORTRAN if the file is for-
#		   matted, and the unit is connected to a terminal (checked
#		   by means of isatty(3) ). Otherwise, carriage control
#		   defaults to LIST.
#
#		   The -vms option affects the record length for direct
#		   access and relative organization files.  The buffer size
#		   is increased by one (to accommodate the deleted record
#		   character).
#
#
#	       +   Implied logical unit numbers
#
#		   Recognizes certain environment variables at run time for
#		   ACCEPT, PRINT, and TYPE statements, and for READ and WRITE
#		   statements that do not specify a unit number, such as:
#		   READ (*,1000).  For more information, see your DIGITAL
#		   Fortran user manual.
#
#	       +   Treatment of blanks in input
#
#		   Causes the defaults for keyword BLANK= in OPEN statements
#		   to become 'NULL' for an explicit OPEN, and 'ZERO' for an
#		   implicit OPEN of an external or internal file.
#
#  -static      Causes all local variables to be statically allocated (same as
#	       the -noautomatic option).  This is the default.
#
#  -V	   Creates a listing file of the source file with various
#	       compile-time information appended. The name of the listing
#	       file is the basename of the source file with a .l substituted
#	       for the .f, .for, or .FOR.
#
#	       How you compile source files determines how the listing file
#	       is created. If you compile several source files together, one
#	       listing file is created (named with the basename of the first
#	       input file and the .l suffix).  If you compile source files
#	       one at a time, a separate listing file is created for each
#	       input file (named with the basename of the input file and the
#	       .l suffix).
#
#  -v	   Prints the passes as they execute with their arguments and
#	       their input and output files; also prints final resource usage
#	       in the C-shell time format.
#
#  -C	   Generates code to perform run-time checks on subscript and
#	       substring expressions (same as the -check bounds option). An
#	       error is reported if the expression is outside the dimension
#	       of the array or the length of the string.  The default is
#	       -check nobounds.
#
# DEC Unix stadard library
#  -L	   Prevents the linker from searching for libraries in the stan-
#	       dard directories.
#
#  -Ldir	Directs the linker to search for libraries in dir before
#	       searching the standard directories.
#
#  -lstring     Searches -libstring libraries for ld (see ld(1) ).  This
#	       option should be placed at the end of the command line.
#
#Restrictions
#  The standard library, /usr/lib/libc.a, is loaded with the -lc loader option
#  and not a full pathname. The wrong library can be loaded if there are files
#  with the name libc.a in the directories specified with the -L loader
#  option, or in the default directories searched by the loader.
# /usr/lib/libm.a		     Math library
# DEC unix compiler DEC unix compiler DEC unix compiler DEC unix compiler
#

AR=ar
RANLIB=ranlib


all: help-paul-unx.o test_help 

## Compiling ASK_O
#@echo "Compiling ASK_O, using fortran" 
test_help.o : test_help.f 
	$(FC) $(FFLAGS) test_help.f

help-paul-unx.o : help-paul-unx.c
	$(CC) $(CFLAGS) help-paul-unx.c

#prompt-unx.o : prompt-unx.c
#	$(CC) $(CFLAGS) prompt-unx.c


#prompt-stupid.o : prompt-stupid.f
#	$(FC) $(FFLAGS) prompt-stupid.f



#$(HELPLIBDIR)ask.hlp : $(HEREDIR)ask.hlp
#	cp $(HEREDIR)ask.hlp $(HELPLIBDIR)ask.hlp

test_help : test_help.o help-paul-unx.o 
	$(FC) $(OPTLINKER) test_help test_help.o help-paul-unx.o \
		-lc -lm -lreadline -ltermcap


#$(HELPLIBDIR)testallonly.hlp: $(HEREDIR)testallonly.hlp
#	cp $(HEREDIR)testallonly.hlp $(HELPLIBDIR)testallonly.hlp
#
#$(HELPLIBDIR)testall.hlp: $(HELPLIBDIR)testallonly.hlp \
#		$(HELPLIBDIR)help.hlp $(HELPLIBDIR)ask.hlp $(HELPLIBDIR)cmli.hlp
#	cat $(HELPLIBDIR)help.hlp $(HELPLIBDIR)ask.hlp $(HELPLIBDIR)cmli.hlp \
#	$(HELPLIBDIR)testallonly.hlp > $(HELPLIBDIR)testall.hlp

clean:
	rm *.o *.l

