--- Makefile.orig	2013-08-27 22:45:07.000000000 +0200
+++ Makefile	2014-02-04 20:59:54.000000000 +0100
@@ -86,13 +86,13 @@
 endif
 X86SRC = $(X86SRC0:%=common/x86/%)
 
-ifeq ($(ARCH),X86)
+ifeq ($(ARCH),i386)
 ARCH_X86 = yes
 ASMSRC   = $(X86SRC) common/x86/pixel-32.asm
 ASFLAGS += -DARCH_X86_64=0
 endif
 
-ifeq ($(ARCH),X86_64)
+ifeq ($(ARCH),amd64)
 ARCH_X86 = yes
 ASMSRC   = $(X86SRC:-32.asm=-64.asm) common/x86/trellis-64.asm
 ASFLAGS += -DARCH_X86_64=1
@@ -108,7 +108,14 @@
 endif
 
 # AltiVec optims
-ifeq ($(ARCH),PPC)
+ifeq ($(ARCH),powerpc)
+ARCH_PPC = yes
+endif
+ifeq ($(ARCH),powerpc64)
+ARCH_PPC = yes
+endif
+
+ifdef ARCH_PPC
 ifneq ($(AS),)
 SRCS += common/ppc/mc.c common/ppc/pixel.c common/ppc/dct.c \
         common/ppc/quant.c common/ppc/deblock.c \
