# Makefile -- TCP/IP support for the HP200LX palmtop.
# Copyright (C) 1998-1999  Rod Whitby
#
# 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 (at your option) 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.
#
# $Id: makefile 1.11 2000/04/09 07:03:21 rwhitby Exp $
# $Source: A:/SRC/TCP/MTA/RCS/makefile $

NAME = lxmta
VERSION = 25
RELEASE = 0

all : $(NAME).exe

install : all
        copy $(NAME).exe c:\_bin

##
## Environment Configuration
##

#
# Where is the Waterloo TCP Library installed ?
#
TCPDIR    = ..\wattcp
TCPLIBDIR = $(TCPDIR)\lib
TCPINCDIR = $(TCPDIR)\include
TCPDEBUG  = ..\stubs\wattcpdb.obj
LIBTCP    = wattcplg.lib

#
# Which C compiler are you using ?
#
CC      = bcc
!if $d(DEBUG)
CDEBUG  = -v
!endif
CFLAGS = $(CDEBUG) -DVERSION=$(VERSION) -DRELEASE=$(RELEASE) \
         -1 -d -f- -M -ml -O -w -X -Z

##
## Build Configuration
##

#
# What object files are required to build the program ?
#
!if $d(DEBUG)
OBJS = $(NAME).obj socklib.obj poplib.obj smtplib.obj nntplib.obj imaplib.obj $(TCPDEBUG)
!else
OBJS = $(NAME).obj socklib.obj poplib.obj smtplib.obj nntplib.obj imaplib.obj
!endif

#
# What header files do the object files include ?
#
HDRS = socklib.h

#
# In which directories are the include files stored ?
#
INCDIRS = -I$(TCPINCDIR)

#
# What libraries are required to build the program ?
#
LIBS = $(TCPLIBDIR)\$(LIBTCP)

##
## Link Rules
##

$(NAME).exe : $(OBJS) $(LIBS)
        $(CC) -e$(NAME) -ml $(OBJS) $(LIBS)

##
## Compile Rules
##

$(OBJS) : $(HDRS) makefile

.c.obj :
        $(CC) $(CFLAGS) $(INCDIRS) -c $*.c

##
## Housekeeping
##

clean :
        del *.obj
        del *.map
        del *.bak
        del *.exe

# End of Makefile
