######################################################################
##
## Copyright (c) 1994  Carnegie Mellon University
## All rights reserved.
## 
## Use and copying of this software and preparation of derivative
## works based on this software are permitted, including commercial
## use, provided that the following conditions are observed:
## 
## 1. This copyright notice must be retained in full on any copies
##    and on appropriate parts of any derivative works.
## 2. Documentation (paper or online) accompanying any system that
##    incorporates this software, or any part of it, must acknowledge
##    the contribution of the Gwydion Project at Carnegie Mellon
##    University.
## 
## This software is made available "as is".  Neither the authors nor
## Carnegie Mellon University make any warranty about the software,
## its performance, or its conformity to any specification.
## 
## Bug reports, questions, comments, and suggestions should be sent by
## E-mail to the Internet address "gwydion-bugs@cs.cmu.edu".
##
######################################################################
##
##  $Header: /afs/cs.cmu.edu/project/gwydion/hackers/nkramer/mindy/mindy-1.3/tests/RCS/Makefile.in,v 1.6 95/03/13 21:30:41 nkramer Exp $
##
##  This is the makefile for the tautology test demo.
##

SHELL	=	f:\os2\cmd.exe

##
## begin autoconf'ed source
##

prefix	=		c:/bin/langages/mindy
exec_prefix	=	${prefix}
srcdir	=		.

SRCDIR	=		${srcdir}
BINDIR	=		${exec_prefix}/bin
LIBDIR	=		${exec_prefix}/lib/mindy

CC	=		gcc
CCOPTS	=		-g -O4 -finline-functions -Wall
CFLAGS	=		$(CCOPTS) -I${SRCDIR} -DNO_BSTRING_H=1 -DNO_STDLIB_H=1 -DNEED_MATHERR=1 -DBINDIR=\"${BINDIR}\" -DLIBDIR=\"${LIBDIR}\"
YACC	=		bison -y
YFLAGS	=		-d
LEX	=		flex
LFLAGS	=		-i
RANLIB	=		ranlib
INSTALL =               install -c
INSTALL_PROGRAM =       ${INSTALL}               
INSTALL_DATA    =       ${INSTALL} -m 644        
MKINSTALLDIRS	=	./mkinstalldirs

LIBOBJS =		strerror.o memmove.o strtoul.o matherr.o
LIBS	=		-lm

##
## end of configure written portion
##

MC	=	..\\comp\\mindycomp.exe
INTERP	=	..\\interp\\mindy
MINDYFLAGS =
MINDYPATH =  set MINDYPATH=..\\libraries\\dylan;..\\libraries\\coll-ext;..\\libraries\\string-ext;..\\libraries\\streams;..\\libraries\\random;..\\libraries\\print;..\\libraries\\format

# We don't want to run threaded-io-test by default because it is interactive
#
OBJS_TO_RUN = dylan-test.dbc string-extensions-test.dbc
OBJS_TO_BUILD = $(OBJS_TO_RUN) threaded-io-test.dbc asterixes.txt dashes.txt

all: ${OBJS_TO_BUILD}
	for %f in (${OBJS_TO_RUN}) do ($(MINDYPATH) & $(INTERP) -f %f)

dylan-test.dbc: ${SRCDIR}/dylan-test.dylan
	${MC} ${MINDYFLAGS} -o dylan-test.dbc ${SRCDIR}/dylan-test.dylan

string-extensions-test.dbc: ${SRCDIR}/string-extensions-test.dylan
	${MC} ${MINDYFLAGS} -lregression-test -o string-extensions-test.dbc ${SRCDIR}/string-extensions-test.dylan

threaded-io-test.dbc: ${SRCDIR}/threaded-io-test.dylan
	${MC} ${MINDYFLAGS} -lthreaded-io-test -o threaded-io-test.dbc ${SRCDIR}/threaded-io-test.dylan

# And now, two hacks to make sure "asterixes.txt" and "dashes.txt" are 
# in the build directory and not the source directory (while still
# handling the case that build-dir == src-dir)
#
asterixes.txt : ${SRCDIR}/asterixes.src
	cp ${SRCDIR}/asterixes.src ./asterixes.txt
dashes.txt : ${SRCDIR}/dashes.src
	cp ${SRCDIR}/dashes.src ./dashes.txt

clean:
	rm -f ${OBJS} *~ \#* core

realclean:
	rm -f ${OBJS} Makefile *~ \#* core

install:
