## Process this file with automake to produce Makefile.in
-# $Id: Makefile.am 204 2003-01-23 22:50:44Z twisti $
+# $Id: Makefile.am 218 2003-02-04 12:47:51Z stefan $
+
+@SET_MAKE@
MAINTAINERCLEANFILES = Makefile.in configure
SUBDIRS = toolbox mm alpha i386 jit comp nat threads mips tst doc narray jvmtst
@SYSDEP_DIR@/asmpart.o: $(top_srcdir)/@SYSDEP_DIR@/asmpart.S @SYSDEP_DIR@/offsets.h
@CC@ $(INCLUDES) -c -g -o $@ $<
-compiler.o: $(top_srcdir)/builtin.h $(top_srcdir)/compiler.h \
- $(top_srcdir)/global.h $(top_srcdir)/loader.h \
- $(top_srcdir)/tables.h $(top_srcdir)/native.h \
- $(top_srcdir)/asmpart.h $(top_srcdir)/compiler.c $(top_srcdir)/comp/*.c \
- $(top_srcdir)/@SYSDEP_DIR@/gen.c $(top_srcdir)/@SYSDEP_DIR@/disass.c
-# @CC@ $(CFLAGS) -I. $(INCLUDES) -c $(top_srcdir)/compiler.c
-
-jit.o: jit.c \
- jit/mcode.c \
- jit/parse.c \
- jit/reg.c \
- jit/stack.c \
- jit/jitdef.h \
- narray/graph.c \
- narray/loop.c \
- narray/analyze.c \
- narray/tracing.c \
- narray/loop.h
-
checkjvm:
$(MAKE) -C jvmtst $@
#undef SYSDEP_DIR
#undef OLD_COMPILER
+
+#undef USE_BOEHM
dnl autoconf; autoheader; automake
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(compiler.c)
+AC_INIT(jit.c)
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE(cacao, 0.40)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
+AC_PROG_MAKE_SET
dnl Checks for libraries.
AC_CHECK_LIB(m, sin)
dnl check arguments
AC_ARG_ENABLE(threads, [ --enable-threads enable threads support])
-AC_ARG_ENABLE(gc2, [ --enable-gc2 enable new garbage collector])
+AC_ARG_WITH(gc, [ --with-gc[=ARG] use garbage collector [gc2,gc1,boehm]])
dnl threads
AC_MSG_CHECKING(whether to include threads support)
dnl garbage collector version
AC_MSG_CHECKING(which garbage collector to use)
-if test x"$enable_gc2" = "xno"; then
+case "$with_gc" in
+boehm )
+ AC_MSG_RESULT(Boehm garbage collector)
+ GC_OBJ="mm/libboehm.a libgc.a"
+ if test ! -e libgc.a; then
+ AC_MSG_ERROR(libgc.a not found)
+ fi
+ AC_DEFINE(USE_BOEHM)
+ ;;
+gc1 )
AC_MSG_RESULT(old garbage collector)
GC_OBJ="mm/libmm_old.a"
-else
+ ;;
+gc2 | "" )
AC_MSG_RESULT(new garbage collector)
GC_OBJ="mm/libmm_new.a"
-fi
+ ;;
+* )
+ AC_MSG_ERROR(Invalid GC)
+ ;;
+esac
AC_SUBST(GC_OBJ)
-
AC_OUTPUT(Makefile \
toolbox/Makefile \
mm/Makefile \
-noinst_LIBRARIES = libmm_new.a libmm_old.a
+noinst_LIBRARIES = libmm_new.a libmm_old.a libboehm.a
libmm_new_a_SOURCES = allocator2.c allocator.h \
bitmap2.c bitmap2.h \
lifespan.c lifespan.h \
mm.h
libmm_old_a_SOURCES = heap.old.c
+libboehm_a_SOURCES = boehm.c
INCLUDES=-I$(top_srcdir) -I$(top_srcdir)/@SYSDEP_DIR@
-noinst_LIBRARIES = libmm_new.a libmm_old.a
+noinst_LIBRARIES = libmm_new.a libmm_old.a libboehm.a
libmm_new_a_SOURCES = allocator2.c allocator.h \
bitmap2.c bitmap2.h \
lifespan.c lifespan.h \
mm.h
libmm_old_a_SOURCES = heap.old.c
+libboehm_a_SOURCES = boehm.c
INCLUDES=-I$(top_srcdir) -I$(top_srcdir)/@SYSDEP_DIR@
#define CODEMMAP
+#include "types.h"
+
#ifdef USE_BOEHM
/* Uncollectable memory which can contain references */
void *heap_alloc_uncollectable(u4 bytelen);
#define CODEMMAP
+#include "types.h"
+
#ifdef USE_BOEHM
/* Uncollectable memory which can contain references */
void *heap_alloc_uncollectable(u4 bytelen);