# Makefile -- DNS lookup 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.5 2000/04/08 09:48:04 rwhitby Exp $
# $Source: A:/SRC/TCP/DNS/RCS/makefile $

NAME = lxdns
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    = wattcpsm.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 -ms -O -w -X -Z

##
## Build Configuration
##

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

$(NAME).obj : makefile

#
# What header files do the object files include ?
#
HDRS = 

#
# 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) $(CFLAGS) $(OBJS) $(LIBS)

##
## Compile Rules
##

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

##
## Housekeeping
##

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

# End of Makefile
