# (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
# All rights reserved.  The file named COPYRIGHT specifies the terms 
# and conditions for redistribution.

#
# Makefile.in,v 1.4 1995/08/24 18:12:24 duane Exp
#
# Based on Library makefile template: *Revision: 1.15 *
#

# 
# Available entries:
#     lib         --> creates the library
#     install     --> installs the library (archive, man page(s), header(s))
#     uninstall   --> uninstall the library
#     clean       --> removes all .o and .a files
#     spotless    --> clean + uninstall
#     lint        --> lints a file (usage: make lint MODULE=foo.c)
#     tags        --> creates a tags file (from the SOURCES and HEADERS)
#     checkout    --> checkout all files
#     dist        --> distribution support
#

NAME           = sio
VERSION        = 1.6.2

HEADERS        = sio.h impl.h events.h sioconf.h
SOURCES        = sprint.c sio.c siosup.c
OBJECTS        = sprint.o sio.o siosup.o

MANFILES       = sio.3 Sprint.3
INCLUDEFILES   = sio.h
LIBDIR         = ../../lib
INCLUDEDIR     = ../../include

#
# Available flags:
#  -DDEBUG           :  enables assertions in the code. A failed assertion
#                       terminates the program
#  -DEVENTS          :  enables code that records events (currently limited
#                       to which functions have been called on a given fd)
#                       and code that accesses the event buffers.
#  -DLITTLE_ENDIAN   :  says that the machine is a little endian. This is
#                       needed if you enable EVENTS and your machine is a
#                       little endian (big endian is the default).
#

DEFS           = -DHAS_ISATTY
VERSION_DEF    = -DVERSION=\"SIO_Version_$(VERSION)\"
CPP_DEFS       = $(VERSION_DEF) $(DEFS)

CPP_FLAGS      = $(CPP_DEFS)
CC_FLAGS       = -O
CFLAGS         = $(CPP_FLAGS) $(CC_FLAGS)

INSTALL        = installbsd -c
FMODE          = -m 640       # used by install
RANLIB         = ranlib

PAGER          = less

prefix = @prefix@
INSTALL_BINDIR	= $(prefix)/bin
INSTALL_LIBDIR	= $(prefix)/lib
INSTALL_MANDIR 	= $(prefix)/man

CC		= @CC@
INSTALL		= @INSTALL@
INSTALL_BIN 	= @INSTALL_PROGRAM@
INSTALL_FILE 	= @INSTALL_DATA@
RANLIB		= @RANLIB@


LIBNAME        = $(LIBDIR)/lib$(NAME).a

all:	$(LIBNAME)

$(LIBNAME): $(OBJECTS)
	ar r $@ $?
	$(RANLIB) $@

clean:
	-rm -f $(OBJECTS) $(LIBNAME) core
