# Makefile.in for kaffeh - kaffe native code stub generator.
#
# Copyright (c) 1996, 1997
#	Transvirtual Technologies, Inc.  All rights reserved.
#
# See the file "license.terms" for information on usage and redistribution 
# of this file. 

@VPATHOPT@=	@srcdir@
srcdir=		@srcdir@
prefix=		@prefix@
exec_prefix=	@exec_prefix@
bindir=		@bindir@
INSTROOT=	@INSTROOT@
INSTALL=	@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
MKDIR=		@MKDIR@
CC=		@CC@
DEPTOOL=	@DEPTOOL@
INCLUDES=	-I. -I$(srcdir) -I../../config -I$(srcdir)/../kaffevm -I$(srcdir)/../../config -I../../include -I$(srcdir)/../../include
CFLAGS=		@CFLAGS@
ALL_CFLAGS=	$(CFLAGS) $(INCLUDES) -DKAFFEH -DKVER=\"@KVER@\" $(EXTRA_CFLAGS)
LDFLAGS=	@LDFLAGS@
LIBS=		@STD_LIBRARIES@
KPREFIX=	@KPREFIX@
OBJEXT=		@OBJEXT@
EXEEXT=		@EXEEXT@

OBJECT=\
		constants$(OBJEXT) \
		sigs$(OBJEXT) \
		support$(OBJEXT) \
		main$(OBJEXT) \
		jar$(OBJEXT) \
		inflate$(OBJEXT) \
		util$(OBJEXT) \
		readClass$(OBJEXT)

DEPENDS=       $(OBJECT:@OBJEXT@=.d)

.SUFFIXES: .d

all:		$(KPREFIX)kaffeh$(EXEEXT)

$(KPREFIX)kaffeh$(EXEEXT):	$(OBJECT)
		$(CC) $(LDFLAGS) -o $(KPREFIX)kaffeh$(EXEEXT) $(OBJECT) $(LIBS)

readClass$(OBJEXT):	$(srcdir)/../kaffevm/readClass.c
		$(CC) $(ALL_CFLAGS) -c $<

jar$(OBJEXT):		$(srcdir)/../kaffevm/jar.c
		$(CC) $(ALL_CFLAGS) -c $<

inflate$(OBJEXT):	$(srcdir)/../kaffevm/inflate.c
		$(CC) $(ALL_CFLAGS) -c $<

.c$(OBJEXT):
		$(CC) $(ALL_CFLAGS) -c $<

### -- provide dependency information for overridden files

readClass.d:	$(srcdir)/../kaffevm/readClass.c
		$(DEPTOOL) $(ALL_CFLAGS) $< > $@

jar.d:		$(srcdir)/../kaffevm/jar.c
		$(DEPTOOL) $(ALL_CFLAGS) $< > $@

inflate.d:	$(srcdir)/../kaffevm/inflate.c
		$(DEPTOOL) $(ALL_CFLAGS) $< > $@

.c.d:
		$(DEPTOOL) $(ALL_CFLAGS) $< > $@

depend:		$(DEPENDS)
		rm -f .depend
		cat $(DEPENDS) > .depend

clean:
		rm -f $(KPREFIX)kaffeh$(EXEEXT) $(KPREFIX)kaffeh.core $(OBJECT)
		rm -f $(DEPENDS) .depend
		touch .depend

distclean:	clean
		rm -f .depend
		rm -f Makefile

install:
		test -d $(INSTROOT)$(bindir) || $(MKDIR) $(INSTROOT)$(bindir)
		$(INSTALL_PROGRAM) $(KPREFIX)kaffeh$(EXEEXT) $(INSTROOT)$(bindir)/$(KPREFIX)kaffeh$(EXEEXT)

derived-files:

@INC_DEPEND@

