$OpenBSD: patch-makefile,v 1.2 2010/05/23 09:19:45 espie Exp $
--- makefile.orig	Sun Mar 29 01:50:01 2009
+++ makefile	Mon May 17 21:55:57 2010
@@ -125,10 +125,10 @@ endif
 # BIGENDIAN = 1
 
 # uncomment next line to build expat as part of MAME build
-BUILD_EXPAT = 1
+# BUILD_EXPAT = 1
 
 # uncomment next line to build zlib as part of MAME build
-BUILD_ZLIB = 1
+# BUILD_ZLIB = 1
 
 # uncomment next line to include the symbols
 # SYMBOLS = 1
@@ -197,8 +197,8 @@ endif
 
 # compiler, linker and utilities
 AR = @ar
-CC = @gcc
-LD = @gcc
+CC ?= @gcc
+LD ?= @gcc
 MD = -mkdir$(EXE)
 RM = @rm -f
 
@@ -227,7 +227,7 @@ NAME = $(TARGET)$(SUBTARGET)
 endif
 
 # fullname is prefix+name+suffix+debugsuffix
-FULLNAME = $(PREFIX)$(NAME)$(CPPSUFFIX)$(SUFFIX)$(DEBUGSUFFIX)
+FULLNAME = $(NAME)$(CPPSUFFIX)$(SUFFIX)$(DEBUGSUFFIX)
 
 # add an EXE suffix to get the final emulator name
 EMULATOR = $(FULLNAME)$(EXE)
@@ -302,9 +302,9 @@ CPPONLYFLAGS =
 # CFLAGS is defined based on C or C++ targets
 # (remember, expansion only happens when used, so doing it here is ok)
 ifdef CPP_COMPILE
-CFLAGS = $(CCOMFLAGS) $(CPPONLYFLAGS)
+CFLAGS += $(CCOMFLAGS) $(CPPONLYFLAGS)
 else
-CFLAGS = $(CCOMFLAGS) $(CONLYFLAGS)
+CFLAGS += $(CCOMFLAGS) $(CONLYFLAGS)
 endif
 
 # we compile C-only to C89 standard with GNU extensions
@@ -331,7 +331,7 @@ CCOMFLAGS += -pg
 endif
 
 # add the optimization flag
-CCOMFLAGS += -O$(OPTIMIZE)
+#CCOMFLAGS += -O$(OPTIMIZE)
 
 # if we are optimizing, include optimization options
 # and make all errors into warnings
@@ -355,8 +355,7 @@ CCOMFLAGS += \
 # warnings only applicable to C compiles
 CONLYFLAGS += \
 	-Wpointer-arith \
-	-Wbad-function-cast \
-	-Wstrict-prototypes
+	-Wbad-function-cast
 
 # this warning is not supported on the os2 compilers
 ifneq ($(TARGETOS),os2)
