#; ---------------------------------------------------------------------- ;#
#; @file     Makefile                                                     ;#
#; @created  Tue Jun 17 14:57:56 1997                                     ;#
#; @modified Thu Mar  5 15:25:58 1998                                     ;#
#; ---------------------------------------------------------------------- ;#
#; @copyright Dominique Boucher                                           ;#
#; ---------------------------------------------------------------------- ;#
#; scmdoc Makefile                                                        ;#
#; ---------------------------------------------------------------------- ;#

PROJECT = scmdoc
SRC 	= format.scm read.scm scmdoc.scm utils.scm output.scm preds.scm \
          globals.scm
OBJ	= $(SRC:%.scm=%.o)
CTOOLS  = time.c
OTOOLS  = $(CTOOLS:%.c=%.o)

BGL	= bigloo
BGLFLAGS= -O6 -copt "-O3" -unsafe -farithmetic


#; --- Main rules ------------------------------------------------------- ;#
scmdoc: $(OBJ) $(OTOOLS)
	$(BGL) $(BGLFLAGS) -o $(PROJECT) $(OBJ) $(OTOOLS)

doc: scmdoc.html

scmdoc.html: scmdoc.scm scmdoc.inc
	scmdoc -if scmdoc.scm -of scmdoc.html


#; --- The implicit rules ----------------------------------------------- ;#
.SUFFIXES:
.SUFFIXES: .scm .c .o

.scm.o:
	$(BGL) $(BGLFLAGS) -c $*.scm

.c.o:
	gcc -O3 -c $*.c

#; --- dependencies ----------------------------------------------------- ;#
output.o: globals.scm utils.scm preds.scm format.scm
scmdoc.o: globals.scm read.scm format.scm output.scm utils.scm preds.scm

#; --- Utilities -------------------------------------------------------- ;#
clean:
	rm -f *.o $(PROJECT)

distrib:
	tar zcf ../scmdoc.taz *
