-configure_gcc-3.3 := --enable-languages=c,c++,java --enable-gc-type=boehm --disable-shared --disable-jvmpi
-configure_gcc-3.3 += --disable-java-awt --disable-interpreter --enable-static
-configure_gcc-3.3 += --with-gnu-ld --with-gnu-as --enable-libgcj
-configure_gcc-3.3-powerpc-apple-darwin := --enable-threads=posix --disable-hash-synchronization --disable-multilib
-configure_gcc-3.3-powerpc-apple-darwin += --with-headers=$(shell pwd)/upstream/install/powerpc-apple-darwin/include
-configure_gcc-3.3-i686-pc-mingw32 := --enable-threads=win32 --enable-hash-synchronization
-configure_gcc-3.3-i686-pc-linux-gnu := --enable-threads=posix --enable-hash-synchronization
-configure_gcc-3.3-sparc-sun-solaris2.7 := --enable-threads=posix --disable-multilib
-configure_gcc-3.3-mips := --enable-languages=c --nfp --with-newlib=yes --enable-multilib --disable-threads
+ifneq ($(shell uname),$(platform))
+configure_gcc-3.3 += --with-headers=$(shell pwd)/upstream/install/$(target)/include
+endif
+configure_gcc-3.3 += --enable-languages=c,c++,java --enable-gc-type=boehm --disable-jvmpi --without-libffi
+configure_gcc-3.3 += --with-ld=$(shell pwd)/upstream/install/bin/$(target)-ld
+configure_gcc-3.3 += --with-as=$(shell pwd)/upstream/install/bin/$(target)-as
+ifneq ($(platform),Darwin)
+configure_gcc-3.3 += --with-gnu-ld --with-gnu-as
+endif
+configure_gcc-3.3 += --disable-java-awt --disable-interpreter --enable-libgcj
+configure_gcc-3.3 += --disable-shared --enable-static --disable-jni
+configure_binutils-2.13.2.1 += --disable-shared --enable-static
+configure_gcc-3.3_powerpc-apple-darwin += --enable-threads=posix --disable-hash-synchronization --disable-multilib
+configure_gcc-3.3_i686-pc-mingw32 += --enable-threads=win32 --enable-hash-synchronization
+configure_gcc-3.3_i686-pc-linux-gnu += --enable-threads=posix --enable-hash-synchronization
+configure_gcc-3.3_sparc-sun-solaris2.7 += --enable-threads=posix --disable-hash-synchronization --disable-multilib
+
+configure_WindowMaker-0.80.2_$(target) += --prefix=$(shell pwd)/upstream/install/$(target)
+configure_WindowMaker-0.80.2_$(target) += --host=i686-pc-linux-gnu --x-libraries=$(shell pwd)/upstream/install/$(target)/lib
+
+#environment_gcc-3.3_i686-pc-linux-gnu += CFLAGS="-Wl,-ldl"
+
+# libjpeg's configury doesn't obey --target
+environment_jpeg-6b_$(target) += PATH=$(shell pwd)/upstream/install/$(target)/bin:$$PATH
+environment_jpeg-6b_$(target) += CC=$(shell pwd)/upstream/install/bin/$(target)-gcc
+environment_jpeg-6b_$(target) += CFLAGS="-Os -ffunction-sections -fdata-sections -I ."
+environment_jpeg-6b_$(target) += AR="$(shell pwd)/upstream/install/$(target)/bin/ar rc"
+environment_jpeg-6b_$(target) += AR2=$(shell pwd)/upstream/install/$(target)/bin/ranlib
+
+# libmspack configury doesn't obey --target
+environment_libmspack-20030726_$(target) += PATH=$(shell pwd)/upstream/install/$(target)/bin:$$PATH
+environment_libmspack-20030726_$(target) += CC=$(shell pwd)/upstream/install/bin/$(target)-gcc
+environment_libmspack-20030726_$(target) += AR="$(shell pwd)/upstream/install/$(target)/bin/ar"
+environment_libmspack-20030726_$(target) += AR2=$(shell pwd)/upstream/install/$(target)/bin/ranlib
+environment_libmspack-20030726_$(target) += OPTIM="-ffunction-sections -fdata-sections -O3"
+
+# WindowMaker configury doesn't obey --target
+environment_WindowMaker-0.80.2_$(target) += PATH=$(shell pwd)/upstream/install/$(target)/bin:$$PATH
+environment_WindowMaker-0.80.2_$(target) += CC=$(shell pwd)/upstream/install/bin/$(target)-gcc
+environment_WindowMaker-0.80.2_$(target) += AR="$(shell pwd)/upstream/install/$(target)/bin/ar"
+environment_WindowMaker-0.80.2_$(target) += AR2=$(shell pwd)/upstream/install/$(target)/bin/ranlib
+environment_WindowMaker-0.80.2_$(target) += LDFLAGS="-lXext -ldl"
+make_install_WindowMaker-0.80.2_$(target) := -C WINGs install; make -C wrlib
+make_WindowMaker-0.80.2_$(target) := WINGs
+
+environment_gcc_3.3_$(target) += PATH=$(shell pwd)/upstream/install/bin:$$PATH