#******************************************************************************
#FILE:				$(MAKEDIR)/module
#LANGUAGE:			make
#SYSTEM:			UNIX
#USER-INTERFACE:	None
#DESCRIPTION
#	This Makefile tells how to compile a specific module.
#   Well, in most case, we just change to the source directory and make.
#   But some module may have more complicated build process, or may
#   want to make tests in addition.
#
#	Input variables are:
#
#       $(MAKEDIR)      where the makefiles are located.
#
#       $(PREFIX)   where the libraries are installed.
#                       It will be created a subdirectory in this
#                       $(PREFIX) for each library compiled by
#                       this makefile.
#
#       $(TARGET)       the name of the platform on which we're compiling.
#                       This is just used to include platform specific
#                       makefile rules.
#
#	Output:
#
#		$(PREFIX)/bin/$(PROGRAM)           the executables.
#		$(PREFIX)/$(MODULE)/interfaces/    the interface of the module,
#		$(PREFIX)/$(MODULE)/documentation/ the documentation of the module,
#		$(PREFIX)/$(MODULE)/libraries/     the libraries of the module.
#
#AUTHORS
#	<PJB> Pascal J. Bourguignon
#MODIFICATIONS
#   2001-06-19 <PJB> Reorganized and simplified.
#LEGAL
#	Copyright Pascal J. Bourguignon 1992 - 2001
#
#   This script is free software; you can redistribute it and/or
#   modify it under the terms of the GNU  General Public
#   License as published by the Free Software Foundation; either
#   version 2 of the License, or (at your option) any later version.
#
#   This script is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#   General Public License for more details.
#
#   You should have received a copy of the GNU General Public
#   License along with this library; see the file COPYING.LIB.
#   If not, write to the Free Software Foundation,
#   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#******************************************************************************
include $(MAKEDIR)/common-targets
-include $(MAKEDIR)/target$(TARGET)

$(COMMON_TARGETS) ::
	@if [ -z "$(TARGET)"  ] ; then \
		$(MAKE) $(MFLAGS) \
			TARGET=`$(MAKEDIR)/distribution|awk '{print $$1}'` \
			MAKEDIR=$(MAKEDIR) \
			PREFIX=$(PREFIX) \
			MODULE=$(MODULE) \
			$@ ;\
	else \
		$(MAKE) $(MFLAGS) \
			-C sources \
			TARGET=$(TARGET) \
			MAKEDIR=$(MAKEDIR) \
			PREFIX=$(PREFIX) \
			MODULE=$(MODULE) \
			$@ ;\
	fi

clean::
cleanall::clean
	-@rm -f *~
distclean::cleanall
cvsclean::distclean
	-rm -f Makefile.depend

# This is for Emacs.
# Local Variables:
# indent-tabs-mode: t
# mode: makefile
# End:

#### module                           -- 2004-01-19 11:38:02 -- pascal   ####
ViewGit