good
[org.ibex.core.git] / Makefile
index e8781fe..bb603af 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -203,8 +203,13 @@ build/$(platform)/$(platform).ar: $(nonplat_java_sources:build/java/%.java=build
 upstream/jpeg-6b/build-$(target)/libjpeg.a: .install_jpeg-6b_$(target)
 
 # note: binaries appear in a different order in the dependency line vs the link line
-build/$(platform)/$(target_bin): .compile build/$(platform)/builtin.o build/$(platform)/org/ibex/plat/$(platform).cc.o upstream/jpeg-6b/build-$(target)/libjpeg.a 
+build/$(platform)/$(target_bin): upstream/jpeg-6b/build-$(target)/libjpeg.a 
        @echo -e "\n\033[1mlinking               .o -> $(target_bin)\033[0m"
+
+       rm -rf build/$(platform)/*
+       make build/$(platform)/org/ibex/plat/$(platform).cc.o
+       make build/$(platform)/builtin.o
+
        cd upstream/gcc-3.3/build-$(target)/$(target)/libjava;           \
                        (find . -name nat\*.o | grep -v JIS;              \
                        echo boehm.o;\
@@ -219,15 +224,14 @@ build/$(platform)/$(target_bin): .compile build/$(platform)/builtin.o build/$(pl
                        find java gnu -name \*.o -not -name '*[A-Z]*';         \
                        ) > $(shell pwd)/.natbins
 
-# drop gnu regexp library?
+
        cd upstream/gcc-3.3/build-$(target)/$(target)/libjava;\
-       cat $(shell pwd)/.natbins | grep -v shs | grep -v SHS |xargs nm |\
+       (cat $(shell pwd)/.natbins; echo $(shell pwd)/build/$(platform)/org/ibex/plat/$(platform).cc.o) |\
+               grep -v shs | grep -v SHS |xargs nm |\
                grep _ZN | c++filt --format java | grep " U " | sed 's_\.class\$$_.class_' | sed 's_ * U __' | sed 's_(.*__' \
                > $(shell pwd)/.natcalls
 
-#      make $(java_sources)
        rm -rf build/pruned; mkdir -p build/pruned
-#      rm -rf build/pruned; cd build; ln -s class pruned
        javac -classpath lib/bcel-5.1.jar:build/class -d build/class src/org/ibex/util/BytecodePruner.java
        rm -f build/$(platform)/ibex.jar
        cd build/class; \
@@ -242,14 +246,6 @@ build/$(platform)/$(target_bin): .compile build/$(platform)/builtin.o build/$(pl
                -o build/pruned \
                `cat .natcalls`
 
-#      rm -rf build/pruned/org/ibex/js/*; cp build/java/org/ibex/js/* build/pruned/org/ibex/js/
-
-       rm -f build/pruned/java/lang/System.*
-       cp upstream/gcc-3.3/src/libjava/java/lang/System.java build/pruned/java/lang/
-
-#      rm build/pruned/gnu/gcj/runtime/FirstThread*.*
-#      cp upstream/gcc-3.3/src/libjava/gnu/gcj/runtime/FirstThread.java build/pruned/gnu/gcj/runtime/
-
        rm build/pruned/org/ibex/plat/GCJ*.class
        cp build/java/org/ibex/plat/GCJ.java build/pruned/org/ibex/plat/
 
@@ -258,14 +254,6 @@ build/$(platform)/$(target_bin): .compile build/$(platform)/builtin.o build/$(pl
        rm -rf build/Linux/gnu/java
        rm -rf build/Linux/gnu/classpath
 
-#      find build/pruned/gnu/java/locale/ -name 'LocaleInformation_*' -not -name 'LocaleInformation_en.class' -not -name 'LocaleInformation_en_US.class' -exec rm {} \;
-
-#      cd build/pruned; fastjar cvf ../../tmp.jar .
-#      java -jar lib/jarg.jar -verbose -verbosern -verboseufm -normlv -normsf -normsy -normin \
-#                              -nornc -nornf -nornm \
-#                              -normex -nobco tmp.jar
-#      cd build/pruned; rm -rf *; fastjar xvf ../../tmp_s.jar
-
        cp upstream/gcc-3.3/build-$(target)/$(target)/libjava/java/lang/Object.class build/pruned/java/lang/
 
 #                              -fnew-ra \