$OpenBSD$
--- Makefile.orig	Tue Oct  9 07:14:31 2012
+++ Makefile	Tue Oct  9 10:45:17 2012
@@ -129,9 +129,9 @@ endif
 
 # Architectures and modes to be compiled. Consider these to be internal
 # variables, don't override them (use the targets instead).
-ARCHES = ia32 x64 arm mipsel
-DEFAULT_ARCHES = ia32 x64 arm
-MODES = release debug
+ARCHES ?= ia32 x64 arm mipsel
+DEFAULT_ARCHES ?= ia32 x64 arm
+MODES ?= release debug
 ANDROID_ARCHES = android_ia32 android_arm
 
 # List of files that trigger Makefile regeneration:
@@ -250,14 +250,14 @@ clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES)
 OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ARCHES))
 $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE)
 	GYP_GENERATORS=make \
-	build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
+	gyp --generator-output="$(OUTDIR)" build/all.gyp \
 	              -Ibuild/standalone.gypi --depth=. \
 	              -Dv8_target_arch=$(subst .,,$(suffix $@)) \
 	              -S.$(subst .,,$(suffix $@)) $(GYPFLAGS)
 
 $(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE)
 	GYP_GENERATORS=make \
-	build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
+	gyp --generator-output="$(OUTDIR)" build/all.gyp \
 	              -Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS)
 
 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN:
