# tools
gcc_path := $(shell pwd)/gcc
-gcc_flags := -O9 -ffast-math -fomit-frame-pointer -foptimize-sibling-calls -finline-functions -funroll-loops -g
+#gcc_optimizations := -O9 -ffast-math -fomit-frame-pointer -foptimize-sibling-calls -finline-functions -funroll-loops
+gcc_optimizations := -O0
+gcc_flags := $(gcc_optimizations) -g -ffunction-sections -fdata-sections
gcj_flags := -fCLASSPATH=bin
gcj := $(gcc_path)/bin/$(target)-gcj $(gcj_flags) $(gcc_flags)
gcc := $(gcc_path)/bin/$(target)-g++ $(gcc_flags)
-gcjh := $(gcc_path)/bin/gcjh
+gcjh := $(gcc_path)/bin/$(target)-gcjh
ar := $(gcc_path)/$(target)/bin/ar
strip := $(gcc_path)/$(target)/bin/strip
jar := $(shell ((type fastjar &>/dev/null) && echo fastjar) || echo jar)
echo "archiving .class -> .jar"
mkdir -p bin-Java2
echo -e "Manifest-Version: 1.0\nMain-Class: org.xwt.Main\n" > bin/.manifest
- cd bin; $(jar) cvf ../bin-Java2/xwt.jar -m .manifest \
+ cd bin; $(jar) cvfm ../bin-Java2/xwt.jar .manifest \
org/xwt/builtin.xwar \
`find . -name \*.class | grep -v org/xwt/plat/` \
org/xwt/plat/AWT*.class org/xwt/plat/Java2*.class | tr \\012 \\015