#
# Makefile 
#
# This file is part of
#
# LGMP -- Local Group based Multicast Protocol
#
# (C) 1996, 1997, 1998, 1999 Markus Hofmann and Jochen Schlick
#     (hofmann@acm.org)
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. 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.
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#      This product includes software developed by Markus Hofmann,
#      Jochen Schlick and other contributors.
# 4. Neither the name of the Authors nor the names of other contributors
#    may be used to endorse or promote products derived from this software
#    without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``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 AUTHORS 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.
#
#
# (schlick@telematik.informatik.uni-karlsruhe.de)
#
#
# "$Id: Makefile,v 1.20 1999/02/20 14:50:46 schlick Exp $"
###############################################################################

#................................... include system/compiler dependant Rules ..
include ../Rules.Make


###############################################################################

MBONERUNDIR	= ../$(RUNDIR)


#............................................ additional include-directories ..
INCLUDEDIRS	= -I.

#..................................................................... Progs ..
MBONEPRGS	= mbone_r	\
		  mbone_s

#................................................................. libraries ..
LOADLIBS	= $(SYSDEPLIBS)

#..................................................................... shell ..
SHELL		= /bin/sh

#.............................................................  preprocessor ..
CPP		= $(COMPILER)  -E



###############################################################################
all:	mbonetesties

mbonetesties:	$(MBONEPRGS)
	@echo "**************** make mboneprgs ............................."


#..................................................
install:
	@echo "**************** install mboneprgs --> $(MBONERUNDIR) ......."
	-mkdir -p $(MBONERUNDIR)
	-cp -f $(MBONEPRGS)  $(MBONERUNDIR)

#..................................................
clean:
	@echo "**************** clean mboneprgs ............................"
	-rm -f $(MBONEPRGS) *.o core* *~

osclean: clean
	@echo "**************** cleanup dependencies ......................."
	sed '/\#\#\# Dependencies/q' < Makefile > .makedep
	cp .makedep Makefile
	rm -f .makedep

installclean:
	@echo "**************** clean installed mboneprgs in $(MBONERUNDIR) "
	-rm -f $(MBONERUNDIR)core* 
	for te in $(MBONEPRGS); do \
	  rm -f $(MBONERUNDIR)$$te; done;

mrproper: installclean osclean
	@echo "**************** mrproper/distclean mboneprgs ................"


#..................................................
dep:	depend

.depend: depend

depend:
	@echo "**************** remove dependencies ........................"
	sed '/\#\#\# Dependencies/q' < Makefile > .makedep
	@echo "**************** create dependencies ........................"
	(for i in *.c ;do $(CPP) -M $$i;done) >> .makedep
	cp .makedep Makefile
	rm -f .makedep



#............................................................ implicit rules ..
.c.o:
	$(COMPILER) $(CFLAGS) $(INCLUDEDIRS) -c $*.c

#............................................................. phony targets ..
.PHONY: dep depend all clean mrproper distclean osclean


#..............................................................................

mbone_r:                 mbone_r.o
	$(COMPILER) $(LDFLAGS) -o $@  $@.o  $(LOADLIBS)

mbone_s:                 mbone_s.o
	$(COMPILER) $(LDFLAGS) -o $@  $@.o  $(LOADLIBS)


########################## end of Makefile ####################################
###############################################################################
### Do not remove the following line. We need this for depend #################
### Dependencies:
