$NetBSD: patch-aa,v 1.1.1.1 2009/01/18 16:02:17 wiz Exp $

--- makefile.orig	2008-08-31 18:48:22.000000000 +0200
+++ makefile
@@ -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
@@ -193,9 +193,9 @@ BUILD_EXE = $(EXE)
 endif
 
 # compiler, linker and utilities
-AR = @ar
-CC = @gcc
-LD = @gcc
+#AR = @ar
+#CC = @gcc
+#LD = @gcc
 MD = -mkdir$(EXE)
 RM = @rm -f
 
@@ -219,7 +219,8 @@ NAME = $(TARGET)$(SUBTARGET)
 endif
 
 # fullname is prefix+name+suffix+debugsuffix
-FULLNAME = $(PREFIX)$(NAME)$(SUFFIX)$(DEBUGSUFFIX)
+#FULLNAME = $(PREFIX)$(NAME)$(SUFFIX)$(DEBUGSUFFIX)
+FULLNAME = $(NAME)$(SUFFIX)$(DEBUGSUFFIX)
 
 # add an EXE suffix to get the final emulator name
 EMULATOR = $(FULLNAME)$(EXE)
@@ -284,10 +285,10 @@ endif
 #-------------------------------------------------
 
 # we compile to C89 standard with GNU extensions
-CFLAGS = -std=gnu89
+#CFLAGS = -std=gnu89
 
 # this speeds it up a bit by piping between the preprocessor/compiler/assembler
-CFLAGS += -pipe
+#CFLAGS += -pipe
 
 # add -g if we need symbols
 ifdef SYMBOLS
@@ -321,14 +322,14 @@ CFLAGS += -Wdeclaration-after-statement
 endif
 
 # add the optimization flag
-CFLAGS += -O$(OPTIMIZE)
+#CFLAGS += -O$(OPTIMIZE)
 
 # if we are optimizing, include optimization options
 # and make all errors into warnings
 ifneq ($(OPTIMIZE),0)
 CFLAGS += $(ARCHOPTS) -fno-strict-aliasing
 ifneq ($(TARGETOS),os2)
-CFLAGS += -Werror
+#CFLAGS += -Werror
 endif
 endif
 
@@ -344,7 +345,7 @@ endif
 #-------------------------------------------------
 
 # add core include paths
-CFLAGS += \
+CFLAGS := \
 	-I$(SRC)/$(TARGET) \
 	-I$(SRC)/$(TARGET)/includes \
 	-I$(OBJ)/$(TARGET)/layout \
@@ -354,7 +355,7 @@ CFLAGS += \
 	-I$(SRC)/lib/util \
 	-I$(SRC)/osd \
 	-I$(SRC)/osd/$(OSD) \
-
+	$(CFLAGS)
 
 
 #-------------------------------------------------
@@ -363,11 +364,11 @@ CFLAGS += \
 
 # LDFLAGS are used generally; LDFLAGSEMULATOR are additional
 # flags only used when linking the core emulator
-LDFLAGS =
+#LDFLAGS =
 ifneq ($(TARGETOS),macosx)
 ifneq ($(TARGETOS),os2)
 ifneq ($(TARGETOS),solaris)
-LDFLAGS = -Wl,--warn-common
+#LDFLAGS = -Wl,--warn-common
 endif
 endif
 endif
@@ -382,7 +383,7 @@ endif
 ifndef SYMBOLS
 ifndef PROFILE
 ifneq ($(TARGETOS),macosx)
-LDFLAGS += -s
+#LDFLAGS += -s
 endif
 endif
 endif
@@ -535,7 +536,7 @@ $(VERSIONOBJ): $(DRVLIBS) $(LIBOSD) $(LI
 
 $(EMULATOR): $(VERSIONOBJ) $(DRVLIBS) $(LIBOSD) $(LIBEMU) $(LIBCPU) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(ZLIB) $(LIBOCORE) $(RESFILE)
 	@echo Linking $@...
-	$(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $^ $(LIBS) -o $@
+	$(CC) $(LDFLAGS) $(LDFLAGSEMULATOR) $^ $(LIBS) -o $@
 
 endif
 
