##############################################################
# Name: /home/users/otso/official/otso/enviros/SCCS/s.Makefile
# Vers: 1.4    Time: 92/08/03, 15:59:48
#
# Copyright (c) 1992      Technical Research Centre of Finland (VTT)
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted, provided
# that this notice and the reference to this notice appearing in each software
# module be retained unaltered, and that the name of any contributors shall not
# be used in advertising or publicity pertaining to distribution of the software
# without specific written prior permission.  No contributor makes any
# representations about the suitability of this software for any purpose.
# It is provided "as is" without any express or limited warranty.
#
#			NO WARRANTY
#
# ALL CONTRIBUTORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS.  IN NO
# EVENT SHALL ANY CONTRIBUTOR BE LIABLE FOR ANY SPECIAL, PUNITIVE, INDIRECT OR
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
# DATA, OR PROFITS, WHETHER IN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH, THE USE OR PERFORMANCE
# OF THIS SOFTWARE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THIS
# SOFTWARE IS WITH YOU.  SHOULD THIS SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE
# COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
#
# As used above, "contributor" includes, but is not limited to :
#        The Technical Research Centre of Finland
#############################################################################


###############################################################################
# Instructions to Make, for compilation of OTSO's generic functions,
# that depend on the underlying environment (e.g. UNIX, SUNCPP, etc).
###############################################################################


LIBES	=	libenviros.a 

##################################################################
# things to make:
##################################################################

all:		libenviros.a
inst-all:	inst-libenviros 
install:	inst-all clean
lint:		l-libenviros


################################################################
# libenviros
################################################################

CFILES	=	envOS.cxx channel.cxx

OFILES	=	envOS.o channel.o

inst-libenviros:	$(LIBDIR)libenviros.a

$(LIBDIR)libenviros.a:	libenviros.a
		-rm -f $@
		$(INSTALL) libenviros.a $@
		-rm $(TOPDIR)libenviros.a
		@$(UTILDIR)make-lib.sh $(SYSTEM) $@ -ranlib
		-@ls -gls $@
		-@echo ""

libenviros:	libenviros.a

libenviros.a:	envirosvrsn.o
		-rm -f $@
		@$(UTILDIR)make-lib.sh $(SYSTEM) $(ARFLAGS) $@ $(OFILES) \
			envirosvrsn.o
		-@rm -f $(TOPDIR)libenviros.a 
		-@$(LN) libenviros.a $(TOPDIR)libenviros.a
		-@ls -l $@
		-@echo "libenviros built normally"

################################################################
# source code
################################################################

envirosvrsn.c:	$(OFILES)
		@$(UTILDIR)version.sh enviros > $@

envOS.o: envOS.cxx envOS.h $(ALL_DVOPS_HEADERS)
channel.o: channel.hxx channel.cxx $(ALL_DVOPS_HEADERS)


################################################################
# clean
################################################################

clean:;		-rm -f *.o *.a core *.old *.tmp *.ixx *.i \
			version.major version.minor version.local\
			$(CLEANSTRINGS)


