#       Program:        nmake                      15 May 1989
#       Author:         Andrew H. Derbyshire
#                       P. O. Box 132
#                       Arlington, MA 02174
#       Function:       Build UUPC/extended from source files
#       Processor:      Microsoft nmake
#       External files: MASM            (8088 Assembler)
#                       CL              (Microsoft C 6.0 compiler)
#                       LINK or         (MS-DOS Linker)
#                       LINK386         (OS/2 Linker)
#                       Input source files.
#
#       Copyright (c) 1990-1993 by Kendra Electronic Wonderworks;
#       all rights reserved except those explicitly granted by
#       the UUPC/extended license.
#
#       nmk /nologo /s /f nmake installR
#       nmk /nologo /s /f nmake installP
#
#       $Id: NMAKE 1.18 1993/04/17 13:40:13 ahd Exp $
#
#       $Log: NMAKE $
#         Revision 1.18  1993/04/17  13:40:13  ahd
#         Fix win/32 header build
#
#         Revision 1.17  1993/04/16  13:11:15  dmwatt
#         Build win/nt header file less often
#
#         Revision 1.16  1993/04/16  12:55:11  dmwatt
#         Add support for special Win/NT version id header
#
#         Revision 1.15  1993/04/14  02:42:33  ahd
#         Fix uucp target name for Windows/NT
#
#         Revision 1.14  1993/04/14  00:44:19  ahd
#         Drop use of FMT from ZIP file build
#         Add Windows/NT zip file build
#         Add credit for Dave and Windows/NT Build
#
#         Revision 1.13  1993/04/10  21:24:27  dmwatt
#         Add Windows/NT support
#
#    Revision 1.11  1993/04/05  12:25:39  ahd
#    Clean up .def files
#
#    Revision 1.10  1993/04/05  04:31:27  ahd
#    HPFS support (module definition files)
#
#    Revision 1.9  1993/04/04  04:55:31  ahd
#    Add uunamep.exe to testp: build
#
#    Revision 1.8  1993/03/24  01:57:13  ahd
#    rn support
#
#    Revision 1.7  1993/03/06  22:47:10  ahd
#    Generic build, including rn.exe
#
#    Revision 1.6  1993/01/23  19:07:01  ahd
#    Revise alias
#
#    Revision 1.5  1992/12/04  00:58:57  ahd
#    Add sysalias to rmail build
#
#    Revision 1.5  1992/12/04  00:58:57  ahd
#    Add sysalias to rmail build
#
#    Revision 1.4  1992/11/29  22:12:36  ahd
#    Correct TMP directory to TEMP
#    Add installation of OS/2 CMD files from RCS source directory
#    Change copyright message
#    Add build for TESTULIB.EXE
#
#    Revision 1.3  1992/11/27  14:37:55  ahd
#    Add scrsize() to library build
#
#    Revision 1.2  1992/11/22  21:04:42  ahd
#    Add normalize() to build

.SUFFIXES: .c .asm .zip .obj

# *--------------------------------------------------------------------*
# *     Note:   By default, this file generates code for 80286         *
# *             systems and above.  If you are generating              *
# *             UUPC/extended for a 8088 system, remove the /G2        *
# *             option from the CCOPT= line, below                     *
# *--------------------------------------------------------------------*

# *--------------------------------------------------------------------*
# *   Our release number.  This is updated each time we ship it        *
# *   out to some unsuspecting user, or sometimes when we do a         *
# *   major fix even if we don't ship it out to the lusers.  ANY       *
# *   VERSION NOT DONE ON kendra SHOULD BE TAGGED AS N.NNAm, WHERE     *
# *   N.NNA IS THE NUMBER UUPC was shipped as, and 'm' any string      *
# *   to indentify your special version.  Just upping the              *
# *   distributed version number will confuse you AND me.              *
# *--------------------------------------------------------------------*

VERS = 1.11y

# *--------------------------------------------------------------------*
# *   The memory model to be built.  (Ignored by 32 bit compilers)     *
# *--------------------------------------------------------------------*

MODEL   = M

# *--------------------------------------------------------------------*
# *                  Windows NT generic make include file              *
# *--------------------------------------------------------------------*

!IFDEF WINNT
!include <ntwin32.mak>
!ENDIF

# *--------------------------------------------------------------------*
# *   Various directories.  The TEMP directory is not defined here;    *
# *   rather we expect it to be defined as part of the user's          *
# *   environment variables                                            *
# *--------------------------------------------------------------------*

SRC     = .
MAIL    = $(SRC)\mail
UTIL    = $(SRC)\util
UUCP    = $(SRC)\uucp
RNEWS   = $(SRC)\rnews
LIBX    = $(SRC)\lib
TEST    = $(SRC)\test
UUCICO  = $(SRC)\uucico

!IFDEF WINNT
OBJ     = .
!ELSE
OBJ     = $(SRC)\msobj$(MODEL)
!ENDIF

SBR     = $(SRC)\sbr
PRODP   = \uupc\os2bin
PRODR   = \uupc\bin
PRODN   = \uupc\ntbin
!IFDEF WINNT
MSLIB   = \mstools\lib
!ELSE
MSLIB   = \c600\lib
!ENDIF
SCRIPTS = $(SRC)\scripts

DEFFILE = $(TEMP)\$(@B).def

# *--------------------------------------------------------------------*
# *                        Various file names                          *
# *--------------------------------------------------------------------*

WNTZIPVA = $(SRC)\$(VERS)\uupcw32a.zip
WNTZIPVB = $(SRC)\$(VERS)\uupcw32b.zip
WNTZIPVC = $(SRC)\$(VERS)\uupcw32c.zip
OS2ZIPV2 = $(SRC)\$(VERS)\uupcos22.zip
OS2ZIPV3 = $(SRC)\$(VERS)\uupcos23.zip
OS2ZIPV4 = $(SRC)\$(VERS)\uupcos24.zip
LIBCOMM  = $(TEMP)\$(MODEL)uupcmsc.lib
LIBNT    = $(TEMP)\uupcnt.lib
LIBOS2   = $(TEMP)\$(MODEL)uupcos2.lib
LIBDOS   = $(TEMP)\$(MODEL)uupcdos.lib
WORKFILE = $(TEMP)\UUPCTEMP.TMP

# *--------------------------------------------------------------------*
# *         Library names; season to taste and configuration           *
# *--------------------------------------------------------------------*

NTLIBS=$(MSLIB)\libc.lib $(LIBCOMM) $(LIBNT) $(conlibs) ADVAPI32.LIB
OS2LIBS=$(MSLIB)\$(MODEL)libcep+$(LIBCOMM)+$(LIBOS2)+$(MSLIB)\os2
DOSLIBS=$(MSLIB)\$(MODEL)libce+$(LIBCOMM)+$(LIBDOS)

# *--------------------------------------------------------------------*
# *        The names of various object files that we create.           *
# *--------------------------------------------------------------------*

TIMESTMP = $(OBJ)\timestmp.obj
LIBLIST = $(OBJ)\active.obj \
          $(OBJ)\arbmath.obj $(OBJ)\arpadate.obj $(OBJ)\bugout.obj\
          $(OBJ)\chdir.obj $(OBJ)\checkptr.obj $(OBJ)\configur.obj\
          $(OBJ)\catcher.obj $(OBJ)\dater.obj $(OBJ)\expath.obj\
          $(OBJ)\export.obj $(OBJ)\filebkup.obj $(OBJ)\fopen.obj $(OBJ)\getargs.obj\
          $(OBJ)\getopt.obj $(OBJ)\getseq.obj $(OBJ)\hostable.obj\
          $(OBJ)\importng.obj $(OBJ)\dos2unix.obj\
          $(OBJ)\hostatus.obj $(OBJ)\hostrset.obj $(OBJ)\import.obj\
          $(OBJ)\kanjicnv.obj $(OBJ)\lock.obj $(OBJ)\logger.obj\
          $(OBJ)\mkdir.obj $(OBJ)\mkfilenm.obj $(OBJ)\mkmbox.obj\
          $(OBJ)\mktempnm.obj $(OBJ)\normaliz.obj $(OBJ)\printmsg.obj\
          $(OBJ)\pushpop.obj $(OBJ)\readnext.obj $(OBJ)\rename.obj\
          $(OBJ)\security.obj $(OBJ)\stater.obj $(OBJ)\strpool.obj\
          $(OBJ)\usertabl.obj $(OBJ)\validcmd.obj $(TIMESTMP)

LIBDOSLIST= $(OBJ)\ndir.obj $(OBJ)\printerr.obj $(OBJ)\ssleep.obj\
            $(OBJ)\getdta.obj $(OBJ)\safeio.obj $(OBJ)\safeout.obj\
            $(OBJ)\scrsize.obj
LIBOS2LIST= $(OBJ)\ndiros2.obj $(OBJ)\printerr.obj $(OBJ)\ssleep2.obj\
            $(OBJ)\safeio2.obj $(OBJ)\safeout2.obj $(OBJ)\scrsize2.obj

LIBNTLIST=  $(OBJ)\ndirnt.obj $(OBJ)\printerr.obj $(OBJ)\ssleep.obj\
            $(OBJ)\safeio.obj $(OBJ)\safeout.obj $(OBJ)\scrsiznt.obj\
            $(OBJ)\setstdin.obj

# *--------------------------------------------------------------------*
# *             Object file lists for specific programs                *
# *--------------------------------------------------------------------*

MAILCOMOBJ = $(OBJ)\mail.obj $(OBJ)\address.obj $(OBJ)\mailblib.obj\
          $(OBJ)\maillib.obj $(OBJ)\mailsend.obj \
          $(OBJ)\alias.obj

MAILROBJ  = $(MAILCOMOBJ) $(OBJ)\mlib.obj
MAILPOBJ  = $(MAILCOMOBJ) $(OBJ)\mlib2.obj
MAILNOBJ  = $(MAILCOMOBJ) $(OBJ)\mlib.obj

UUCPOBJ = $(OBJ)\address.obj $(OBJ)\uucp.obj

RNEWSOBJ = $(OBJ)\rnews.obj $(OBJ)\history.obj
EXPIREOBJ = $(OBJ)\expire.obj

RMAILCOMOBJ = $(OBJ)\address.obj $(OBJ)\rmail.obj $(OBJ)\sysalias.obj

RMAILPOBJ  = $(RMAILCOMOBJ) $(OBJ)\deliver2.obj
RMAILROBJ  = $(RMAILCOMOBJ) $(OBJ)\deliver.obj
RMAILNOBJ  = $(RMAILCOMOBJ) $(OBJ)\deliver.obj

UUCICOOBJ1 = $(OBJ)\checktim.obj $(OBJ)\dcp.obj $(OBJ)\dcpfpkt.obj \
             $(OBJ)\dcpgpkt.obj $(OBJ)\dcplib.obj $(OBJ)\dcpstats.obj\
             $(OBJ)\dcpsys.obj $(OBJ)\dcpxfer.obj
UUCICOOBJ2 = $(OBJ)\modem.obj $(OBJ)\script.obj $(OBJ)\uucico.obj
UUCICOPOBJ3 = $(OBJ)\nbstime2.obj $(OBJ)\ulibos2.obj
UUCICOROBJ3 = $(OBJ)\nbstime.obj  $(OBJ)\ulib.obj $(OBJ)\commfifo.obj
UUCICONOBJ3 = $(OBJ)\nbstime.obj $(OBJ)\ulibos2.obj

RNOBJ1=$(OBJ)\addng.obj $(OBJ)\art.obj $(OBJ)\artio.obj $(OBJ)\artsrch.obj\
       $(OBJ)\backpage.obj $(OBJ)\bits.obj $(OBJ)\cheat.obj $(OBJ)\final.obj
RNOBJ2=$(OBJ)\head.obj $(OBJ)\help.obj $(OBJ)\init.obj $(OBJ)\intrp.obj\
       $(OBJ)\kfile.obj $(OBJ)\last.obj $(OBJ)\ng.obj $(OBJ)\ngdata.obj
RNOBJ3=$(OBJ)\ngsrch.obj $(OBJ)\ngstuff.obj $(OBJ)\only.obj $(OBJ)\rcln.obj\
       $(OBJ)\rcstuff.obj $(OBJ)\respond.obj $(OBJ)\rn.obj $(OBJ)\search.obj\
       $(OBJ)\sw.obj $(OBJ)\term.obj $(OBJ)\util.obj $(OBJ)\uudecode.obj \
       $(OBJ)\rnpclib.obj
RNOBJ=$(RNOBJ1) $(RNOBJ2) $(RNOBJ3)

NEWSETUPOBJ=$(OBJ)\newsetup.obj $(OBJ)\rnlib.obj

UUSUBOBJ = $(OBJ)\uusub.obj

UUSTATOBJ = $(OBJ)\uustat.obj

UUXQTOBJ = $(OBJ)\uuxqt.obj

UUXOBJ = $(OBJ)\uux.obj

POLLNOBJ  = $(OBJ)\uupoll.obj
POLLPOBJ  = $(OBJ)\uupoll2.obj
POLLROBJ  = $(OBJ)\uupoll.obj

# *--------------------------------------------------------------------*
# *      Lists of programs to built for various pseudo targets         *
# *--------------------------------------------------------------------*

EXECR   = mailr.exe rmailr.exe rnewsr.exe\
          uupollr.exe uucicor.exe uucpr.exe\
          uusubr.exe uustatr.exe uuxqtr.exe uuxr.exe
EXECP   = mailp.exe rmailp.exe rnewsp.exe\
          uupollp.exe uucicop.exe uucpp.exe\
          uusubp.exe uustatp.exe uuxqtp.exe uuxp.exe
EXECN   = mailn.exe rmailn.exe rnewsn.exe\
          uupolln.exe uucicon.exe uucpn.exe\
          uusubn.exe uustatn.exe uuxqtn.exe uuxn.exe


ICONS   = $(PRODP)\mail.ico $(PRODP)\uucico.ico
INSTALLP = $(INSTALLP2) $(INSTALLP3) $(INSTALLP4) $(INSTALLPS)
INSTALLR = $(PRODR)\mail.exe $(PRODR)\rmail.exe $(PRODR)\rnews.exe\
          $(PRODR)\uupoll.exe $(PRODR)\uucico.exe $(PRODR)\uucp.exe\
          $(PRODR)\uusub.exe $(PRODR)\uuxqt.exe $(PRODR)\uux.exe\
          $(PRODR)\uustat.exe  $(PRODR)\rn.exe $(PRODR)\newsetup.exe

INSTALLP2= $(PRODP)\mail.exe $(PRODP)\rmail.exe $(PRODP)\uucico.exe\
          $(PRODP)\uuxqt.exe
INSTALLP3= $(PRODP)\uucp.exe $(PRODP)\uuname.exe $(PRODP)\uupoll.exe\
          $(PRODP)\uustat.exe $(PRODP)\uusub.exe\
          $(PRODP)\uux.exe $(FMT) $(PRODP)\gensig.exe $(PRODP)\novrstrk.exe \
          $(PRODP)\su.cmd $(PRODP)\uuio.cmd $(PRODP)\uuclean.cmd\
          $(PRODP)\waiting.cmd $(PRODP)\mailchek.cmd
INSTALLP4= $(PRODP)\rnews.exe $(PRODP)\expire.exe
#         $(PRODP)\rn.exe $(PRODP)\newsetup.exe

INSTALLN2= $(PRODN)\mail.exe $(PRODN)\rmail.exe $(PRODN)\uucico.exe\
          $(PRODN)\uuxqt.exe
INSTALLN3= $(PRODN)\uucp.exe $(PRODN)\uuname.exe $(PRODN)\uupoll.exe\
          $(PRODN)\uustat.exe $(PRODN)\uusub.exe\
          $(PRODN)\uux.exe $(FMT) $(PRODN)\gensig.exe $(PRODN)\novrstrk.exe \
          $(PRODN)\su.bat $(PRODN)\uuio.bat $(PRODN)\uuclean.bat\
          $(PRODN)\waiting.bat
INSTALLN4= $(PRODN)\rnews.exe $(PRODN)\expire.exe
#         $(PRODN)\rn.exe $(PRODN)\newsetup.exe

# *--------------------------------------------------------------------*
# *   Source browser files; because of space limitations, these        *
# *   are not always generated unless you change the C compiler        *
# *   options.                                                         *
# *--------------------------------------------------------------------*

# *--------------------------------------------------------------------*
# *     This needs to be expanded too *all* the OBJ files ... but      *
# *     not today, as the Wonderworks doesn't use it.                  *
# *--------------------------------------------------------------------*
SBRS = $(LIBDOSLIST:obj=sbr)

# *--------------------------------------------------------------------*
# *                   Anf, of course, our makefile                     *
# *--------------------------------------------------------------------*

MAKEFILE = $(SRC)\nmake

# *--------------------------------------------------------------------*
# *      Define the linker used and the options related to it.         *
# *--------------------------------------------------------------------*

#       Could use link386 under OS/2 2.0, but doesn't work if cross
#       compiled to older OS/2 1.3 system.

!IFDEF WINNT
LINKER = $(link)
!ELSE
LINKER  = link
!ENDIF

LINKPOPT = /exepack /far /noignorecase /nod /batch

LINKNOPT = $(conflags) $(ldebug)

#       No /exepack under DOS, DOS 5 can be confused by it.
LINKROPT = /batch /far /noignorecase /stack:30000

# *--------------------------------------------------------------------*
# *                     Microsoft Assembler name                       *
# *--------------------------------------------------------------------*

MASM    = masm.exe

#MASMOPTS = /DUUPC /DDEBUG /n /v /t /z /W2 /ZD /Mx
MASMOPTS = /DUUPC /n /v /t /z /W2 /ZI /ZD /Mx

# *--------------------------------------------------------------------*
# *                      C compiler and options                        *
# *--------------------------------------------------------------------*

# *--------------------------------------------------------------------*
# *   Add /Zi for Codeview debugging information, and change the       *
# *   /exepack option to /codeview on the linker options (above).      *
# *                                                                    *
# *   Add /FR$(SBR)\$(@B).sbr to generate source browser files.        *
# *   (I had to delete the this because of space considerations        *
# *   on kendra.)                                                      *
# *                                                                    *
# *   Also, delete /Ocegilt (optimizer options) and /Gs (no stack      *
# *   overflow checking) if debugging and having problems.  Note       *
# *   stack overflow *is* checked in printmsg(), which is called       *
# *   by most if not all deep routines.                                *
# *                                                                    *
# *   Delete the /G2 if building for an 8086 based system.             *
# *--------------------------------------------------------------------*

!IFNDEF WINNT
CC      = cl
# CC is defined in ntwin32.mak, so no need for an ELSE clause here
!ENDIF


!IFDEF WINNT
CCOPT   = $(cflags) $(cvars) -I$(LIBX)

{lib}.c.obj:
        $(CC) $(CCOPT) $<

{mail}.c.obj:
        $(CC) $(CCOPT) $<

{rn}.c.obj:
        $(CC) $(CCOPT) $<

{rnews}.c.obj:
        $(CC) $(CCOPT) $<

{test}.c.obj:
        $(CC) $(CCOPT) $<

{uucico}.c.obj:
        $(CC) $(CCOPT) $<

{uucp}.c.obj:
        $(CC) $(CCOPT) $<

{util}.c.obj:
        $(CC) $(CCOPT) $<

!ELSE

#       Use this CCOPT for debugging; the /FR is optional.
#CCOPT   = /I$(LIBX) /A$(MODEL) /c /W4 /nologo /G2 /Fo$@ /Od /FR$(SBR)\$(@B).sbr /Zi /Or /DUDEBUG /DFAMILY

#       Use this CCOPT for productiom (/DFAMILY for OS/2 only)
CCOPT   = /I$(LIBX) /A$(MODEL) /c /W4 /nologo /G2 /Fo$@ /Ocegilt

{lib}.c{$(OBJ)}.obj:
        $(CC) $(CCOPT) $<

{mail}.c{$(OBJ)}.obj:
        $(CC) $(CCOPT) $<

{rn}.c{$(OBJ)}.obj:
        $(CC) $(CCOPT) /W3 $<

{rnews}.c{$(OBJ)}.obj:
        $(CC) $(CCOPT) $<

{test}.c{$(OBJ)}.obj:
        $(CC) $(CCOPT) $<

{uucico}.c{$(OBJ)}.obj:
        $(CC) $(CCOPT) $<

{uucp}.c{$(OBJ)}.obj:
        $(CC) $(CCOPT) $<

{util}.c{$(OBJ)}.obj:
        $(CC) $(CCOPT) $<
!ENDIF

# *--------------------------------------------------------------------*
# *     Phil Katz's PKZIP, for creating the distributed archive        *
# *--------------------------------------------------------------------*

ZIP     = pkzip

# *--------------------------------------------------------------------*
# *                Begin rules for building modules.                   *
# *--------------------------------------------------------------------*

# *--------------------------------------------------------------------*
# *        The first definition is the one built by default.           *
# *--------------------------------------------------------------------*

# *--------------------------------------------------------------------*
# *   testp builds the basic OS/2 UUPC modules in the source           *
# *   directory.                                                       *
# *--------------------------------------------------------------------*

!IFDEF WINNT
testN:  $(OBJ) mailn.exe rmailn.exe uucicon.exe\
        uupolln.exe uucpn.exe uusubn.exe uustatn.exe uuxn.exe uuxqtn.exe\
        uunamen.exe gensign.exe expiren.exe rnewsn.exe rnn.exe newsetpn.exe
        - del $(LIBCOMM)
        - del $(LIBOS2)
!ELSE
testP:  $(OBJ) mailp.exe rmailp.exe uucicop.exe\
        uupollp.exe uucpp.exe uusubp.exe uustatp.exe uuxp.exe uuxqtp.exe\
        uunamep.exe gensigp.exe expirep.exe rnewsp.exe rnp.exe newsetpp.exe
        - del $(LIBCOMM)
        - del $(LIBOS2)
!ENDIF

# *--------------------------------------------------------------------*
# *   testr builds the basic MS-DOS UUPC modules in the source         *
# *   directory.                                                       *
# *--------------------------------------------------------------------*

testR:  $(OBJ) expirer.exe mailr.exe rmailr.exe rnewsr.exe uucicor.exe\
        uupollr.exe uucpr.exe\
        uusubr.exe uustatr.exe uuxr.exe uuxqtr.exe \
        gensigr.exe rnr.exe newsetpr.exe
        - del $(LIBCOMM)
        - del $(LIBDOS)

# *--------------------------------------------------------------------*
# *   Prod build the basic modules and then moves them to $(PROD)      *
# *--------------------------------------------------------------------*

prodn:  $(OBJ) $(INSTALLN) regen
        - del $(LIBCOMM)
        - del $(LIBNT)


prodp:  $(OBJ) $(INSTALLP) regen
        - del $(LIBCOMM)
        - del $(LIBOS2)


prodr:  $(OBJ) $(INSTALLR)
        - del $(LIBCOMM)
        - del $(LIBOS2)

installn:  $(OBJ) $(INSTALLN) $(WNTZIPVA) $(WNTZIPVB)  $(WNTZIPVC)
        - del $(LIBCOMM)
        - del $(LIBNT)

installp:  $(OBJ) $(INSTALLP) $(OS2ZIPV2) $(OS2ZIPV3)  $(OS2ZIPV4)
        - del $(LIBCOMM)
        - del $(LIBOS2)

installr:  prodr

!IFDEF WINNT
zip:    installn
!ELSE
zip:    installp
!ENDIF

# *--------------------------------------------------------------------*
# *          Do a purge of various temporary output files.             *
# *--------------------------------------------------------------------*

clean:  xclean
        - del $(SRC)\*.bak
        - del *.map
        - del $(WORKFILE)

# *--------------------------------------------------------------------*
# *      Do a clean of just executable files and related files.        *
# *--------------------------------------------------------------------*

xclean:
        - del $(OBJ)\*.obj
        - del $(OBJ)\*.exe
        - del $(TEMP)\*.lib
        - del $(SRC)\*.obj
        - del $(SRC)\*.exe
        - del $(SBR)\*.sbr

# *--------------------------------------------------------------------*
# *             Read mode (DOS) production executables                 *
# *--------------------------------------------------------------------*

$(PRODR)\expire.exe: expirer.exe
        - del $@
        move $? $@

$(PRODR)\mail.exe: mailr.exe
        - del $@
        move $? $@

$(PRODR)\rmail.exe: rmailr.exe
        - del $@
        move $? $@

$(PRODR)\rnews.exe: rnewsr.exe
        - del $@
        move $? $@

$(PRODR)\uucp.exe: uucpr.exe
        - del $@
        move $? $@

$(PRODR)\uucico.exe: uucicor.exe
        - del $@
        move $? $@

$(PRODR)\uupoll.exe: uupollr.exe
        - del $@
        move $? $@

$(PRODR)\uusub.exe: uusubr.exe
        - del $@
        move $? $@

$(PRODR)\uustat.exe: uustatr.exe
        - del $@
        move $? $@

$(PRODR)\uuxqt.exe: uuxqtr.exe
        - del $@
        move $? $@

$(PRODR)\uux.exe: uuxr.exe
        - del $@
        move $? $@

$(PRODP)\rn.exe: rnp.exe
        - del $@
        move $? $@

$(PRODR)\rn.exe: rnr.exe
        - del $@
        move $? $@

$(PRODP)\newsetup.exe: newsetpp.exe
        - del $@
        move $? $@

$(PRODR)\newsetup.exe: newsetpr.exe
        - del $@
        move $? $@

# *--------------------------------------------------------------------*
# *             Protected mode (OS/2) production modules               *
# *--------------------------------------------------------------------*

$(PRODP)\expire.exe: expirep.exe
        - del $@
        move $? $@

$(PRODP)\fmt.exe: fmtp.exe
        - del $@
        move $? $@

$(PRODP)\gensig.exe: gensigp.exe
        - del $@
        move $? $@

$(PRODR)\gensig.exe: gensigr.exe
        - del $@
        move $? $@

$(PRODP)\mail.exe: mailp.exe
        - del $@
        move $? $@

$(PRODP)\novrstrk.exe: novrstrp.exe
        - del $@
        move $? $@

$(PRODP)\rmail.exe: rmailp.exe
        - del $@
        move $? $@

$(PRODP)\rnews.exe: rnewsp.exe
        - del $@
        move $? $@

$(PRODP)\uucp.exe: uucpp.exe
        - del $@
        move $? $@

$(PRODP)\uucico.exe: uucicop.exe
        - del $@
        move $? $@

$(PRODP)\uupoll.exe: uupollp.exe
        - del $@
        move $? $@

$(PRODP)\uusub.exe: uusubp.exe
        - del $@
        move $? $@

$(PRODP)\uustat.exe: uustatp.exe
        - del $@
        move $? $@

$(PRODP)\uuxqt.exe: uuxqtp.exe
        - del $@
        move $? $@

$(PRODP)\uux.exe: uuxp.exe
        - del $@
        move $? $@

$(PRODP)\uuname.exe: uunamep.exe
        - del $@
        move $? $@

$(PRODP)\uuio.cmd: $(SCRIPTS)\uuio.cmd
        copy $? $@

$(PRODP)\waiting.cmd: $(SCRIPTS)\waiting.cmd
        copy $? $@

$(PRODP)\su.cmd: $(SCRIPTS)\su.cmd
        copy $? $@

$(PRODP)\mailchek.cmd: $(SCRIPTS)\mailchek.cmd
        copy $? $@

$(PRODP)\uuclean.cmd: $(SCRIPTS)\uuclean.cmd
        copy $? $@

# *--------------------------------------------------------------------*
# *       Protected mode (Windows/NT) production modules               *
# *--------------------------------------------------------------------*

$(PRODN)\expire.exe: expiren.exe
        - del $@
        move $? $@

$(PRODN)\fmt.exe: fmtn.exe
        - del $@
        move $? $@

$(PRODN)\gensig.exe: gensign.exe
        - del $@
        move $? $@

$(PRODR)\gensig.exe: gensigr.exe
        - del $@
        move $? $@

$(PRODN)\mail.exe: mailn.exe
        - del $@
        move $? $@

$(PRODN)\novrstrk.exe: novrstrn.exe
        - del $@
        move $? $@

$(PRODN)\rmail.exe: rmailn.exe
        - del $@
        move $? $@

$(PRODN)\rnews.exe: rnewsn.exe
        - del $@
        move $? $@

$(PRODN)\uucp.exe: uucpn.exe
        - del $@
        move $? $@

$(PRODN)\uucico.exe: uucicon.exe
        - del $@
        move $? $@

$(PRODN)\uupoll.exe: uupolln.exe
        - del $@
        move $? $@

$(PRODN)\uusub.exe: uusubn.exe
        - del $@
        move $? $@

$(PRODN)\uustat.exe: uustatn.exe
        - del $@
        move $? $@

$(PRODN)\uuxqt.exe: uuxqtn.exe
        - del $@
        move $? $@

$(PRODN)\uux.exe: uuxn.exe
        - del $@
        move $? $@

$(PRODN)\uuname.exe: uunamen.exe
        - del $@
        move $? $@

$(PRODN)\uuio.bat: $(SCRIPTS)\uuio.bat
        copy $? $@

$(PRODN)\waiting.bat: $(SCRIPTS)\waiting.bat
        copy $? $@

$(PRODN)\su.bat: $(SCRIPTS)\su.bat
        copy $? $@

$(PRODN)\mailchek.bat: $(SCRIPTS)\mailchek.bat
        copy $? $@

$(PRODN)\uuclean.bat: $(SCRIPTS)\uuclean.bat
        copy $? $@

# *--------------------------------------------------------------------*
# *               The commands to actually link files                  *
# *--------------------------------------------------------------------*

expiren.exe: $(EXPIREOBJ) $(LIBCOMM) $(LIBNT)
        $(LINKER) $(LINKNOPT) /OUT:$@ $(EXPIREOBJ) $(NTLIBS)

expirep.exe: $(DEFFILE) $(EXPIREOBJ) $(LIBCOMM) $(LIBOS2)
        $(LINKER) $(LINKPOPT) @<<
$(EXPIREOBJ)
$@,NUL,$(OS2LIBS)
$(DEFFILE)
<<

expirer.exe:     $(EXPIREOBJ)  $(LIBCOMM) $(LIBDOS)
        $(LINKER) $(LINKROPT) @<<
$(EXPIREOBJ)
$@,NUL,$(DOSLIBS);
<<

fmtn.exe: $(OBJ)\fmt.obj $(LIBCOMM) $(LIBNT)
        $(LINKER) $(LINKNOPT) /OUT:$@ $(OBJ)\fmt.obj $(NTLIBS)

fmtp.exe: $(DEFFILE) $(OBJ)\fmt.obj $(LIBCOMM) $(LIBOS2)
        $(LINKER) $(LINKPOPT) @<<
$(OBJ)\fmt.obj
$@,NUL,$(OS2LIBS)
$(DEFFILE)
<<

gensign.exe: $(OBJ)\gensig.obj $(LIBCOMM) $(LIBNT)
        $(LINKER) $(LINKNOPT) /OUT:$@ $(OBJ)\gensig.obj $(NTLIBS)

gensigp.exe:     $(DEFFILE) $(OBJ)\gensig.obj $(LIBCOMM) $(LIBOS2)
        $(LINKER) $(LINKPOPT) @<<
$(OBJ)\gensig.obj
$@,NUL,$(OS2LIBS)
$(DEFFILE)
<<

gensigr.exe:     $(OBJ)\gensig.obj $(LIBCOMM) $(LIBDOS)
        $(LINKER) $(LINKROPT) @<<
$(OBJ)\gensig.obj
$@,NUL,$(DOSLIBS);
<<

novrstrn.exe: $(OBJ)\novrstrk.obj $(LIBCOMM) $(LIBNT)
        $(LINKER) $(LINKNOPT) /OUT:$@ $(OBJ)\novrstrk.obj $(NTLIBS)

novrstrp.exe:     $(DEFFILE) $(OBJ)\novrstrk.obj $(LIBCOMM) $(LIBOS2)
        $(LINKER) $(LINKPOPT) @<<
$(OBJ)\novrstrk.obj
$@,NUL,$(OS2LIBS)
$(DEFFILE)
<<

mailn.exe: $(MAILNOBJ) $(LIBCOMM) $(LIBNT)
        $(LINKER) $(LINKNOPT) /OUT:$@ $(NTLIBS) $(MAILNOBJ)

mailp.exe:         $(DEFFILE) $(MAILPOBJ) $(LIBCOMM) $(LIBOS2)
        $(LINKER) $(LINKPOPT) @<<
$(MAILPOBJ)
$@,NUL,$(OS2LIBS)
$(DEFFILE)
<<

mailr.exe:     $(MAILROBJ) $(LIBCOMM) $(LIBDOS)
        $(LINKER) $(LINKROPT) @<<
$(MAILROBJ)
$@,NUL,$(DOSLIBS);
<<

newsetpn.exe: $(NEWSETUPOBJ) $(LIBCOMM) $(LIBNT)
        $(LINKER) $(LINKNOPT) /OUT:$@ $(NEWSETUPOBJ) $(NTLIBS)

newsetpp.exe:     $(DEFFILE) $(NEWSETUPOBJ) $(LIBCOMM) $(LIBOS2)
        $(LINKER) $(LINKPOPT) @<<
$(NEWSETUPOBJ)
$@,NUL,$(OS2LIBS)
$(DEFFILE)
<<

newsetpr.exe:        $(NEWSETUPOBJ) $(LIBCOMM) $(LIBDOS)
        $(LINKER) $(LINKROPT) @<<
$(NEWSETUPOBJ)
$@,NUL,$(DOSLIBS);
<<

rnn.exe: $(RNOBJ) $(LIBCOMM) $(LIBNT)
        $(LINKER) $(LINKNOPT) /OUT:$@ $(RNOBJ1) $(RNOBJ2) $(RNOBJ3) $(NTLIBS)

rnp.exe:        $(DEFFILE) $(RNOBJ) $(LIBCOMM) $(LIBOS2)
        $(LINKER) $(LINKPOPT) @<<
$(RNOBJ1)+
$(RNOBJ2)+
$(RNOBJ3)
$@,NUL,$(OS2LIBS)
$(DEFFILE)
<<

rnr.exe:        $(RNOBJ) $(LIBCOMM) $(LIBDOS)
        $(LINKER) $(LINKROPT) @<<
$(RNOBJ1)+
$(RNOBJ2)+
$(RNOBJ3)
$@,NUL,$(DOSLIBS);
<<

rmailn.exe: $(RMAILNOBJ) $(LIBCOMM) $(LIBNT)
        $(LINKER) $(LINKNOPT) /OUT:$@ $(RMAILNOBJ) $(NTLIBS)

rmailp.exe:     $(DEFFILE) $(RMAILPOBJ) $(LIBCOMM) $(LIBOS2)
        $(LINKER) $(LINKPOPT) @<<
$(RMAILPOBJ)
$@,NUL,$(OS2LIBS)
$(DEFFILE)
<<

rmailr.exe:     $(RMAILROBJ) $(LIBCOMM) $(LIBDOS)
        $(LINKER) $(LINKROPT) @<<
$(RMAILROBJ)
$@,NUL,$(DOSLIBS);
<<

rnewsn.exe: $(RNEWSOBJ) $(LIBCOMM) $(LIBNT)
        $(LINKER) $(LINKNOPT) /OUT:$@ $(RNEWSOBJ) $(NTLIBS)

rnewsp.exe:     $(DEFFILE) $(RNEWSOBJ) $(LIBCOMM) $(LIBOS2)
        $(LINKER) $(LINKPOPT) @<<
$(RNEWSOBJ)
$@,NUL,$(OS2LIBS)
$(DEFFILE)
<<

rnewsr.exe:     $(RNEWSOBJ)  $(LIBCOMM) $(LIBDOS)
        $(LINKER) $(LINKROPT) @<<
$(RNEWSOBJ)
$@,NUL,$(DOSLIBS);
<<

uucicon.exe: $(UUCICOOBJ1) $(UUCICOOBJ2) $(UUCICONOBJ3) \
                  $(LIBCOMM) $(LIBNT)
        $(LINKER) $(LINKNOPT) /OUT:$@ $(NTLIBS) $(UUCICOOBJ1) $(UUCICOOBJ2) \
           $(UUCICONOBJ3)

uucicop.exe:      $(DEFFILE) $(UUCICOOBJ1) $(UUCICOOBJ2) $(UUCICOPOBJ3) \
                  $(LIBCOMM) $(LIBOS2)
        $(LINKER) $(LINKPOPT) @<<
$(UUCICOOBJ1)+
$(UUCICOOBJ2)+
$(UUCICOPOBJ3)
$@,NUL,$(OS2LIBS)
$(DEFFILE)
<<

uucicor.exe:     $(UUCICOOBJ1) $(UUCICOOBJ2) $(UUCICOROBJ3)\
                  $(LIBCOMM) $(LIBDOS)
        $(LINKER) $(LINKROPT) @<<
$(UUCICOOBJ1)+
$(UUCICOOBJ2)+
$(UUCICOROBJ3)
$@,NUL,$(DOSLIBS);
<<

uucpn.exe: $(UUCPOBJ) $(LIBCOMM) $(LIBNT)
        $(LINKER) $(LINKNOPT) /OUT:$@ $(UUCPOBJ) $(NTLIBS)

uucpp.exe:     $(DEFFILE) $(UUCPOBJ) $(LIBCOMM) $(LIBOS2)
        $(LINKER) $(LINKPOPT) @<<
$(UUCPOBJ)
$@,NUL,$(OS2LIBS)
$(DEFFILE)
<<

uucpr.exe:     $(UUCPOBJ) $(LIBCOMM) $(LIBDOS)
        $(LINKER) $(LINKROPT) @<<
$(UUCPOBJ)
$@,NUL,$(DOSLIBS);
<<

uunamen.exe: $(OBJ)\uuname.obj $(LIBCOMM) $(LIBNT)
        $(LINKER) $(LINKNOPT) /OUT:$@ $(OBJ)\uuname.obj $(NTLIBS)

uunamep.exe:     $(DEFFILE) $(OBJ)\uuname.obj $(LIBCOMM) $(LIBOS2)
        $(LINKER) $(LINKPOPT) @<<
$(OBJ)\uuname.obj
$@,NUL,$(OS2LIBS)
$(DEFFILE)
<<

uupolln.exe: $(POLLNOBJ) $(LIBCOMM) $(LIBNT)
        $(LINKER) $(LINKNOPT) /OUT:$@ $(POLLNOBJ) $(NTLIBS)

uupollp.exe:     $(DEFFILE)  $(POLLPOBJ) $(LIBCOMM) $(LIBOS2)
        $(LINKER) $(LINKPOPT) @<<
$(POLLPOBJ)
$@,NUL,$(OS2LIBS)
$(DEFFILE)
<<

uupollr.exe:      $(POLLROBJ)  $(LIBCOMM) $(LIBDOS)
        $(LINKER) $(LINKROPT) @<<
$(POLLROBJ)
$@,NUL,$(DOSLIBS);
<<

uustatn.exe: $(UUSTATOBJ) $(LIBCOMM) $(LIBNT)
        $(LINKER) $(LINKNOPT) /OUT:$@ $(UUSTATOBJ) $(NTLIBS)

uustatp.exe:     $(DEFFILE)  $(UUSTATOBJ) $(LIBCOMM) $(LIBOS2)
        $(LINKER) $(LINKPOPT) @<<
$(UUSTATOBJ)
$@,NUL,$(OS2LIBS)
$(DEFFILE)
<<

uustatr.exe:      $(UUSTATOBJ) $(LIBCOMM) $(LIBDOS)
        $(LINKER) $(LINKROPT) @<<
$(UUSTATOBJ)
$@,NUL,$(DOSLIBS);
<<

uusubn.exe: $(UUSUBOBJ) $(LIBCOMM) $(LIBNT)
        $(LINKER) $(LINKNOPT) /OUT:$@ $(UUSUBOBJ) $(NTLIBS)

uusubp.exe:      $(DEFFILE) $(UUSUBOBJ) $(LIBCOMM) $(LIBOS2)
        $(LINKER) $(LINKPOPT) @<<
$(UUSUBOBJ)
$@,NUL,$(OS2LIBS)
$(DEFFILE)
<<

uusubr.exe:      $(UUSUBOBJ)  $(LIBCOMM) $(LIBDOS)
        $(LINKER) $(LINKROPT) @<<
$(UUSUBOBJ)
$@,NUL,$(DOSLIBS);
<<

uuxn.exe: $(UUXOBJ) $(LIBCOMM) $(LIBNT)
        $(LINKER) $(LINKNOPT) /OUT:$@ $(UUXOBJ) $(NTLIBS)

uuxp.exe:      $(DEFFILE) $(UUXOBJ) $(LIBCOMM) $(LIBOS2)
        $(LINKER) $(LINKPOPT) @<<
$(UUXOBJ)
$@,NUL,$(OS2LIBS)
$(DEFFILE)
<<

uuxr.exe:      $(UUXOBJ)  $(LIBCOMM) $(LIBDOS)
        $(LINKER) $(LINKROPT) @<<
$(UUXOBJ)
$@,NUL,$(DOSLIBS);
<<

uuxqtn.exe: $(UUXQTOBJ) $(LIBCOMM) $(LIBNT)
        $(LINKER) $(LINKNOPT) /OUT:$@ $(UUXQTOBJ) $(NTLIBS)

uuxqtp.exe:      $(DEFFILE) $(UUXQTOBJ) $(LIBCOMM) $(LIBOS2)
        $(LINKER) $(LINKPOPT) @<<
$(UUXQTOBJ)
$@,NUL,$(OS2LIBS)
$(DEFFILE)
<<

uuxqtr.exe:      $(UUXQTOBJ) $(LIBCOMM) $(LIBDOS)
        $(LINKER) $(LINKROPT) @<<
$(UUXQTOBJ)
$@,NUL,$(DOSLIBS);
<<

testulib.exe:   $(OBJ)\testulib.obj $(OBJ)\ulib.obj $(OBJ)\commfifo.obj \
                $(LIBCOMM) $(LIBDOS)
        $(LINKER) $(LINKROPT) @<<
$(OBJ)\testulib.obj $(OBJ)\ulib.obj $(OBJ)\commfifo.obj
$@,NUL,$(DOSLIBS);
<<

# *--------------------------------------------------------------------*
# *                         Definition files                           *
# *--------------------------------------------------------------------*

$(TEMP)\expirep.def:     $(MAKEFILE)
       copy << $@
name 'EXPIRE UUPC/extended $(VERS)' windowcompat newfiles
Description 'Changes Copyright (c) 1990-1993 Kendra Electronic Wonderworks, All Rights Reserved'
stacksize 8192
exetype OS2
<<

$(TEMP)\fmtp.def:     $(MAKEFILE)
       copy << $@
name 'FMT UUPC/extended $(VERS)' windowcompat newfiles
Description 'Changes Copyright (c) 1990-1993 Kendra Electronic Wonderworks, All Rights Reserved'
stacksize 8192
exetype OS2
<<

$(TEMP)\gensigp.def:     $(MAKEFILE)
       copy << $@
name 'GENSIG UUPC/extended $(VERS)' windowcompat newfiles
Description 'Changes Copyright (c) 1990-1993 Kendra Electronic Wonderworks, All Rights Reserved'
stacksize 8192
exetype OS2
<<

$(TEMP)\mailp.def:     $(MAKEFILE)
       copy << $@
name 'MAIL UUPC/extended $(VERS)' windowcompat newfiles
Description 'Changes Copyright (c) 1990-1993 Kendra Electronic Wonderworks, All Rights Reserved'
stacksize 8192
exetype OS2
<<

$(TEMP)\novrstrp.def:  $(MAKEFILE)
       copy << $@
name 'NOVRSTRK UUPC/extended $(VERS)' windowcompat newfiles
Description 'Changes Copyright (c) 1990-1993 Kendra Electronic Wonderworks, All Rights Reserved'
stacksize 8192
exetype OS2
<<

$(TEMP)\rmailp.def:     $(MAKEFILE)
       copy << $@
name 'RMAIL UUPC/extended $(VERS)' windowcompat newfiles
Description 'Changes Copyright (c) 1990-1993 Kendra Electronic Wonderworks, All Rights Reserved'
stacksize 8192
exetype OS2
<<

$(TEMP)\rnewsp.def:     $(MAKEFILE)
       copy << $@
name 'RNEWS UUPC/extended $(VERS)' windowcompat newfiles
Description 'Changes Copyright (c) 1990-1993 Kendra Electronic Wonderworks, All Rights Reserved'
stacksize 8192
exetype OS2
<<

$(TEMP)\uucicop.def:     $(MAKEFILE)
       copy << $@
name 'UUCICO UUPC/extended $(VERS)' windowcompat newfiles
Description 'Changes Copyright (c) 1990-1993 Kendra Electronic Wonderworks, All Rights Reserved'
stacksize 8192
exetype OS2
<<

$(TEMP)\uucpp.def:     $(MAKEFILE)
       copy << $@
name 'UUCP UUPC/extended $(VERS)' windowcompat newfiles
Description 'Changes Copyright (c) 1990-1993 Kendra Electronic Wonderworks, All Rights Reserved'
stacksize 8192
exetype OS2
<<

$(TEMP)\uunamep.def:     $(MAKEFILE)
       copy << $@
name 'UUNAME UUPC/extended $(VERS)' windowcompat newfiles
Description 'Changes Copyright (c) 1990-1993 Kendra Electronic Wonderworks, All Rights Reserved'
stacksize 8192
exetype OS2
<<

$(TEMP)\uupollp.def:     $(MAKEFILE)
       copy << $@
name 'UUPOLL UUPC/extended $(VERS)' windowcompat newfiles
Description 'Changes Copyright (c) 1990-1993 Kendra Electronic Wonderworks, All Rights Reserved'
stacksize 8192
exetype OS2
<<

$(TEMP)\uusubp.def:     $(MAKEFILE)
       copy << $@
name 'UUSUB UUPC/extended $(VERS)' windowcompat newfiles
Description 'Changes Copyright (c) 1990-1993 Kendra Electronic Wonderworks, All Rights Reserved'
stacksize 8192
exetype OS2
<<

$(TEMP)\uustatp.def:     $(MAKEFILE)
       copy << $@
name 'UUSTAT UUPC/extended $(VERS)' windowcompat newfiles
Description 'Changes Copyright (c) 1990-1993 Kendra Electronic Wonderworks, All Rights Reserved'
stacksize 8192
exetype OS2
<<

$(TEMP)\uuxp.def:     $(MAKEFILE)
       copy << $@
name 'UUX UUPC/extended $(VERS)' windowcompat newfiles
Description 'Changes Copyright (c) 1990-1993 Kendra Electronic Wonderworks, All Rights Reserved'
stacksize 8192
exetype OS2
<<

$(TEMP)\uuxqtp.def:     $(MAKEFILE)
       copy << $@
name 'UUXQT UUPC/extended $(VERS)' windowcompat newfiles
Description 'Changes Copyright (c) 1990-1993 Kendra Electronic Wonderworks, All Rights Reserved'
stacksize 8192
exetype OS2
<<

# *--------------------------------------------------------------------*
# *                        Clean up after rn                           *
# *--------------------------------------------------------------------*

rn-clean:
                - del $(RNOBJ)
                - del rnp.exe

# *--------------------------------------------------------------------*
# *                          The zip files                             *
# *--------------------------------------------------------------------*

$(OS2ZIPV2):  $(INSTALLP2)
       - mkdir $(SRC)\$(VERS)
       -12 $(ZIP) -o- -u $@ @<<
       $(?: =^
       )
<<
       pkbanner $@  <<
Kendra Electronic Wonderworks: UUPC/extended $(VERS) OS/2 executables (1 of 3)

Changes and Compilation Copyright (c) 1990-1993 by Kendra Electronic
Wonderworks.  May be distributed freely if original source and documentation
files are included.  Please direct all questions on UUPC/extended to
help@kew.com.
<<

$(OS2ZIPV3):  $(INSTALLP3) $(INSTALLPS)
       - mkdir $(SRC)\$(VERS)
       -12 $(ZIP) -o- -u $@ @<<
       $(?: =^
       )
<<
       pkbanner $@  <<
Kendra Electronic Wonderworks: UUPC/extended $(VERS) OS/2 executables (2 of 3)

Changes and Compilation Copyright (c) 1990-1993 by Kendra Electronic
Wonderworks.  May be distributed freely if original source and documentation
files are included.  Please direct all questions on UUPC/extended to
help@kew.com.
<<

$(OS2ZIPV4):  $(INSTALLP4)
       - mkdir $(SRC)\$(VERS)
       -12 $(ZIP) -o- -u $@ @<<
       $(?: =^
       )
<<
       pkbanner $@  <<
Kendra Electronic Wonderworks: UUPC/extended $(VERS) OS/2 executables (3 of 3)

Changes and Compilation Copyright (c) 1990-1993 by Kendra Electronic
Wonderworks.  May be distributed freely if original source and documentation
files are included.  Please direct all questions on UUPC/extended to
help@kew.com.
<<

# *--------------------------------------------------------------------*
# *                       Windows/NT ZIP files                         *
# *--------------------------------------------------------------------*

$(WNTZIPVA):  $(INSTALLN2)
       - mkdir $(SRC)\$(VERS)
       -12 $(ZIP) -o- -u $@ @<<
       $(?: =^
       )
<<
       pkbanner $@  <<
Kendra Electronic Wonderworks: UUPC/extended $(VERS) Win/NT executables (1 of 3)

Special credit to David M. Watt for performing Windows/NT port.

Changes and Compilation Copyright (c) 1990-1993 by Kendra Electronic
Wonderworks.  May be distributed freely if original source and documentation
files are included.  Please direct all questions on UUPC/extended to
help@kew.com.
<<

$(WNTZIPVB):  $(INSTALLN3) $(INSTALLNS)
       - mkdir $(SRC)\$(VERS)
       -12 $(ZIP) -o- -u $@ @<<
       $(?: =^
       )
<<
       pkbanner $@  <<
Kendra Electronic Wonderworks: UUPC/extended $(VERS) Win/NT exe

Special credit to David M. Watt for performing Windows/NT port.

Changes and Compilation Copyright (c) 1990-1993 by Kendra Electronic
Wonderworks.  May be distributed freely if original source and documentation
files are included.  Please direct all questions on UUPC/extended to
help@kew.com.
<<

$(WNTZIPVC):  $(INSTALLN4)
       - mkdir $(SRC)\$(VERS)
       -12 $(ZIP) -o- -u $@ @<<
       $(?: =^
       )
<<
       pkbanner $@  <<
Kendra Electronic Wonderworks: UUPC/extended $(VERS) Win/NT executables (3 of 3)

Special credit to David M. Watt for performing Windows/NT port.

Changes and Compilation Copyright (c) 1990-1993 by Kendra Electronic
Wonderworks.  May be distributed freely if original source and documentation
files are included.  Please direct all questions on UUPC/extended to
help@kew.com.
<<

# *--------------------------------------------------------------------*
# *                    Build the object libraries                      *
# *--------------------------------------------------------------------*

zz$(LIBCOMM): $(LIBLIST)
        - del $(LIBCOMM)
        @echo $@     >  $(WORKFILE)
        @echo y      >> $(WORKFILE)
      ! @echo +$(?)$(CARET)& >> $(WORKFILE)
        @echo ,nul;   >> $(WORKFILE)
        @echo $(LIBCOMM) >> $(WORKFILE)
        lib @$(WORKFILE)

!IFDEF WINNT

$(LIBCOMM): $(LIBLIST)
         lib32 /out:$@ $(LIBLIST)

!ELSE
$(LIBCOMM): $(LIBLIST)
        lib /noignorecase $@ @<<
-+$(?: =&^
-+)
nul;
<<

!ENDIF

$(LIBDOS): $(LIBDOSLIST)
        lib /noignorecase $@ @<<
-+$(?: =&^
-+)
nul;
<<

$(LIBOS2): $(LIBOS2LIST)
        lib /noignorecase $@ @<<
-+$(?: =&^
-+)
nul;
<<

$(LIBNT): $(LIBNTLIST)
        lib32 /out:$@ $(LIBNTLIST)

# *--------------------------------------------------------------------*
# *                Compile the various object files.                   *
# *--------------------------------------------------------------------*

$(OBJ)\deliver2.obj: $(MAIL)\deliver.c $(LIBX)\lib.h $(LIBX)\hostable.h $(LIBX)\security.h\
        $(LIBX)\usertabl.h $(LIBX)\hlib.h $(LIBX)\getseq.h $(MAIL)\address.h\
        $(MAIL)\deliver.h $(LIBX)\pushpop.h $(LIBX)\import.h $(LIBX)\ssleep.h
        $(CC) $(CCOPT) /DFAMILYAPI $(MAIL)\deliver.c

$(OBJ)\mlib2.obj: $(MAIL)\mlib.c $(LIBX)\lib.h $(LIBX)\hlib.h
        $(CC) $(CCOPT) /DFAMILYAPI $(MAIL)\mlib.c

$(OBJ)\nbstime2.obj:  $(UUCICO)\nbstime.c $(LIBX)\lib.h $(LIBX)\arpadate.h\
        $(UUCICO)\dcp.h $(UUCICO)\dcpsys.h $(LIBX)\hostable.h\
        $(UUCICO)\nbstime.h $(UUCICO)\script.h $(LIBX)\security.h\
        $(UUCICO)\ulib.h
        $(CC) $(CCOPT) /DFAMILYAPI $(UUCICO)\nbstime.c

$(OBJ)\safeio2.obj: $(LIBX)\safeio.c $(LIBX)\lib.h $(LIBX)\safeio.h
        $(CC) $(CCOPT) /DFAMILYAPI $(LIBX)\safeio.c

$(OBJ)\safeout2.obj: $(LIBX)\safeout.c $(LIBX)\lib.h $(LIBX)\safeio.h
        $(CC) $(CCOPT) /DFAMILYAPI $(LIBX)\safeout.c

$(OBJ)\scrsize2.obj: $(LIBX)\scrsize2.c $(LIBX)\lib.h $(LIBX)\scrsize.h
        $(CC) $(CCOPT) $(LIBX)\$(@B).c

$(OBJ)\ssleep2.obj: $(LIBX)\ssleep.c $(LIBX)\lib.h $(LIBX)\ssleep.h
        $(CC) $(CCOPT) /DFAMILYAPI $(LIBX)\ssleep.c

$(OBJ)\deliver.obj: $(MAIL)\deliver.c $(LIBX)\lib.h $(LIBX)\hostable.h $(LIBX)\security.h\
        $(LIBX)\usertabl.h $(LIBX)\hlib.h $(LIBX)\getseq.h $(MAIL)\address.h\
        $(MAIL)\deliver.h $(LIBX)\pushpop.h $(LIBX)\import.h $(LIBX)\ssleep.h
        $(CC) $(CCOPT) $(MAIL)\deliver.c

$(OBJ)\mlib.obj: $(MAIL)\mlib.c $(LIBX)\lib.h $(LIBX)\hlib.h
        $(CC) $(CCOPT) $(MAIL)\mlib.c

$(OBJ)\nbstime.obj:  $(UUCICO)\nbstime.c $(LIBX)\lib.h $(LIBX)\arpadate.h\
        $(UUCICO)\dcp.h $(UUCICO)\dcpsys.h $(LIBX)\hostable.h\
        $(UUCICO)\nbstime.h $(UUCICO)\script.h $(LIBX)\security.h\
        $(UUCICO)\ulib.h
        $(CC) $(CCOPT) $(UUCICO)\nbstime.c

$(OBJ)\safeio.obj: $(LIBX)\safeio.c $(LIBX)\lib.h $(LIBX)\safeio.h
        $(CC) $(CCOPT) $(LIBX)\safeio.c

$(OBJ)\safeout.obj: $(LIBX)\safeout.c $(LIBX)\lib.h $(LIBX)\safeio.h
        $(CC) $(CCOPT) $(LIBX)\safeout.c

$(OBJ)\scrsiznt.obj: $(LIBX)\scrsiznt.c $(LIBX)\lib.h $(LIBX)\scrsize.h
        $(CC) $(CCOPT) $(LIBX)\$(@B).c

$(OBJ)\ssleep.obj: $(LIBX)\ssleep.c $(LIBX)\lib.h $(LIBX)\ssleep.h
        $(CC) $(CCOPT) $(LIBX)\ssleep.c

# *--------------------------------------------------------------------*
# *     The timestamp module has a reference to this MAKEFILE,         *
# *     which insures whenever we change the version number the        *
# *     time stamp gets re-generated.                                  *
# *--------------------------------------------------------------------*

$(TIMESTMP): $(LIBX)\timestmp.c $(LIBX)\lib.h $(LIBX)\timestmp.h\
!IFDEF WINNT
        $(LIBX)\win32ver.h \
!ENDIF
        $(MAKEFILE) $(REGEN)
!IFDEF WINNT
        $(CC) $(CCOPT) $(LIBX)\$(@B).c
!ELSE
        $(CC) $(CCOPT) -DUUPCV="\"$(VERS)\"" $(LIBX)\$(@B).c
!ENDIF

$(LIBX)\win32ver.h: $(MAKEFILE) $(REGEN)
        copy << $@
#define UUPCV "$(VERS)"         // UUPC/extended version number for NT
<<

$(OBJ)\uupoll2.obj: $(UTIL)\uupoll.c $(LIBX)\getopt.h $(LIBX)\lib.h\
        $(LIBX)\timestmp.h $(LIBX)\ssleep.h $(LIBX)\arpadate.h
        $(CC) $(CCOPT) /DFAMILYAPI $(UTIL)\uupoll.c

$(OBJ)\uupoll.obj: $(UTIL)\uupoll.c $(LIBX)\getopt.h $(LIBX)\lib.h\
        $(LIBX)\timestmp.h $(LIBX)\ssleep.h $(LIBX)\arpadate.h
        $(CC) $(CCOPT) $(UTIL)\uupoll.c

# *--------------------------------------------------------------------*
# *     Force a regeneration of the time stamp/version module.         *
# *--------------------------------------------------------------------*

regen:  $(LIBX)\timestmp.c
        - del $(OBJ)\timestmp.obj

# *--------------------------------------------------------------------*
# *   This is a special case, the assembler module which handles       *
# *   our I/O to the serial port for the DOS version.                  *
# *--------------------------------------------------------------------*

$(OBJ)\commfifo.obj: $(UUCICO)\commfifo.asm
        $(MASM) $(MASMOPTS) $(UUCICO)\$(@B) ,$@;

# *--------------------------------------------------------------------*
# *         Generate the source browser database for the PWB           *
# *--------------------------------------------------------------------*

$(MAKEFILE).bsc: $(SBRS)
        pwbrmake @<<
/o $(MAKEFILE).bsc $(SBRS)
<<

$(OBJ):
        - mkdir $(OBJ)
