#*=====================================================================*/
#*    serrano/prgm/project/bigloo/bigloo/bde/bmem/example/Makefile     */
#*    -------------------------------------------------------------    */
#*    Author      :  Manuel Serrano                                    */
#*    Creation    :  Thu Apr 24 09:18:07 2003                          */
#*    Last change :  Sun Dec  5 10:29:01 2021 (serrano)                */
#*    Copyright   :  2003-21 Manuel Serrano                            */
#*    -------------------------------------------------------------    */
#*    The Makefile to build the bmem example                           */
#*=====================================================================*/

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

POPULATION 	= $(SRC) Makefile

#*---------------------------------------------------------------------*/
#*    Compilers & Flags                                                */
#*---------------------------------------------------------------------*/
BFLAGS		= -pmem2
BMEMRUN		= bglmemrun

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

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

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)
	@ $(BGLAFILE) -o .afile $(SRC) 

#*---------------------------------------------------------------------*/
#*    clean                                                            */
#*---------------------------------------------------------------------*/
clean:
	$(RM) -f example
	$(RM) -f example.bmem
	$(RM) -f $(OBJECT)
	$(RM) -f .afile

