#*=====================================================================*/
#*    serrano/prgm/project/bigloo/cigloo/Example/Makefile              */
#*    -------------------------------------------------------------    */
#*    Author      :  Manuel Serrano                                    */
#*    Creation    :  Tue Dec  5 10:30:51 1995                          */
#*    Last change :  Sun Jul  9 10:22:19 2017 (serrano)                */
#*    -------------------------------------------------------------    */
#*    The `example' Makefile                                           */
#*=====================================================================*/

#*---------------------------------------------------------------------*/
#*    Default configuration                                            */
#*---------------------------------------------------------------------*/
include ../../Makefile.buildconfig
include ../../Makefile.config

#*---------------------------------------------------------------------*/
#*    flags                                                            */
#*---------------------------------------------------------------------*/
CIGLOO		= $(BGLBUILDBINDIR)/cigloo
CIFLAGS		= -open-includes 
SHELL           = /bin/sh
BFLAGS          = -O3 -cg -w
CFLAGS		= -w

#*---------------------------------------------------------------------*/
#*    all                                                              */
#*---------------------------------------------------------------------*/
all: b_file.o c_file.o
	$(BIGLOO) $(BFLAGS) b_file.o c_file.o -o ctest

#*---------------------------------------------------------------------*/
#*    Clean                                                            */
#*---------------------------------------------------------------------*/
clean: 
	@- $(RM) -f b_file.c ex ctest
	@- $(RM) -f *.o
	@- $(RM) -f *.sch 
	@- $(RM) -f *~

#*---------------------------------------------------------------------*/
#*    c-file.o                                                         */
#*---------------------------------------------------------------------*/
c_file.o: c_file.c c_file.h
	$(CC) $(CFLAGS) c_file.c -c

#*---------------------------------------------------------------------*/
#*    b_file.o                                                         */
#*---------------------------------------------------------------------*/
b_file.o: b_file.scm b_file.sch
	$(BIGLOO) $(BFLAGS) b_file.scm -c

#*---------------------------------------------------------------------*/
#*    b_file.sch                                                       */
#*---------------------------------------------------------------------*/
b_file.sch: c_file.c c_file.h
	$(CIGLOO) $(CIFLAGS) c_file.c -o b_file.sch
