X-Git-Url: http://git.megacz.com/?p=nestedvm.git;a=blobdiff_plain;f=Makefile;h=677899dd264f541aaf786cf0f64c6556117af423;hp=2d7ca4307e441e3bc0588de5dd6b80b25d5389f9;hb=0cf8e6919a91a0f39c1d6852328b8bd1cf68160b;hpb=b5d34fe07cc9d3d94d01b0ba92273c7aac4bba86 diff --git a/Makefile b/Makefile index 2d7ca43..677899d 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ flags = -march=mips1 MIPS_CC = mips-unknown-elf-gcc MIPS_CXX = mips-unknown-elf-g++ MIPS_G77 = mips-unknown-elf-g77 +MIPS_PC = mips-unknown-elf-gpc # Be VERY careful about changing any of these as they can break binary # compatibility and create hard to find bugs @@ -35,6 +36,8 @@ mips_optflags = -O3 -g \ -freduce-all-givs MIPS_CFLAGS = $(mips_optflags) $(flags) -I. -Wall -Wno-unused -Werror +MIPS_CXXFLAGS = $(MIPS_CFLAGS) +MIPS_PCFLAGS = $(MIPS_CFLAGS) --big-endian MIPS_LD = mips-unknown-elf-gcc MIPS_LDFLAGS= $(flags) --static -Wl,--gc-sections MIPS_STRIP = mips-unknown-elf-strip @@ -74,7 +77,7 @@ 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)" @@ -110,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 $@ $< @@ -119,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 $@ $< @@ -132,7 +137,11 @@ build/%.mips: build/%.o $(tasks)/build_gcc $(tasks)/build_libc build/%.mips: src/%.cc $(tasks)/build_gcc_step2 $(tasks)/build_libc @mkdir -p `dirname $@` - $(MIPS_CXX) $(MIPS_CFLAGS) $($(notdir $*)_CFLAGS) $(MIPS_LDFLAGS) $($(notdir $*)_LDFLAGS) -o $@ $< + $(MIPS_CXX) $(MIPS_CXXFLAGS) $($(notdir $*)_CXXFLAGS) $(MIPS_LDFLAGS) $($(notdir $*)_LDFLAGS) -o $@ $< + +build/%.mips: src/%.pas $(tasks)/build_gpc + @mkdir -p `dirname $@` + $(MIPS_PC) $(MIPS_PCFLAGS) $($(notdir $*)_PCFLAGS) $(MIPS_LDFLAGS) $($(notdir $*)_LDFLAGS) -o $@ $< build/%.mips.stripped: build/%.mips $(tasks)/build_linker cp $< $@ @@ -265,6 +274,9 @@ build/tests/FDTest.class: build/tests/Test.class fdtest: build/tests/FDTest.class $(JAVA) -cp build tests.FDTest +# Pascal Test +pascaltest: build/tests/PascalHello.class + $(JAVA) -cp build tests.PascalHello # Simple Simple_LDFLAGS = -nostdlib @@ -276,7 +288,15 @@ Paranoia_CFLAGS = "-Wno-error" Paranoia_LDFLAGS = -lm paranoiatest: build/tests/Paranoia.class $(JAVA) -cp build tests.Paranoia - + +# Linpack +build/tests/Linpack.mips: $(tasks)/download_linpack $(tasks)/build_gcc_step2 + mkdir -p `dirname "$@"` + $(MIPS_G77) $(MIPS_CFLAGS) $(MIPS_LDFLAGS) -o $@ upstream/download/linpack_bench.f -lc + +linpacktest: build/tests/Linpack.class + $(JAVA) -cp build tests.Linpack + # # Freetype Stuff #