# Makefile.in for kaffevm - a Java(tm) compatible virtual machine.
# Borland
# Copyright (c) 1996 Systems Architecture Research Centre,
#		   City University, London, UK.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# Written by Tim Wilkinson <tim@sarc.city.ac.uk>, May 1996.

srcdir=		@srcdir@
prefix=		@prefix@
exec_prefix=	@exec_prefix@
libdir=		@libdir@
INSTALL=	@INSTALL@
INSTALL_DATA=	@INSTALL_DATA@
CC=		@CC@
PIC=		@PIC@
LDFLAGS=	@LIBSHARE@
LDTAIL=		@LDTAIL@
KVER=		@KVER@
OBJEXT=@OBJEXT@
LIBEXT=@LIBEXT@

CFLAGS=		@CFLAGS@ -I$(srcdir) -I..\support -I$(srcdir)\..\support \
 -I..\..\config -I$(srcdir)\..\..\config -I..\..\kaffevm

LIBNAME=	libkaffe_tawt
LIBX=		$(LIBNAME)$(LIBEXT).$(KVER)
LLIB=		$(LIBNAME)$(LIBEXT)

OBJECT=	TinyEventThreadStub$(OBJEXT) \
		TinyEventThread$(OBJEXT) \
		TinyFontMetricsStub$(OBJEXT) \
		TinyFontMetrics$(OBJEXT) \
		TinyGraphicsStub$(OBJEXT) \
		TinyGraphics$(OBJEXT) \
		TinyInputThreadStub$(OBJEXT) \
		TinyInputThread$(OBJEXT) \
		TinyToolkitStub$(OBJEXT) \
		TinyToolkit$(OBJEXT) \
		TinyWindowStub$(OBJEXT) \
		TinyWindow$(OBJEXT)

all:		links $(LLIB)

.path.c=	$(srcdir)\sun.awt.tiny;$(srcdir)\sun.awt.tiny.stubs


$(LLIB):		$(OBJECT) $(LIBNAME).def
		tlink32 -Tpd -v c0d32 @&&!
$(OBJECT)
!,$(LLIB),NUL,cw32 import32 ..\..\kaffevm\libkaffe_vm,$(LIBNAME).def,
		implib $(LIBNAME) $(LLIB)

.c.obj:
		$(CC) @&&!
$(CFLAGS)
! -c $(PIC) $<

links:		..\support\jtypes.h $(LIBNAME).def ..\..\config\config.h

..\support\jtypes.h:	..\..\..\config\i386\win32\bc\jtypes.h
		copy ..\..\..\config\i386\win32\bc\jtypes.h ..\support\jtypes.h

$(LIBNAME).def: ..\..\..\config\i386\win32\bc\$(LIBNAME).def
		copy ..\..\..\config\i386\win32\bc\$(LIBNAME).def $(LIBNAME).def

..\..\config\config.h:	..\..\..\config\i386\win32\bc\config.h
		copy ..\..\..\config\i386\win32\bc\config.h ..\..\config\config.h

clean:
		del *.obj
		del *.dll
		del *.lib

distclean:	clean
		del ..\support\jtypes.h
		del $(LIBNAME).def
		del ..\..\config\config.h
		del Makefile

install:
		$(INSTALL_DATA) $(LIB) $(libdir)\$(LIB)
