## * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ## * This file is part of SableJIT. * ## * See the file "LICENSE.JIT" for Copyright information and * ## * the terms and conditions for copying, distribution and * ## * modification of SableJIT. * ## * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * SUBDIRS=src include Makefile.config include Makefile.common JAVATESTCMD_ALL=${SABLEVM_BIN} ${JAVA_LIBRARY} ${JAVA_CP_OPTION} ${JAVA_CLASSPATH} ${JAVA_OTHER_OPTIONS} -p sablevm.jit.compile.include="${LIBINCLUDE}" -p sablevm.jit.compile.exclude="${LIBEXCLUDE}" ${RECOMPILE_EXCLUDE_COMMON} test: all build_tests ${JAVATESTCMD_ALL} sablejit.SableJITClassLoader run sablejit.TestAll ${TESTNAMES} # Package a distribution dist: ./makedist.sh .PHONY: dist doc version # javadoc-related variables DOCDEST=doc ARCHDOCLISTS=arch_ppc.list arch_x86-linux.list arch_sparc-solaris.list DOCLISTS=base.list ${ARCHDOCLISTS} test.list # javadoc # # Need to depend on all as we need to make the automatically generated # Java files. # # TODO: Reimplement without using xargs. xargs may exec several times if # there are too many arguments. # doc: all mkdir -p ${DOCDEST} (cd src && ((for f in `cat ${DOCLISTS}`; do echo "`dirname $$f`/`basename $$f .class`.java"; done) | grep -v '\$$' | xargs javadoc -classpath .:${JUNIT_CLASSPATH} -d ../doc)) # Prints SableJIT version info version: ${SABLEVM_BIN} --version ${SABLEVM_BIN} -Y sablejit.SableJITClassLoader config # install CLASSES_DIR=directory_of_classes (default is src/ and it is # relative to default. #install: installjar install: install_test install_test: installtestjar install_all: installalljar uninstall: uninstalljar installdir: all install_classloader (cd src/${CLASSES_DIR} && \ for f in `find . -name '*.class'`; do \ install -d ${SABLEVM_LIBDIR}/`dirname $$f`; \ install -m 644 $$f ${SABLEVM_LIBDIR}/`dirname $$f`; \ done) uninstalldir: uninstall_classloader rm -rf ${SABLEVM_LIBDIR}/sablejit installjar: all sablejit.jar install_classloader install -m 644 sablejit.jar ${SABLEVM_LIBDIR} installtestjar: all sablejit.jar_test install_classloader install -m 644 sablejit.jar ${SABLEVM_LIBDIR} installalljar: all sablejit.jar_all install_classloader install -m 644 sablejit.jar ${SABLEVM_LIBDIR} uninstalljar: uninstall_classloader rm -f ${SABLEVM_LIBDIR}/sablejit.jar sablejit.jar: all arch.list rm -rf classes mkdir classes LISTS="src/base.list src/arch.list ${EXTRA_LISTS}"; \ for f in `cat $$LISTS`; do \ mkdir -p classes/`dirname $$f`; \ cp `pwd`/src/$$f `pwd`/classes/$$f; \ done (cd classes && jar -cvf ../sablejit.jar *) sablejit.jar_test: all arch.list make sablejit.jar EXTRA_LISTS=src/test.list arch.list: src/arch_${SABLEJIT_PLATFORM}.list (cd src/${CLASSES_DIR} && ln -sf arch_${SABLEJIT_PLATFORM}.list arch.list) src/arch_ppc-sysv.list: (cd src/${CLASSES_DIR} && ln -s arch_ppc.list arch_ppc-sysv.list) src/arch_ppc-macosx.list: (cd src/${CLASSES_DIR} && ln -s arch_ppc.list arch_ppc-macosx.list) sablejit.jar_all: all (cd src/${CLASSES_DIR} && find sablejit -name '*.class' | xargs jar -cvf sablejit.jar) mv -f src/${CLASSES_DIR}/sablejit.jar . # # SableJITClassLoader must be installed outside the jar in the # bootstrap directory, it cannot load itself... # CL_LOCATION=${SABLEVM_DATADIR}/sablevm-classpath/sablejit install_classloader: all mkdir -p ${CL_LOCATION} mv -f src/sablejit/SableJITClassLoader.class ${CL_LOCATION} uninstall_classloader: # remove directory only if empty rm -f ${CL_LOCATION}/SableJITClassLoader.class rmdir ${CL_LOCATION} sootify: all mkdir soot_output ${SOOT_CMD} --app -O -W --dynamic-class "OnePassPPC or OnePassX86" -d soot_output --soot-classpath `pwd`/src:${SABLEVM_LIBDIR}/sablevm/classpath:${JUNIT_CLASSPATH} sablejit.Compiler # soot --app -W -p cg verbose:true -d soot_output -x gnu --soot-classpath `pwd`/src:$HOME/local/sablevm-jit/lib/sablevm/classpath:/usr/share/java/junit.jar sablejit.arch.ppc.PPC #soot --app -W -p cg verbose:true -p wjop.si insert-redundant-casts:false -p wjop.si insert-null-checks:false -p wjop.si expansion-factor:5 -p wjop.si max-container-size:10000 -p wjop.si max-inlinee-size:40 -d soot_output -x gnu -dynamic-class sablejit.OnePassPPC --soot-classpath `pwd`/src:$HOME/local/sablevm-jit/lib/sablevm/classpath:/usr/share/java/junit.jar sablejit.Compiler