# The XWT Makefile
#
-all: JVM Linux Win32 Carbon Java2 #Solaris
+all: JVM Linux Win32 Darwin Java2 Solaris
JVM: build/JVM/xwt.jar
Linux: ; make gcj platform=Linux target=i686-pc-linux-gnu link_flags="-lX11 -lXext --static"
@echo -e "\n\033[1mextracting .class -> .h: $<\033[0m"
mkdir -p `dirname $@`
ls `echo $< | sed s/.class\$$//`*.class |\
- sed s_build/class/__ | sed s/.class\$$//g | sed s_/_._g | (cd build/class; xargs ../../upstream/install/bin/gcjh -d ../h --classpath .)
+ sed s_build/class/__ | sed s/.class\$$//g | sed s_/_._g | (cd build/class; xargs ../../upstream/install/bin/$(target)-gcjh -d ../h --classpath .)
# a hack since we've disabled gcj's awt implementation
-build/$(platform)/org/xwt/plat/Java2.java.o: ; touch $@
-build/$(platform)/org/xwt/plat/AWT.java.o: ; touch $@
+build/$(platform)/org/xwt/plat/Java2.java.o: ; mkdir -p $(@D); touch $@
+build/$(platform)/org/xwt/plat/AWT.java.o: ; mkdir -p $(@D); touch $@
build/$(platform)/%.java.o: build/java/%.java
@echo -e "\n\033[1mcompiling .java -> .o: $<\033[0m"
build/$(platform)/org/xwt/plat/$(platform).cc.o: src/org/xwt/plat/$(platform).cc src/org/xwt/plat/*.cc $(java_headers)
@echo -e "\n\033[1mcompiling .cc -> .o: $<\033[0m"
mkdir -p `dirname $@`
- $(g++) -I/usr/X11R6/include/ -Iupstream/install/include -Ibuild/h -Iupstream/$(platform)/include -Wno-multichar -c $< -o $@
+ $(g++) -I/usr/X11R6/include/ -Iupstream/install/include -Ibuild/h -Iupstream/$(target)/include -Wno-multichar -c $< -o $@
build/$(platform)/jpeg-6b/%.c.o: upstream/jpeg-6b/src/%.c
@echo -e "\n\033[1mcompiling .c -> .o: $<\033[0m"
# compile is here to force compilation of the .class files (they get used via -Ibuild) without
# having the individual .o's depend on the .java's (otherwise every .o gets recompiled when one .java changes)
-gcj: .vendor install_gcc-3.3 .compile $(target_bin)
+gcj: .vendor .install_gcc-3.3_$(target) .compile $(target_bin)
build/JVM/xwt.jar: .compile
@echo -e "\n\033[1marchiving .class -> .jar: build/JVM/xwt.jar\033[0m"
mkdir -p build/JVM