######################################################################
##
## 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: Makefile.in
##
##  This is the makefile for the Mindy compatability library.
##

SHELL	=	/bin/sh

##
## begin autoconf'ed source
##

prefix	=		@prefix@
exec_prefix	=	@exec_prefix@
srcdir	=		@srcdir@

SRCDIR	=		${srcdir}
BINDIR	=		@bindir@
LIBDIR	=		@libdir@/dylan

AR      =               ar
CC	=		@CC@
CCOPTS	=		@CCOPTS@
CFLAGS	=		$(CCOPTS) -I${SRCDIR} @DEFS@ -DBINDIR=\"${BINDIR}\" -DLIBDIR=\"${LIBDIR}\"
YACC	=		@YACC@
YFLAGS	=		-d
LEX	=		@LEX@
LFLAGS	=		@LFLAGS@
RANLIB	=		@RANLIB@
INSTALL	=		@INSTALL@
INSTALL_PROGRAM	=	@INSTALL_PROGRAM@
INSTALL_DATA	=	@INSTALL_DATA@

LIBOBJS =		@LIBOBJS@
LIBS	=		@LIBS@

##
## end of configure written portion
##

OBJS	=	${LIBOBJS} protected.o

SRCS	=	getcwd.c strerror.c strtod.c strtoul.c waitpid.c \
		opendir.c strstr.c strtol.c tmpnam.c sigaction.c \
		protected.c matherr.c memmove.c setsid.c shl.c

ALLOBJS	=	getcwd.o strerror.o strtod.o strtoul.o waitpid.o \
		opendir.o strstr.o strtol.o tmpnam.o sigaction.o \
		protected.o matherr.o memmove.o setsid.c

libcompat.a: ${OBJS}
	${AR} ru libcompat.a ${OBJS}
	${RANLIB} libcompat.a

allobjs: ${ALLOBJS}


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

realclean:
	rm -f ${OBJS} libcompat.a Makefile *~ \#* core
	
install:

# It's easiest to generate this part by machine.
# Try gcc -MM -E *.c | perl ../etc/generate-depends

getcwd.o:  ${SRCDIR}/getcwd.c ${SRCDIR}/std-c.h ${SRCDIR}/std-os.h
	${CC} -c ${CFLAGS} ${SRCDIR}/getcwd.c

matherr.o:  ${SRCDIR}/matherr.c ${SRCDIR}/std-c.h ${SRCDIR}/std-os.h
	${CC} -c ${CFLAGS} ${SRCDIR}/matherr.c

memmove.o:  ${SRCDIR}/memmove.c ${SRCDIR}/std-c.h
	${CC} -c ${CFLAGS} ${SRCDIR}/memmove.c

opendir.o:  ${SRCDIR}/opendir.c ${SRCDIR}/std-c.h ${SRCDIR}/std-os.h
	${CC} -c ${CFLAGS} ${SRCDIR}/opendir.c

protected.o:  ${SRCDIR}/protected.c ${SRCDIR}/std-c.h ${SRCDIR}/std-os.h
	${CC} -c ${CFLAGS} ${SRCDIR}/protected.c

rint.o:  ${SRCDIR}/rint.c
	${CC} -c ${CFLAGS} ${SRCDIR}/rint.c

setsid.o:  ${SRCDIR}/setsid.c ${SRCDIR}/std-c.h ${SRCDIR}/std-os.h
	${CC} -c ${CFLAGS} ${SRCDIR}/setsid.c

sigaction.o:  ${SRCDIR}/sigaction.c ${SRCDIR}/std-signal.h
	${CC} -c ${CFLAGS} ${SRCDIR}/sigaction.c

strerror.o:  ${SRCDIR}/strerror.c ${SRCDIR}/std-c.h ${SRCDIR}/std-os.h
	${CC} -c ${CFLAGS} ${SRCDIR}/strerror.c

strstr.o:  ${SRCDIR}/strstr.c
	${CC} -c ${CFLAGS} ${SRCDIR}/strstr.c

shl.o:  ${SRCDIR}/shl.c
	${CC} -c ${CFLAGS} ${SRCDIR}/shl.c

strtod.o:  ${SRCDIR}/strtod.c ${SRCDIR}/std-c.h
	${CC} -c ${CFLAGS} ${SRCDIR}/strtod.c

strtol.o:  ${SRCDIR}/strtol.c
	${CC} -c ${CFLAGS} ${SRCDIR}/strtol.c

strtoul.o:  ${SRCDIR}/strtoul.c
	${CC} -c ${CFLAGS} ${SRCDIR}/strtoul.c

tmpnam.o:  ${SRCDIR}/tmpnam.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tmpnam.c

waitpid.o:  ${SRCDIR}/waitpid.c ${SRCDIR}/std-c.h ${SRCDIR}/std-os.h
	${CC} -c ${CFLAGS} ${SRCDIR}/waitpid.c

