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
-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
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)"
#
# 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 $@ $<
@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 $@ $<
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 $< $@
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
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
#