platform-independent nm
[org.ibex.core.git] / Makefile
index 469f066..2b7f193 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -70,6 +70,7 @@ gcj                += -foptimize-static-class-initialization -feliminate-dwarf2-
 gcjh               := $(shell pwd)/upstream/install/bin/$(shell test -e upstream/install/bin/$(target)-gcjh && echo $(target)-)gcjh
 g++                := upstream/install/bin/$(target)-gcj $(gcc_flags) -Iupstream/install/include -Wno-multichar
 gcc                := upstream/install/bin/$(target)-gcc $(gcc_flags)
+nm                 := upstream/install/$(target)/bin/nm
 jar                := $(shell ((type fastjar &>/dev/null) && echo fastjar) || echo jar)
 
 gcj: .install_gcc-3.3_$(target)
@@ -84,15 +85,16 @@ include Makefile.upstream
 #      @grep -s extends src/$(subst .,/,$*).java | sed s_.\*extends\ __ | head -n 1 | sed s_\ .\*__ |\
 #              xargs --replace make -s superclass_org.ibex.plat.{}
 
-plat_classes_AWT     := org.ibex.plat.AWT
-plat_classes_Java2   := org.ibex.plat.Java2 org.ibex.plat.JVM $(plat_classes_AWT)
-plat_classes_GCJ     := org.ibex.plat.GCJ
-plat_classes_Win32   := org.ibex.plat.Win32 $(plat_classes_GCJ)
-plat_classes_POSIX   := org.ibex.plat.POSIX $(plat_classes_GCJ)
-plat_classes_X11     := org.ibex.plat.X11 $(plat_classes_POSIX)
-plat_classes_Linux   := org.ibex.plat.Linux $(plat_classes_X11)
-plat_classes_Solaris := org.ibex.plat.Solaris $(plat_classes_X11)
-plat_classes_Darwin  := org.ibex.plat.Darwin org.ibex.plat.OpenGL $(plat_classes_POSIX)
+plat_classes_Platform := org.ibex.plat.Platform
+plat_classes_AWT      := org.ibex.plat.AWT $(plat_classes_Platform)
+plat_classes_Java2    := org.ibex.plat.Java2 org.ibex.plat.JVM $(plat_classes_AWT)
+plat_classes_GCJ      := org.ibex.plat.GCJ $(plat_classes_Platform)
+plat_classes_Win32    := org.ibex.plat.Win32 $(plat_classes_GCJ)
+plat_classes_POSIX    := org.ibex.plat.POSIX $(plat_classes_GCJ)
+plat_classes_X11      := org.ibex.plat.X11 $(plat_classes_POSIX)
+plat_classes_Linux    := org.ibex.plat.Linux $(plat_classes_X11)
+plat_classes_Solaris  := org.ibex.plat.Solaris $(plat_classes_X11)
+plat_classes_Darwin   := org.ibex.plat.Darwin org.ibex.plat.OpenGL $(plat_classes_POSIX)
 
 plat_java_src_sources     := $(patsubst %,build/java/%.java,$(subst .,/,$(plat_classes_$(platform))))
 java_src_sources          := $(shell find src -name '*.java' | grep -v Preprocessor | grep -v /plat/)
@@ -149,7 +151,7 @@ build/class/org/ibex/util/MIPSApps.class: build/mips/mipsapps.mips .install_nest
        mkdir -p build/java/org/ibex/util
        @echo -e "\n\033[1mtranslating        .mips -> .class:  $<\033[0m"
        java -cp upstream/nestedvm/build:upstream/nestedvm/upstream/build/bcel-5.1/bcel-5.1.jar \
-               org.xwt.mips.Compiler org.ibex.translators.MIPSApps $< -outfile $@
+               org.xwt.mips.Compiler org.ibex.util.MIPSApps $< -outfile $@
 #-o onepage,pagesize=8m
 
 compile: .compile
@@ -170,7 +172,7 @@ endif
 build/Java2/ibex.jar: .compile build/res/builtin.jar build/class/org/ibex/util/MIPSApps.class
        @echo -e "\n\033[1marchiving         .class -> .jar:   build/Java2/ibex.jar\033[0m"
        mkdir -p build/Java2
-       echo -e "Manifest-Version: 1.0\nMain-Class: org.ibex.Main\n" > build/Java2/.manifest
+       echo -e "Manifest-Version: 1.0\nMain-Class: org.ibex.core.Main\n" > build/Java2/.manifest
        cd build/class/org/ibex; ln -sf ../../../res/builtin.jar
        cd build/class; $(jar) cfm ../Java2/ibex.jar ../Java2/.manifest `find . -name \*.class -or -name \*.jar`
 
@@ -325,8 +327,8 @@ build/mips/mipsapps.mips: build/mips/org/ibex/graphics/Freetype.c.o build/mips/o
        upstream/install/bin/mips-unknown-elf-gcc \
                --static \
                -march=mips1 \
-               -T upstream/mips/org/xwt/mips/linker.ld \
-               -L upstream/mips/build/org/xwt/mips/ \
+               -T upstream/nestedvm/src/org/xwt/mips/linker.ld \
+               -L upstream/nestedvm/build/org/xwt/mips/ \
                -L upstream/freetype-2.1.4/src/objs \
                -L upstream/libmspack-20030726/build-mips-unknown-elf/ \
                -o $@ \
@@ -355,7 +357,7 @@ dist: compile
        echo -e "\n\n\n*** DONE ******************************************"
 
 propose-patch:
-       @darcs push --and-apply --edit-description -o .darcspatch -T patches@xwt.org http://core.ibex.org/
+       @darcs send --edit-description -o .darcspatch -T patches@xwt.org http://core.ibex.org/
        @(echo "To: patches@xwt.org";\
         SUB=`grep -A10000 New.patches .darcspatch | grep '^\\[' | cut -b 2- | tr \\\n , | sed s_,_,\ _g | sed "s_, *\\$$__"`;\
         echo "Subject: $$SUB";\