##
##     Copyright (c) 2001, The Regents of EPITA
##     All rights reserved.
##
##     Redistribution and use in source and binary forms, with or
##     without modification, are permitted provided that the
##     following conditions are met:
##
##         - Redistributions of source code must retain the
##           above copyright notice, this list of conditions and
##           the following disclaimer. 
##         - Redistributions in binary form must reproduce the
##           above copyright notice, this list of conditions and
##           the following disclaimer in the documentation
##           and/or other materials provided with the
##           distribution. 
##         - Neither the name of the Labo Systeme de l'EPITA nor the
##           names of its contributors may be used to endorse
##           or promote products derived from this software
##           without specific prior written permission. 
##
##     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
##     CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
##     BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
##     FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
##     REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
##     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
##     BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
##     OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
##     ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
##     TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
##     USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
##     DAMAGE.
##

# OS specific defines, set by the base Makefile.
OS_DEFINES = 

NAME = libutcp.a

SRCS =	create_env.c init_env.c kill_env.c \
	xpcap_open_live.c xpcap_setfilter.c xpcap_compile.c main_loop.c\
	xlibnet_open_link_interface.c xlibnet_write_link_layer.c xmalloc.c\
	xlibnet_do_checksum.c xselect.c xstrdup.c xpcap_lookupdev.c\
	send_tcp.c read_tcp.c send_arp_reply.c init_filters.c\
	setline.c send_icmp_reply.c read_fd_out.c \
	get_arp_answer.c send_arp_request.c get_mss.c update_timer.c\
	check_params.c write_fd_out.c data_use.c check_params_2.c\
	checksum.c utcp_close.c utcp_connect.c utcp_add_in_loop.c \
	utcp_open.c uget_param.c tcp_handlers_1.c tcp_handlers_2.c\
	tcp_handlers_3.c tcp_handlers_4.c

OBJS = $(SRCS:.c=.o)

CFLAGS = -Wall -Wunused -Werror -O2\
	-I/usr/local/include \
	-I/usr/pkg/include

LDFLAGS	= -L/usr/local/lib -L/usr/pkg/lib 

LIB = $(LDFLAGS)

RM = rm -f

CC = cc

all	:$(OBJS)
	ar rc $(NAME) $(OBJS)
	ranlib $(NAME)

$(NAME):	all

clean: 
	$(RM) $(OBJS)
	$(RM) *~
	$(RM) *.core
	$(RM) $(NAME)
