#*=====================================================================*/
#*    serrano/prgm/project/bigloo/bde/bmem/example/Makefile            */
#*    -------------------------------------------------------------    */
#*    Author      :  Manuel Serrano                                    */
#*    Creation    :  Thu Apr 24 09:18:07 2003                          */
#*    Last change :  Wed Aug 16 06:45:10 2006 (serrano)                */
#*    Copyright   :  2003-06 Manuel Serrano                            */
#*    -------------------------------------------------------------    */
#*    The Makefile to build the bmem example                           */
#*=====================================================================*/

#*---------------------------------------------------------------------*/
#*    Objects                                                          */
#*---------------------------------------------------------------------*/
SRC		= example.scm number.scm
OBJECT 		= $(SRC:%.scm=%.o)

POPULATION 	= $(SRC) Makefile

#*---------------------------------------------------------------------*/
#*    Compilers & Flags                                                */
#*---------------------------------------------------------------------*/
BIGLOO		= bigloo
AFILE		= bglafile
BFLAGS		= -g2
BMEM		= bglmem
BMEMRUN		= bglmemrun

#*---------------------------------------------------------------------*/
#*    Suffixes                                                         */
#*---------------------------------------------------------------------*/
.SUFFIXES:
.SUFFIXES: .scm .o

#*---------------------------------------------------------------------*/
#*    Target                                                           */
#*---------------------------------------------------------------------*/
all: example.html

example.html: example.bmem
	$(BMEM) example.bmem -o example.html

example.bmem: example
	$(BMEMRUN) ./example 25 20

example: .afile $(OBJECT)
	$(BIGLOO) $(BFLAGS) $(OBJECT) -o example

#*---------------------------------------------------------------------*/
#*    Automatic rule                                                   */
#*---------------------------------------------------------------------*/
%.o: %.scm
	$(BIGLOO) $(BFLAGS) $< -o $@ -c

#*---------------------------------------------------------------------*/
#*    Pop                                                              */
#*---------------------------------------------------------------------*/
pop:
	@ echo $(POPULATION:%=bde/bmem/example/%)

#*---------------------------------------------------------------------*/
#*    ude                                                              */
#*---------------------------------------------------------------------*/
.afile: $(SRC)
	@ $(AFILE) -o .afile $(SRC) 

#*---------------------------------------------------------------------*/
#*    clean                                                            */
#*---------------------------------------------------------------------*/
clean:
	/bin/rm -f example
	/bin/rm -f example.bmem
	/bin/rm -f example.html
	/bin/rm -f $(OBJECT)
	/bin/rm -f .afile

