X-Git-Url: http://git.megacz.com/?p=nestedvm.git;a=blobdiff_plain;f=Makefile;h=ff67f5a11dbfb301ee8785667faf7f1418af4f8d;hp=d450f4b7e80f13894568ff3af467a7c6b743a1fc;hb=d378b7501493003be1a0d99f8ef67d0294b82221;hpb=e3813c6d457e973859f55b9f7014abc328bb86f4 diff --git a/Makefile b/Makefile index d450f4b..ff67f5a 100644 --- a/Makefile +++ b/Makefile @@ -77,10 +77,10 @@ all: build/mips2java$(EXE_EXT) $(mips_objects) endif # HACK: Ensure libc is kept up to date when our mips_objects change -$(tasks)/build_libc: $(mips_object) upstream/patches/newlib-extraheaders.sh +$(tasks)/build_libc: $(mips_object) upstream/misc/extraheaders.sh $(tasks)/%: - $(MAKE) -C upstream tasks/$* usr="$(usr)" MIPS_LDFLAGS="$(MIPS_LDFLAGS)" MIPS_CFLAGS="$(flags) $(mips_optflags)" + $(MAKE) -C upstream tasks/$* usr="$(usr)" MIPS_CFLAGS="$(MIPS_CFLAGS)" MIPS_LDFLAGS="$(MIPS_LDFLAGS)" MIPS_PCFLAGS="$(MIPS_PCFLAGS)" upstream_clean_%: @@ -113,7 +113,9 @@ build/mips2java$(EXE_EXT): $(java_sources) $(java_gen_sources) # # MIPS Binary compilation # -build/%.o: src/%.c $(tasks)/full_toolchain + +# The nestedvm support library is special, it doesn't a full libc +$(mips_c_objects): build/%.o: src/%.c $(tasks)/build_gcc $(tasks)/build_newlib $(tasks)/build_extraheaders @mkdir -p `dirname $@` $(MIPS_CC) $(MIPS_CFLAGS) -c -o $@ $< @@ -122,7 +124,7 @@ build/%.o: src/%.c $(tasks)/build_gcc $(tasks)/build_libc @mkdir -p `dirname $@` $(MIPS_CC) $(MIPS_CFLAGS) $($(notdir $*)_CFLAGS) -c -o $@ $< -build/%.o: src/%.s $(tasks)/full_toolchain +build/%.o: src/%.s $(tasks)/build_gcc @mkdir -p `dirname $@` $(MIPS_CC) -x assembler-with-cpp -c -o $@ $< @@ -193,14 +195,13 @@ env.sh: Makefile $(tasks)/build_gcc $(tasks)/build_libc build/org/ibex/nestedvm/ runtime_classes = Runtime Registers UsermodeConstants util/Seekable -tex.jar: $(mips_objects) $(runtime_classes:%=build/org/ibex/nestedvm/%.class) upstream/tasks/build_tex - echo -e "Manifest-Version: 1.0\nMain-Class: TeX\n" > .manifest +tex.jar: $(mips_objects) $(runtime_classes:%=build/org/ibex/nestedvm/%.class) build/tests/TeX.class + echo -e "Manifest-Version: 1.0\nMain-Class: Tex\n" > .manifest cp upstream/build/tex/TeX.class build cd build && jar cfm ../$@ ../.manifest \ - TeX.class \ $(runtime_classes:%=org/ibex/nestedvm/%.class) \ - org/ibex/nestedvm/*.class \ - org/ibex/nestedvm/util/*.class + org/ibex/nestedvm/Runtime\$$*.class \ + org/ibex/nestedvm/util/Seekable\$$*.class runtime.jar: $(runtime_classes:%=build/org/ibex/nestedvm/%.class) cd build && jar cf ../$@ \ @@ -358,6 +359,20 @@ boehmgctest: build/tests/Env.class build/tests/GCTest.class $(JAVA) -cp build tests.Env GC_PRINT_STATS=1 tests.GCTest +# TeX + +Tangle_COMPILERFLAGS = -o unixruntime + +build/tests/Tangle.mips: $(tasks)/build_tex_tangle + @mkdir -p `dirname $@` + cp upstream/build/tex/tangle.mips $@ + + +TeX_COMPILERFLAGS = -o unixruntime +build/tests/TeX.mips: $(tasks)/build_tex + @mkdir -p `dirname $@` + cp upstream/build/tex/tex.mips $@ + # # Speed tests # @@ -423,15 +438,13 @@ doc/charts/%.pdf: doc/charts/%.dat doc/charts/%.gnuplot cd doc/charts; chmod +x boxfill.pl; ./boxfill.pl -g -o unfilled.eps $*.eps cd doc/charts; ps2pdf $*.eps -tex := java -cp $(usr)/../../build:.. TeX - -#tex := java -cp $(usr)/../../build:.. org.ibex.nestedvm.Interpreter ../tex.mips -doc/ivme04.pdf: doc/ivme04.tex doc/acmconf.cls $(charts:%.dat=%.pdf) tex.jar upstream/tasks/extract_texinputs +doc/ivme04.pdf: doc/ivme04.tex doc/acmconf.cls $(charts:%.dat=%.pdf) build/tests/TeX.class cp upstream/build/tex/tex.pool upstream/build/tex/texinputs/tex.pool - cd upstream/build/tex/texinputs; echo '\latex.ltx' | $(tex) - cd upstream/build/tex/texinputs; ln -fs ../../../../doc/* .; rm -f ivme04.aux; touch ivme04.aux; touch ivme04.bbl - cd upstream/build/tex/texinputs; echo '\&latex \input ivme04.tex' | $(tex) - cd upstream/build/tex/texinputs; dvipdf ivme04.dvi + cd upstream/build/tex/texinputs && echo '\latex.ltx' | java -cp $(build) tests.TeX + cd upstream/build/tex/texinputs && ln -fs ../../../../doc/* .; rm -f ivme04.aux; touch ivme04.aux; touch ivme04.bbl + cd upstream/build/tex/texinputs && echo '\&latex \input ivme04.tex' | java -cp $(build) tests.TeX + cd upstream/build/tex/texinputs && dvipdf ivme04.dvi + cp upstream/build/tex/texinputs/ivme04.pdf $@ pdf: doc/ivme04.pdf open doc/ivme04.pdf