#* --------------------------------------------------------------------*/
#*    Copyright (c) 1992-1998 by Manuel Serrano. All rights reserved.  */
#*                                                                     */
#*                                     ,--^,                           */
#*                               _ ___/ /|/                            */
#*                           ,;'( )__, ) '                             */
#*                          ;;  //   L__.                              */
#*                          '   \   /  '                               */
#*                               ^   ^                                 */
#*                                                                     */
#*                                                                     */
#*    This program is distributed in the hope that it will be useful.  */
#*    Use and copying of this software and preparation of derivative   */
#*    works based upon this software are permitted, so long as the     */
#*    following conditions are met:                                    */
#*           o credit to the authors is acknowledged following         */
#*             current academic behaviour                              */
#*           o no fees or compensation are charged for use, copies,    */
#*             or access to this software                              */
#*           o this copyright notice is included intact.               */
#*      This software is made available AS IS, and no warranty is made */
#*      about the software or its performance.                         */
#*                                                                     */
#*      Bug descriptions, use reports, comments or suggestions are     */
#*      welcome. Send them to                                          */
#*        Manuel Serrano -- Manuel.Serrano@unice.fr                    */
#*-------------------------------------------------------------------- */
#*=====================================================================*/
#*    serrano/prgm/project/bigloo/examples/Pp/Makefile                 */
#*    -------------------------------------------------------------    */
#*    Author      :  Manuel Serrano                                    */
#*    Creation    :  Thu Sep 16 15:05:03 1993                          */
#*    Last change :  Wed Jan 14 15:58:24 1998 (serrano)                */
#*    -------------------------------------------------------------    */
#*    The makefile to build object                                     */
#*=====================================================================*/

#*---------------------------------------------------------------------*/
#*    flags                                                            */
#*---------------------------------------------------------------------*/
BIN		= ../../bin
BIGLOO		= $(BIN)/bigloo
BFLAGS          = -O3 -v -unsafe -fno-stack +rm
POPULATION	= examples/Pp/README examples/Pp/Makefile examples/Pp/reader.scm examples/Pp/pp.scm
DEST		= pp

#*---------------------------------------------------------------------*/
#*    pp                                                               */
#*---------------------------------------------------------------------*/
$(DEST): reader.o pp.o
	@ $(BIGLOO) $(BFLAGS) pp.o reader.o -o $(DEST)

reader.o: reader.scm
	@ $(BIGLOO) $(BFLAGS) -c reader.scm

pp.o: pp.scm
	@ $(BIGLOO) $(BFLAGS) -c pp.scm

test: $(DEST)
	$(DEST) pp.scm

pop:
	@ echo $(POPULATION)

clean: 
	@ find . \( -name '*[~%]'                   \
                       -o -name '.??*[~%]'          \
                       -o -name '#*#'               \
                       -o -name '?*#'               \
                       -o -name \*core \)           \
                     -type f -exec rm {} \;   
	@ \rm -f *.o a.out pp
