#
#########################################################################
#
# makefile for The Hessling Editor (THE)
#
#########################################################################
#
# THE - The Hessling Editor. A text editor similar to VM/CMS xedit.
# Copyright (C) 1991-1995 Mark Hessling
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to:
#
#    The Free Software Foundation, Inc.
#    675 Mass Ave,
#    Cambridge, MA 02139 USA.
#
#
# If you make modifications to this software that you feel increases
# it usefulness for the rest of the community, please email the
# changes, enhancements, bug fixes as well as any and all ideas to me.
# This software is going to be maintained and enhanced as deemed
# necessary by the community.
#
# Mark Hessling                 Email:             M.Hessling@qut.edu.au
# 36 David Road                 Phone:                    +617 3849 7731
# Holland Park                  http://www.gu.edu.au/gwis/the/markh.html
# Brisbane                      **** Maintainer PDCurses & REXX/SQL ****
# QLD 4121                      ************* Author of THE ************
# Australia                     ************* Member RexxLA ************
#
#########################################################################
#
# The available features of curses library are different on just about 
# every machine. System V curses has more features that BSD curses, so if
# your system gives you a choice of curses libraries, use the System V one.
# The later the version of your System V operating system, the more features
# are supplied in the curses library and the more features THE can use.
# To help you determine which of the options below should be used, then
# the following will help.
#
# Determine where your curses.h file is located. It is generally in
# /usr/include or /usr/5include. 
# Once you know the location of curses.h, run the following commands:
#
# grep A_COLOR /usr/include/curses.h  (or wherever your curses.h file is)
# If this results in any output, then use the System V R3.2 section.
# next try:
# grep attrset /usr/include/curses.h  (or wherever your curses.h file is)
# If this results in any output, then use the System V R3.1 section.
# If neither of these commands resulut in any output, then I'm affraid you
# will have to use the BSD option.
#
# If when you compile and link THE, you get errors, then you might have to
# come down one version. eg If you used the System V R3.2 section and got
# errors, try using the System V 3.1 section.
#
# THE should now work successfully with ncurses version 1.9.1 and later.
# As ncurses provides full System V R4 compatible features like colour,
# if you can get ncurses to work on your system, it will make THE more
# configurable.
#
# ncurses is available from ftp://ftp.netcom.com/pub/zm/zmbenhal/ncurses
#
#########################################################################
#
# THE is REXX-aware under all platforms; DOS, OS/2 and Unix.
# By default, the OS/2 REXX support is enabled when compiling with the
# C Set/2 compiler, as this is the only platform where one is almost
# guaranteed to have REXX support available.
#
# To enable REXX support under Unix you need to do the following:
# - obtain version 0.05d or later of Regina from ftp.pvv.unit.no
#   in /pub/rexx. The file is called regina-?.???.tar.Z where ?.??? is
#   the current version.
#   you can also get Regina from rexx.uwaterloo.ca in /pub/freerexx/regina
# - check the README file to see if your platform is supported.
#   if it isn't, then ignore the rest of these instructions :-(
# - build regina as per its instructions
#   this should result in a rexx executable file and a libregina.a file
# - copy rexxsaa.h from the regina src directory into the THE source
#   directory. Also copy libregina.a from the regina src directory into
#   the THE source directory. You may need to run ranlib again on the
#   libregina.a file)
# - set the REXXLIB variable to "-L. -lregina"
#   you may also need to add "-ll" to the end of the REXXLIB variable
#   This is because Regina (versions 0.07a and later) use lex and yacc
#   as part of the compilation of Regina. On some platforms you need
#   to link the lex/yacc library; libl.a with the rexx executable and 
#   with THE. Check the linking step when compiling Regina to see if
#   "-ll" is included. If it is, then it will be required for THE.
# - set the REXXINC variable to "-DUSE_REGINA"
#
#########################################################################
#$Id: makefile 2.1 1995/06/24 16:30:21 MH Rel MH $
#########################################################################

VER = 21
PROJ = proj   # this will get replaced by uncommenting a section
MAN  = man    # this will get replaced by uncommenting a section

#########################################################################
# Borland C++ 2.0 and above compiler on DOS (with Personal REXX (incomplete))
#########################################################################
#SRC       = c:/the
#PROJ      = the.exe
#OBJ       = obj
#CC        = bcc
#CURSINC   = -Ic:/curses 
#REXXINC   = -DUSE_QUERCUS
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -d -K -w-aus -w-par -ml -DPROTO $(INCLUDES)
#LD        = tlink @dos-trc.rsp
#XTRAOBJ   = getopt.obj rxiface.obj
#MAN       = manext.exe
#MANLD     = tlink /c /Td c:\c\lib\c0l+manext+getopt+c:\c\lib\wildargs,manext,,c:\c\lib\cl.lib
#########################################################################
# Borland C++ 2.0 and above compiler on DOS (without Personal REXX)
#########################################################################
#SRC       = c:/the
#PROJ      = the.exe
#OBJ       = obj
#CC        = bcc
#CURSINC   = -Ic:/curses
#REXXINC   = -DNOREXX
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -d -K -w-aus -w-par -ml -DPROTO $(INCLUDES)
#LD        = tlink @dos-trcx.rsp
#XTRAOBJ   = getopt.obj
#MAN       = manext.exe
#MANLD     = tlink /c /Td c:\c\lib\c0l+manext+getopt+c:\c\lib\wildargs,manext,,c:\c\lib\cl.lib
#########################################################################
# MSC 6.0ax compiler on DOS
#########################################################################
#SRC       = c:/the
#PROJ      = the.exe
#OBJ       = obj
#CC        = cl
#CURSINC   = -Ic:/curses
#REXXINC   = -DNOREXX
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -J -EM -AL -DSTDC_HEADERS -DPROTO $(INCLUDES)
#LD        = link @dos-msc.rsp
#XTRAOBJ   = getopt.obj
#MAN       = manext.exe
#MANLD     = link manext+getopt+c:\c600\lib\setargv,,,c:\c600\lib\Llibce /CO /NOE /NOI /NOD;
#########################################################################
# djgpp compiler on DOS (no REXX)
#########################################################################
#SRC       = c:/the
#PROJ      = the
#OBJ       = o
#CC        = gcc
#CURSINC   = -Ic:/curses
#CURSLIB   = c:/djgpp/curses/curseso.a
#REXXINC   = -DNOREXX
#REXXLIB   =
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -D__MSDOS__ -DSTDC_HEADERS -DPROTO $(INCLUDES) -o$*.o
#LD        = $(CC) -o $(PROJ) @dos-go32.rsp -Lc:/djgpp/lib $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o manext manext.o -Lc:/djgpp/lib
#CHMODTHE  = aout2exe $(PROJ)
#CHMODMAN  = aout2exe $(MAN)
#########################################################################
# djgpp compiler on DOS (with Regina 0.07a and above)
#########################################################################
#SRC       = c:/the
#PROJ      = the
#OBJ       = o
#CC        = gcc
#CURSINC   = -Ic:/curses
#CURSLIB   = c:/djgpp/curses/curseso.a
#REXXINC   = -If:/regina-d/src -DUSE_REGINA
#REXXLIB   = -Lf:/regina-d/src -lrexx -lsaa -lrexx
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -D__MSDOS__ -DSTDC_HEADERS -DPROTO $(INCLUDES) -o$*.o
#LD        = $(CC) -O -o $(PROJ) @dos-go32.rsp -Lc:/djgpp/lib $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o manext manext.o -Lc:/djgpp/lib
#CHMODTHE  = aout2exe $(PROJ)
#CHMODMAN  = aout2exe $(MAN)
#########################################################################
# MSC 6.0ax compiler on OS/2
#########################################################################
#SRC       = c:/the
#PROJ      = the.exe
#OBJ       = obj
#CC        = cl
#CURSINC   = -Ic:/curses
#REXXINC   = -DNOREXX
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -J -EM -AL -D__OS2__ -DSTDC_HEADERS -DPROTO -DUSE_OS2_H $(INCLUDES)
#LD        = link @os2-msc.rsp
#XTRAOBJ   = getopt.obj os2eas.obj
#MAN       = manext.exe
#MANLD     = link manext+getopt+c:\c600\os2lib\setargv,,,c:\c600\os2lib\Llibce,msc-man.def /NOE /NOI /NOD;
#########################################################################
# C Set/2 compiler on OS/2
#########################################################################
#SRC       = c:/the
#PROJ      = the.exe
#OBJ       = obj
#CC        = icc
#CURSINC   = -Ic:/curses
#REXXINC   = -DUSE_OS2REXX
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -J+ -Sm -Q+ -DSTDC_HEADERS -DPROTO $(INCLUDES) 
#LD        = link386 @os2-ibm.rsp
#XTRAOBJ   = getopt.obj os2eas.obj
#MAN       = manext.exe
#MANLD     = link386 manext+getopt+f:\ibmc\lib\setargv,,,,ibm-man.def /NOE /NOI /EXEPACK /ALIGN:4;
#RCTHE     = rc $(SRC)\the.res $(PROJ)
#########################################################################
# emx .09a and above compiler on OS/2
#########################################################################
#SRC       = c:/the
#PROJ      = the
#OBJ       = o
#CC        = gcc
#CURSINC   = -Ic:/curses
#CURSLIB   = -Lf:/emx/curses -lcurso
#REXXINC   = -DUSE_OS2REXX
#REXXLIB   = 
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DNOVIO -DSTDC_HEADERS -DPROTO $(INCLUDES) -o$*.o
#LD        = $(CC) -o $(PROJ) $(OBJS) -Lf:/emx/lib -los2 $(CURSLIB) $(REXXLIB) $(SRC)/emx-the.def
#XTRAOBJ   = os2eas.obj
#MAN       = manext
#MANLD     = $(CC) -o manext manext.o -Lf:/emx/lib -los2 $(SRC)/emx-man.def
#BINDTHE   = emxbind $(PROJ)
#RCTHE     = rc $(SRC)\the.res $(PROJ)
#BINDMAN   = emxbind $(MAN)
#########################################################################
# Borland C++ Compiler on OS/2
#########################################################################
#SRC       = c:/the
#PROJ      = the.exe
#OBJ       = obj
#CC        = bcc
#CURSINC   = -Ic:/curses
#REXXINC   = -DUSE_OS2REXX
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -d -K -w-aus -w-par -D__32BIT__ -DSTDC_HEADERS -DPROTO $(INCLUDES)
#LD        = tlink @os2-bcc.rsp
#XTRAOBJ   = getopt.obj os2eas.obj
#MAN       = manext.exe
#MANLD     = tlink manext+getopt+f:\bcos2\lib\setargv,,,,bcc-man.def /NOE /NOI /EXEPACK /ALIGN:4;
#########################################################################
# System V compiler on Sun (no REXX)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = /usr/5bin/cc
#CURSINC   = 
#CURSLIB   = -lcurses
#REXXINC   = -DNOREXX
#REXXLIB   = 
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DSUN -DSYSVR31 $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# ANSI C compiler on Sun - acc (with Regina 0.05h or above)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = acc
#CURSINC   = -I/usr/5include
#CURSLIB   = -L/usr/5lib -lcurses
#REXXINC   = -I. -DUSE_REGINA
#REXXLIB   = -L. -lregina
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DSUN -DSYSVR31 -DPROTO $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB) 
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# ANSI C compiler on Sun - acc (no REXX)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = acc
#CURSINC   = -I/usr/5include
#CURSLIB   = -L/usr/5lib -lcurses
#REXXINC   = -DNOREXX
#REXXLIB   = 
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DSUN -DSYSVR31 -DPROTO $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB) 
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# gcc compiler on Sun (with Regina 0.05h or above)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = gcc
#CURSINC   = -I/usr/5include
#CURSLIB   = -L/usr/5lib -lcurses
#REXXINC   = -I. -DUSE_REGINA
#REXXLIB   = -L. -lregina
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DSUN -DSYSVR31 -DPROTO $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# gcc compiler on Linux using ncurses (no REXX)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = gcc
#CURSINC   = -I/usr/include/ncurses -DUSE_NCURSES
#CURSLIB   = -lncurses
#REXXINC   = -DNOREXX
#REXXLIB   = 
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -DPROTO $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# gcc compiler on Linux using ncurses (with Regina)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = gcc
#CURSINC   = -I/usr/include/ncurses -DUSE_NCURSES
#CURSLIB   = -lncurses
#REXXINC   = -I. -DUSE_REGINA
#REXXLIB   = -L. -lregina
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -DPROTO $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# gcc compiler using ncurses (no Regina)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = gcc
#CURSINC   = -I/usr/local/include -DUSE_NCURSES
#CURSLIB   = -L/usr/local/lib -lncurses
#REXXINC   = -DNOREXX
#REXXLIB   = 
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DPROTO $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# System V compiler on System V R4 systems (no REXX)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = cc
#CURSINC   = 
#CURSLIB   = -lcurses
#REXXINC   = -DNOREXX
#REXXLIB   = 
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DSYSVR4 -DPROTO $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# System V compiler on System V R3.2 systems (no REXX)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = cc
#CURSINC   = 
#CURSLIB   = -lcurses
#REXXINC   = -DNOREXX
#REXXLIB   = 
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DSYSVR32 $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# System V compiler on System V R3.1 systems (no REXX)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = cc
#CURSINC   = 
#CURSLIB   = -lcurses
#REXXINC   = -DNOREXX
#REXXLIB   = 
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DSYSVR31 $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# System V compiler on System V R3 systems (no REXX)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = cc
#CURSINC   = 
#CURSLIB   = -lcurses
#REXXINC   = -DNOREXX
#REXXLIB   = 
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DSYSVR3 $(INCLUDES) 
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# OS/F1 Dec Alpha (with Regina)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = c89
#CURSINC   =
#CURSLIB   = -lcurses
#REXXINC   = -DUSE_REGINA -I.
#REXXLIB   = -L. -lregina -ll 
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -UBSD -DSYSVR31 -Olimit 800 -DNO_CURS_SET -DPROTO -D_XOPEN_SOURCE -unsigned $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
#HP-UX 9.04 A.09.04  9000/800/T-500 (with Regina)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = c89
#CURSINC   =
#CURSLIB   = -lcurses
#REXXINC   = -DUSE_REGINA -I.
#REXXLIB   = -L. -lregina -ll -ldld
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DSYSV -DPROTO -D_HPUX_SOURCE $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
#HP-UX 9.04 A.09.04  9000/800/T-500 (with REXX/imc)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = c89
#CURSINC   =
#CURSLIB   = -lcurses
#REXXINC   = -I/path_to_rexximc_rexxsaa.h
#REXXLIB   = -L/path_to_rexximc_librexx.a -lrexx
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DSYSV -DPROTO -D_HPUX_SOURCE $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
#AIX 3.2.5 RS/6000 320 (with Regina)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = c89
#CURSINC   =
#CURSLIB   = -lcurses
#REXXINC   = -DUSE_REGINA -I.
#REXXLIB   = -L. -lregina -ll
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DSYSV -DPROTO -D_XOPEN_SOURCE $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
#AIX 3.2.5 RS/6000 320 - extended curses (with Regina)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = c89
#CURSINC   = -DUSE_EXTCURSES
#CURSLIB   = -lcur
#REXXINC   = -DUSE_REGINA -I.
#REXXLIB   = -L. -lregina -ll
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DSYSV -DPROTO -D_XOPEN_SOURCE $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   = extcurs.o
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# SunOS 5.3 (Solaris 2.3) SparcCenter 2000 (with Regina)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = gcc
#CURSINC   =
#CURSLIB   = -lcurses
#REXXINC   = -I. -DUSE_REGINA
#REXXLIB   = -L. -lregina -ll -ldl
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DSYSVR4 -DPROTO $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
#DYNIX/ptx 4.0 Sequent 2000/700 (with Regina)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = cc
#CURSINC   =
#CURSLIB   = -lcurses
#REXXINC   = -I. -DUSE_REGINA
#REXXLIB   = -L. -lregina -ll -ldl
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DSYSVR4 -DPROTO $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# c89 compiler on System V systems eg AIX, Ultrix (no REXX)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = c89
#CURSINC   = 
#CURSLIB   = -lcurses
#REXXINC   = -DNOREXX
#REXXLIB   = 
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DSYSV -DPROTO -D_XOPEN_SOURCE $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# c89 compiler on HP/UX (with Regina 0.06a and above)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = c89
#CURSINC   = 
#CURSLIB   = -lcurses
#REXXINC   = -DUSE_REGINA
#REXXLIB   = -L. -lregina -ll -ldld
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DSYSV -DPROTO -D_XOPEN_SOURCE $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# c89 compiler on AIX - standard curses (with Regina 0.06a and above)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = c89
#CURSINC   = 
#CURSLIB   = -lcurses
#REXXINC   = -DUSE_REGINA -I../regina/src
#REXXLIB   = -L../regina/src -lregina -ll
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DSYSV -DPROTO -D_XOPEN_SOURCE $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   =
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# c89 compiler on AIX - extended curses (no REXX)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = c89
#CURSINC   = -DUSE_EXTCURSES
#CURSLIB   = -lcur
#REXXINC   = -DNOREXX
#REXXLIB   = 
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -g -DSYSV -DPROTO -D_XOPEN_SOURCE $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   = extcurs.o
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# c89 compiler on AIX using REXX/6000
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = c89
#CURSINC   = 
#CURSLIB   = -lcurses
#REXXINC   = -DUSE_AIXREXX
#REXXLIB   = -lrexx
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -g -DSYSV -DPROTO -D_XOPEN_SOURCE $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   = 
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# C compiler on BSD or BSDish systems eg. Linux, 386BSD (no REXX)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = cc
#CURSINC   = 
#CURSLIB   = -lcurses -ltermcap
#REXXINC   = -DNOREXX
#REXXLIB   = 
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DBSD $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   = bsd.o
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# C compiler on BSD or BSDish systems eg. Linux, 386BSD (using Regina)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = cc
#CURSINC   = 
#CURSLIB   = -lcurses -ltermcap
#REXXINC   = -DUSE_REGINA
#REXXLIB   = -L. -lregina
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DBSD $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   = bsd.o
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# C compiler under ATT System V R3.2 (no REXX)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = cc
#CURSINC   = 
#CURSLIB   = -lcurses
#REXXINC   = -DNOREXX
#REXXLIB   = 
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DATT -DSYSVR32 -DNO_RENAME $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   = 
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
# C compiler under SCO Xenix R2.3 (no REXX)
#########################################################################
#SRC       = .
#PROJ      = the
#OBJ       = o
#CC        = cc
#CURSINC   = 
#CURSLIB   = -lcurses -lx
#REXXINC   = -DNOREXX
#REXXLIB   = 
#INCLUDES  = $(CURSINC) $(REXXINC) -I$(SRC)
#CFLAGS    = -O -DNO_RENAME $(INCLUDES)
#LD        = $(CC) -o $(PROJ) $(OBJS) $(CURSLIB) $(REXXLIB)
#XTRAOBJ   = 
#MAN       = manext
#MANLD     = $(CC) -o $(MAN) manext.o
#CHMODTHE  = chmod 755 $(PROJ)
#CHMODMAN  = chmod 755 $(MAN)
#########################################################################
#
#
# Object files
#
OBJ1 = box.$(OBJ) column.$(OBJ) colour.$(OBJ) comm1.$(OBJ) comm2.$(OBJ) comm3.$(OBJ) comm4.$(OBJ) comm5.$(OBJ) \
	commset1.$(OBJ) commset2.$(OBJ) commsos.$(OBJ) cursor.$(OBJ) default.$(OBJ) \
	edit.$(OBJ) error.$(OBJ) execute.$(OBJ) linked.$(OBJ) nonansi.$(OBJ) \
	 prefix.$(OBJ) reserved.$(OBJ) scroll.$(OBJ) show.$(OBJ) sort.$(OBJ) \
	target.$(OBJ) the.$(OBJ) util.$(OBJ)
OBJ2 = commutil.$(OBJ)
OBJ3 = getch.$(OBJ)
OBJ4 = query.$(OBJ)
OBJ5 = fnmatch.$(OBJ)
OBJ6 = directry.$(OBJ) file.$(OBJ)
OBJ7 = rexx.$(OBJ)
OBJ8 = quercus.$(OBJ) norexx.$(OBJ)
OBJX = $(XTRAOBJ)
OBJS = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) $(OBJ8) $(OBJX)

COMM = $(SRC)/comm1.c $(SRC)/comm2.c $(SRC)/comm3.c $(SRC)/comm4.c $(SRC)/comm5.c \
	$(SRC)/commsos.c $(SRC)/commset1.c $(SRC)/commset2.c $(SRC)/query.c

APPENDIX = $(SRC)/appendix.1
GLOSSARY = $(SRC)/glossary

#
#########################################################################
$(PROJ):	$(OBJS)
	$(LD)
	$(BINDTHE)
	$(RCTHE)
	$(CHMODTHE)
#########################################################################
%.$(OBJ):$(SRC)/%.c
	$(CC) $(CFLAGS) -c $(SRC)/$*.c
#########################################################################
$(OBJ1):	$(SRC)/the.h $(SRC)/defines.h $(SRC)/proto.h
$(OBJ2):	$(SRC)/the.h $(SRC)/command.h $(SRC)/defines.h $(SRC)/proto.h $(SRC)/getch.h $(SRC)/key.h
$(OBJ3):	$(SRC)/getch.h $(SRC)/defines.h $(SRC)/proto.h
$(OBJ4):	$(SRC)/query.h $(SRC)/the.h $(SRC)/defines.h $(SRC)/proto.h
$(OBJ5):	$(SRC)/the.h $(SRC)/fnmatch.h
$(OBJ6):	$(SRC)/the.h $(SRC)/directry.h $(SRC)/defines.h $(SRC)/proto.h
$(OBJ7):	$(SRC)/the.h $(SRC)/rexx.h $(SRC)/proto.h $(SRC)/defines.h $(SRC)/query.h
$(OBJ8):	$(SRC)/the.h $(SRC)/rexx.h $(SRC)/defines.h $(SRC)/rexxfill.h
#
#########################################################################
quickref:	$(MAN) $(COMM) 
	manext -q $(COMM) > the.qrf
#
#########################################################################
manual:	$(MAN) $(SRC)/overview $(COMM) $(APPENDIX) $(GLOSSARY)
	manext $(SRC)/overview $(COMM) $(APPENDIX) $(GLOSSARY) > the.man
#
$(MAN):	$(XTRAOBJ) manext.$(OBJ)
	$(MANLD)
	$(CHMODMAN)
#########################################################################
zipsrc:
	-cp src.diz file_id.diz
	zip  thesrc$(VER) COPYING readme.src readme.exc overview appendix.1 glossary the.his
	zip  thesrc$(VER) box.c bsd.c colour.c comm*.c cursor.c default.c directry.c 
	zip  thesrc$(VER) edit.c error.c norexx.c scroll.c column.c execute.c
	zip  thesrc$(VER) extcurs.c file.c fnmatch.c getch.c getopt.c linked.c
	zip  thesrc$(VER) nonansi.c os2eas.c prefix.c quercus.c query.c reserved.c
	zip  thesrc$(VER) rexx.c show.c sort.c target.c the.c trace.c util.c vax.c
	zip  thesrc$(VER) command.h defines.h directry.h fnmatch.h getch.h
	zip  thesrc$(VER) key.h query.h proto.h rexxfill.h rexx.h the.h
	zip  thesrc$(VER) manext.c *.hlp *.rsp *.def *.diz makefile files.rcs icons.zip the.res the.rc
	zip  thesrc$(VER) append.the comm.the uncomm.the total.the match.the rm.the words.the l.the compile.the
	-rm file_id.diz
#########################################################################
tarsrc:
	-cp src.diz file_id.diz
	tar cvf thesrc$(VER).tar COPYING readme.src readme.exc overview appendix.1 glossary the.his \
	box.c bsd.c colour.c column.c comm*.c cursor.c default.c directry.c edit.c \
	error.c execute.c extcurs.c file.c fnmatch.c getch.c getopt.c \
	linked.c nonansi.c os2eas.c prefix.c quercus.c query.c reserved.c norexx.c \
	rexx.c show.c sort.c target.c the.c trace.c util.c vax.c scroll.c \
	command.h defines.h directry.h fnmatch.h getch.h \
	key.h query.h proto.h rexxfill.h rexx.h the.h \
	manext.c *.hlp *.rsp *.def *.diz makefile files.rcs icons.zip the.res the.rc \
	append.the comm.the uncomm.the total.the match.the rm.the words.the l.the compile.the
	compress thesrc$(VER).tar
	-rm file_id.diz
#########################################################################
zipdos:
	+copy d:\tools\the.exe .
	+copy dos.diz file_id.diz
	zip  thedos$(VER).zip COPYING readme.exc file_id.diz the.exe
	zip  thedos$(VER).zip the.man the.his dos.hlp
	zip  thedos$(VER).zip append.the comm.the uncomm.the total.the match.the rm.the words.the l.the compile.the
	+del the.exe
	+del file_id.diz
#########################################################################
zipgo32:
	+copy c:\the\dos\go32\the.exe
	+copy d:\djgpp\bin\go32.exe
	+copy dosgo32.diz file_id.diz
	zip  thedjg$(VER).zip COPYING readme.exc file_id.diz the.exe go32.exe
	zip  thedjg$(VER).zip the.man the.his dos.hlp 
	zip  thedjg$(VER).zip append.the comm.the uncomm.the total.the match.the rm.the words.the l.the compile.the
	+del the.exe
	+del go32.exe
	+del file_id.diz
#########################################################################
zipos2:
	+copy f:\usr\bin\the.exe .
	+copy os2.diz file_id.diz
	zip  theos2$(VER).zip COPYING readme.exc file_id.diz the.exe
	zip  theos2$(VER).zip the.man the.his os2.hlp theos2.ico
	zip  theos2$(VER).zip append.the comm.the uncomm.the total.the match.the rm.the words.the l.the compile.the
	+del the.exe
	+del file_id.diz
#########################################################################
zipexe:
	+copy f:\usr\bin\the.exe theos2.exe
	+copy d:\tools\the.exe thedos.exe
	zip  theexe$(VER).zip COPYING readme.exc thedos.exe theos2.exe
	zip  theexe$(VER).zip the.man the.his dos.hlp os2.hlp icons.zip
	zip  theexe$(VER).zip append.the comm.the uncomm.the total.the match.the rm.the words.the l.the compile.the
	+del thedos.exe
	+del theos2.exe
#########################################################################
