#*** Copyright 2002-2004 The Netsem Team
#
#    * Steve Bishop
#    * Michael Compton
#    * Matthew Fairbairn
#    * Michael Norrish
#    * Andrei Serjantov
#    * Peter Sewell
#    * Michael Smith
#    * Keith Wansbrough
#
#All rights reserved.
#
#This file is distributed under the terms of the GNU Lesser General
#Public License, with the special exception on linking described in
#file NEW-LICENSE.
#
#***
#
#*** Copyright 2002-2004 The Acute Team
#
#  Allen-Williams, Mair
#  Bishop, Steven
#  Fairbairn, Matthew
#  Habouzit, Pierre [*]
#  Leifer, James [*]
#  Sewell, Peter
#  Sjberg, Vilhelm
#  Steinruecken, Christian
#  Vafeiadis, Viktor
#  Wansbrough, Keith
#  Zappa Nardelli, Francesco [*]
#  Institut National de Recherche en Informatique et en Automatique (INRIA)
#
#  Contributions of authors marked [*] are copyright INRIA.
#
#All rights reserved.
#
#This file is distributed under the terms of the GNU Lesser General
#Public License, with the special exception on linking described in
#file NEW-LICENSE.
#
#***

CC=gcc
CCOPTS=-c -Wall -DNDEBUG
MKDEP=makedepend
MKLIB=ar
MKLIBOPTS=-qs

# Calls and returns are logged only if NS_LOGGING is defined:
#NS_LOGGING=1

ifdef NS_LOGGING
CCOPTSX=-cclib -DNS_LOGGING
else
CCOPTSX=
endif

OFILES=ns_aux.o ns_errors.o ns_sockets.o
LIBOUT=libnssock.a

all: libnssock.a

libnssock.a: $(OFILES)
	$(MKLIB) $(MKLIBOPTS) $(LIBOUT) $(OFILES)

depend:
	$(MKDEP) -f- *.c > .depend

clean:
	rm -f *.[oa]

realclean: clean
	rm -f .depend

.SUFFIXES: .c .o

.c.o:
	$(CC) $(CCOPTS) $(CCOPTSX) $<

-include .depend
