#
# COPYRIGHT INFORMATION - DO NOT REMOVE
# "Portions Copyright (c) 2000-2001 LinuxMagic Inc. All Rights Reserved.
#
# This file contains Original Code and/or Modifications of Original Code as
# defined in and that are subject to the Free Source Code License Version
# 1.0 (the 'License'). You may not use this file except in compliance with
# the License. Please obtain a copy of the License at:
#
# http://www.linuxmagic.com/opensource/licensing/FSCL.txt
#
# and read it before using this file.
#
# The Original Code and all software distributed under the License are
# distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
# EXPRESS OR IMPLIED, AND LINUXMAGIC HEREBY DISCLAIMS ALL SUCH WARRANTIES,
# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see
# the License for the specific language governing rights and limitations
# under the License."
#
# Please read the terms of this license carefully. By using or downloading
# this software or file, you are accepting and agreeing to the terms of this
# license with LinuxMagic Inc. If you are agreeing to this license on behalf
# of a company, you represent that you are authorized to bind the company to
# such a license. If you do not meet this criterion or you do not agree to
# any of the terms of this license, do NOT download, distribute, use or alter
# this software or file in any way.
#
# Author: Burton Samograd (burton@wizard.ca)
# CVS Id: $Id: Makefile,v 1.11 2003/10/29 21:14:08 josh Exp $
#
# DO NOT MODIFY WITHOUT CONSULTING THE LICENSE
#
#

# Default top level Makefile for project.  
#

# Default project name
PROJECT=liblm

# Include in default configuration for all projects
include Makefile.defaults

# Add the directories you want make to recurse into before building PROJECT
SUBPROJECTS=lmdebug lmalloc lmstring lmconfig   

$(PROJECT): $(SUBPROJECTS) 
	@$(SH) -c 'for PROJ in $(SUBPROJECTS); do $(MAKE) SUBPROJECT=$$PROJ -C $$PROJ all; done'
# A bit of a hack at the moment but it works since each
# sub project builds it's own lib
	find $(SUBPROJECTS) -name '*.o' -print | xargs $(AR) r $(PROJECT).a
	$(RANLIB) $(PROJECT).a

examples: $(PROJECT)
	@$(MAKE) -C examples

todo: TODO
	@$(SH) -c 'for PROJ in $(SUBPROJECTS); do $(MAKE) SUBPROJECT=$$PROJ -C $$PROJ TODO; done'

clean: cleanfiles
	@$(SH) -c 'for PROJ in $(SUBPROJECTS); do $(MAKE) SUBPROJECT=$$PROJ -C $$PROJ clean; done'
	# @$(MAKE) -C examples clean
