#--------------------------------------------------------------------------#
#                                                                          #
#                                                                          #
#      ------------         Bit-Bucket Software, Co.                       #
#      \ 10001101 /         Writers and Distributors of                    #
#       \ 011110 /          Freely Available<tm> Software.                 #
#        \ 1011 /                                                          #
#         ------                                                           #
#                                                                          #
#              (C) Copyright 1987-96, Bit Bucket Software Co.              #
#                                                                          #
#                                                                          #
#            Makefile for BinkleyTerm (Microsoft NMAKE version)            #
#                                                                          #
#                                                                          #
#                       BinkleyTerm Licensing Terms                        #
#                                                                          #
#                                                                          #
#               (C) Copyright 1987-96 Bit Bucket Software Co.              #
# ALL RIGHTS RESERVED. COMMERCIAL DISTRIBUTION AND/OR USE PROHIBITED       #
# WITHOUT WRITTEN PERMISSION FROM BIT BUCKET SOFTWARE CO.                  #
#                                                                          #
# Non-Commercial distribution and/or use is permitted under the following  #
# terms:                                                                   #
#                                                                          #
#                                                                          #
# 1. You may copy and distribute verbatim copies of BinkleyTerm source,    #
# documentation, and executable code as you receive it, in any medium,     #
# provided that you conspicuously and appropriately publish on each copy a #
# valid copyright notice "(C) Copyright 1987-96, Bit Bucket Software Co."; #
# keep intact the notices on all files that refer to this License          #
# Agreement and to the absence of any warranty;  PROVIDE UNMODIFIED COPIES #
# OF THE DOCUMENTATION AS PROVIDED WITH THE PROGRAM; and give any other    #
# recipients of the BinkleyTerm program a copy of this License Agreement   #
# along with the program.  You may charge a distribution fee for the       #
# physical act of transferring a copy, but no more than is necessary to    #
# recover your actual costs incurred in the transfer. Under no             #
# circumstances is BinkleyTerm to be distributed in such a way as to be    #
# construed as "value added" in a sales transaction, such as, but not      #
# limited to, software bundled with a modem or CD-ROM software             #
# collections.                                                             #
#                                                                          #
# 2. You may modify your copy or copies of BinkleyTerm or any portion of   #
# it, and copy and distribute such modifications under the terms of        #
# Paragraph 1 above, provided that you also do the following:              #
#                                                                          #
#     a) cause the modified files to carry prominent notices stating       #
#     that you changed the files and the date of any change;               #
#                                                                          #
#     b) cause the executable code of such modified version to clearly     #
#     identify itself as such in the course of its normal operation;       #
#                                                                          #
#     c) if the modified version is not a "port", but operates in the      #
#     same hardware and/or software environment as the original            #
#     distribution, make the original version equally available,           #
#     clearly identifying same as the original, unmodified version;        #
#                                                                          #
#     d) cause the whole of any work that you distribute or publish,       #
#     that in whole or in part contains or is a derivative of              #
#     BinkleyTerm or any part thereof, to be licensed at no charge to      #
#     all third parties on terms identical to those contained in this      #
#     License Agreement (except that you may choose to grant more          #
#     extensive warranty protection to some or all third parties, at       #
#     your option); and                                                    #
#                                                                          #
#     e) send the complete source code modifications to Bit Bucket         #
#     Software Co. at one of the addresses listed below,  for the          #
#     purpose of evaluation for inclusion in future releases of            #
#     BinkleyTerm.  Should your source code be included in BinkleyTerm,    #
#     Bit Bucket Software Co. retains all rights for redistribution of     #
#     the code as part of BinkleyTerm and all derivative works, with       #
#     appropriate credit given to the author of the modification.          #
#                                                                          #
#     f) You may charge a distribution fee for the physical act of         #
#     transferring a copy, but no more than is necessary to recover        #
#     your actual costs incurred in the transfer, and you may at your      #
#     option offer warranty protection in exchange for a fee.              #
#                                                                          #
# 3. Mere aggregation of another unrelated program with this program and   #
# documentation (or derivative works) on a volume of a storage or          #
# distribution medium does not bring the other program under the scope of  #
# these terms.                                                             #
#                                                                          #
# 4. You may copy and distribute BinkleyTerm and its associated            #
# documentation (or a portion or derivative of it, under Paragraph 2) in   #
# object code or executable form under the terms of Paragraphs 1 and 2     #
# above provided that you also do one of the following:                    #
#                                                                          #
#     a) accompany it with the complete corresponding machine-readable     #
#     source code, which must be distributed under the terms of            #
#     Paragraphs 1 and 2 above; or,                                        #
#                                                                          #
#     b) accompany it with a written offer, valid for at least three       #
#     years, to give any third party free (except for a nominal            #
#     shipping charge) a complete machine-readable copy of the             #
#     corresponding source code, to be distributed under the terms of      #
#     Paragraphs 1 and 2 above; or,                                        #
#                                                                          #
#     c) accompany it with the information you received as to where        #
#     the corresponding source code may be obtained.  (This                #
#     alternative is allowed only for noncommercial distribution and       #
#     only if you received the program in object code or executable        #
#     form alone.)                                                         #
#                                                                          #
# For an executable file, complete source code means all the source code   #
# for all modules it contains; but, as a special exception, it need not    #
# include source code for modules which are standard libraries that        #
# accompany the operating system on which the executable file runs.        #
#                                                                          #
# 5. You may not copy, sublicense, distribute or transfer BinkleyTerm and  #
# its associated documentation  except as expressly provided under this    #
# License Agreement.  Any attempt otherwise to copy, sublicense,           #
# distribute or transfer BinkleyTerm is void and your rights to use the    #
# program under this License agreement shall be automatically terminated.  #
# However, parties who have received computer software programs from you   #
# with this License Agreement will not have their licenses terminated so   #
# long as such parties remain in full compliance, and notify Bit Bucket    #
# Software Co. of their intention to comply with this Agreement.           #
#                                                                          #
# 6. If you wish to incorporate parts of BinkleyTerm into other free       #
# programs whose distribution conditions are different, please contact     #
# Bit Bucket Software Co. at one of the addresses listed below.  We have   #
# not yet worked out a simple rule that can be stated here, but we will    #
# usually permit this.  We will be guided by the two goals of preserving   #
# the free status of all derivatives of our free software (as it pertains  #
# to Non-Commercial use as provided by this Agreement) and of promoting    #
# the sharing and reuse of software.                                       #
#                                                                          #
# 7. For the purposes of this document, "COMMERCIAL USE" is defined as     #
# operation of the software on four or more computers or data lines owned  #
# by the same for-profit organization. Any organization may operate this   #
# software under the terms of this Non-Commercial Agreement if operation   #
# is limited to three or less computers or data lines.                     #
#                                                                          #
#                                                                          #
#                                NO WARRANTY                               #
#                                                                          #
# BECAUSE BINKLEYTERM IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY NO #
# WARRANTY.  EXCEPT WHEN OTHERWISE STATED IN WRITING, BIT BUCKET SOFTWARE  #
# CO. AND/OR OTHER PARTIES PROVIDE BINKLEYTERM "AS IS" WITHOUT WARRANTY OF #
# ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,    #
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR   #
# PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF           #
# BINKLEYTERM, AND THE ACCURACY OF ITS ASSOCIATED DOCUMENTATION, IS WITH   #
# YOU.  SHOULD BINKLEYTERM OR ITS ASSOCIATED DOCUMENTATION PROVE           #
# DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR     #
# CORRECTION.                                                              #
#                                                                          #
# IN NO EVENT WILL BIT BUCKET SOFTWARE CO. BE RESPONSIBLE IN ANY WAY FOR   #
# THE BEHAVIOR OF MODIFIED VERSIONS OF BINKLEYTERM. IN NO EVENT WILL       #
# BIT BUCKET SOFTWARE CO. AND/OR ANY OTHER PARTY WHO MAY MODIFY AND        #
# REDISTRIBUTE BINKLEYTERM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR        #
# DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR OTHER SPECIAL,      #
# INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY  #
# TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED #
# INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A FAILURE OF THE      #
# PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) BINKLEYTERM, EVEN IF YOU     #
# HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM   #
# BY ANY OTHER PARTY.                                                      #
#                                                                          #
#                                                                          #
# You can contact Bit Bucket Software Co. at any one of the following      #
# addresses:                                                               #
#                                                                          #
# Bit Bucket Software Co.        FidoNet  1:104/501, 1:343/491             #
# P.O. Box 460398                AlterNet 7:42/1491                        #
# Aurora, CO 80046               Internet f491.n343.z1.fidonet.org         #
#                                                                          #
#                                                                          #
# Please feel free to contact us at any time to share your comments about  #
# our software and/or licensing policies.                                  #
#                                                                          #
# Our thanks to Richard Stallman and the Free Software Foundation, Inc.,   #
# for most of the wording of this License.                                 #
#                                                                          #
#--------------------------------------------------------------------------#


###############################################################
#                                                             #
#  Make file for BinkleyTerm-OS/2 Version 2.60 (WITH SNOOP)   #
#                                                             #
#  use MAKE /f MAKEFILE.SNP all                               #
#  or  MAKE /f MAKEFILE.SNP bt32.exe                          #
#  or  MAKE /f MAKEFILE.SNP btctl32.exe                       #
#  or  MAKE /f MAKEFILE.SNP btlng32.exe                       #
#  or  MAKE /f MAKEFILE.SNP binkley.lng                       #
#                                                             #
#  This file is used to build the 32-bit version of the       #
#  software, for use on OS/2 2.x.                             #
#                                                             #
###############################################################


model=L            # use large model when debugging -- bugs JUMP out at you
mode=p
SRC_DIR  = ..\src
INCL_DIR = ..\include

linklibs = OS2386.LIB 
binklibs = ..\lib\snserver.lib ..\lib\maxcomm.lib
CFLAGS   = /Sm /Sp /Ss /O+ /C /G3 /Gs+ /Kbcepr /Q /DOS_2 /DSnoop /I $(INCL_DIR)
LINK     = LINK386
CC       = ICC

USEPCH = /Si
MAKEPCH = /Fi

DEF_H1   = $(INCL_DIR)\com.h $(INCL_DIR)\com_os2.h $(INCL_DIR)\xfer.h 
DEF_H2   = $(INCL_DIR)\bink.h $(INCL_DIR)\zmodem.h $(INCL_DIR)\keybd.h
DEF_H3   = $(INCL_DIR)\sbuf.h $(INCL_DIR)\sched.h $(INCL_DIR)\externs.h 
DEF_H4   = $(INCL_DIR)\includes.h $(INCL_DIR)\prototyp.h $(INCL_DIR)\keyfncs.h
DEF_H5   = $(INCL_DIR)\squish.h

DEF_H    = $(DEF_H1) $(DEF_H2) $(DEF_H3) $(DEF_H4) $(DEF_H5)

cobj1=BT.OBJ       ASYNC.OBJ    FTSC.OBJ     B_SCRIPT.OBJ SBUF.OBJ
cobj2=BTCONFIG.OBJ BREC.OBJ     B_SEARCH.OBJ B_TODAY.OBJ
cobj3=B_TERMOV.OBJ BSEND.OBJ    B_SESSIO.OBJ B_FAXRCV.OBJ
cobj4=B_BANNER.OBJ B_SPAWN.OBJ  UPLOAD.OBJ   DOWNLOAD.OBJ
cobj5=B_BBS.OBJ    MAILER.OBJ   B_TERM.OBJ   
cobj6=B_FLOFIL.OBJ MAILROOT.OBJ B_WAZOO.OBJ  MAILOVLY.OBJ SQUISH.OBJ
cobj7=B_FRPROC.OBJ MDM_PROC.OBJ B_WHACK.OBJ  SCHED.OBJ
cobj8=B_FUSER.OBJ  MISC.OBJ     B_WZSEND.OBJ TIMER.OBJ
cobj9=B_HELP.OBJ   NODEPROC.OBJ SENDBARK.OBJ VFOSSIL.OBJ
cobja=B_INITVA.OBJ M7REC.OBJ    DATA.OBJ     M7SEND.OBJ   EMSI.OBJ
cobjb=B_PASSWO.OBJ YOOHOO.OBJ   VERSION7.OBJ
cobjc=B_PROTO.OBJ  DOSFUNCS.OBJ ZMISC.OBJ
cobjd=B_RSPFIL.OBJ EVTPARSE.OBJ ZRECEIVE.OBJ
cobje=B_SBINIT.OBJ FOSSIL.OBJ   ZSEND.OBJ
cobjf=KEYMAP.OBJ   JANUS.OBJ    OUTBOUND.OBJ SENDSYNC.OBJ FILE_DOS.OBJ
cobjg=STATETBL.OBJ XMREC.OBJ    XMSEND.OBJ   LANGLOAD.OBJ
cobjh=RECVBARK.OBJ RECVSYNC.OBJ HYDRA.OBJ    AGLCRC.OBJ

cobjs1=BTCTL.OBJ

cobjs2=BTLNG.OBJ GET_LANG.OBJ PUT_LANG.OBJ

btobjs = $(cobj1) $(cobj2) $(cobj3) $(cobj4) $(cobj5) $(cobj6) $(cobj7) $(cobj8) $(cobj9) $(cobja) $(cobjb) $(cobjc) $(cobjd) $(cobje) $(cobjf) $(cobjg) $(cobjh)
btpch = INCLUDES.OBJ

all: btlng32.exe bt32.exe btctl32.exe binkley.lng

clean :
	!del *.obj
	!del *.pch
	!del *.map
	!del *.exe

bt32.exe:  $(btpch) $(btobjs)
        $(LINK) @<<file.lrf
 $(btobjs: = +^
) 
bt32.exe/align:16 /noi /nol /pmtype:vio /stack:16384 /exepack /base:65536
BT32.MAP
$(linklibs) $(binklibs)
NUL.DEF
<<

bt32dbg.exe:  $(btpch) $(btobjs) 
        $(LINK) @<<file.lrf
 /debug $(btobjs: = +^
) 
bt32dbg.exe/align:16 /noi /nol /pmtype:vio /stack:16384 /exepack /base:65536
BT32dbg.MAP
$(linklibs) $(binklibs)
NUL.DEF
<<

btctl32.exe: $(cobjs1)
        $(LINK) $(cobjs1),btctl32.exe/align:16 /noi /nol /pmtype:vio /exepack /base:65536,NUL.MAP,$(linklibs),NUL.DEF

btlng32.exe: $(cobjs2)
        $(LINK) $(cobjs2),btlng32.exe/align:16 /noi /nol /pmtype:vio /exepack /base:65536,NUL.MAP,$(linklibs),NUL.DEF

binkley.lng: btlng32.exe $(SRC_DIR)\english.txt
 btlng32 $(SRC_DIR)\english.txt binkley.lng

$(btpch): $(SRC_DIR)\$*.c $(DEF_H)
        $(CC) $(CFLAGS) $(MAKEPCH) $(SRC_DIR)\$*.c

$(btobjs): $(SRC_DIR)\$*.c $(btpch)
        $(CC) $(CFLAGS) $(USEPCH) $(SRC_DIR)\$*.c

btctl.obj: $(SRC_DIR)\btctl.c $(DEF_H)
        $(CC) $(CFLAGS) $(SRC_DIR)\BTCTL.C

BTLNG.OBJ:  $(SRC_DIR)\BTLNG.C
        $(CC) $(CFLAGS) $(SRC_DIR)\BTLNG.C

GET_LANG.OBJ: $(SRC_DIR)\GET_LANG.C
        $(CC) $(CFLAGS)  $(SRC_DIR)\GET_LANG.C

PUT_LANG.OBJ: $(SRC_DIR)\PUT_LANG.C
        $(CC) $(CFLAGS)  $(SRC_DIR)\PUT_LANG.C
