--- ./makefile.orig Thu Jan 10 01:29:44 2008 +++ ./makefile Mon Feb 4 13:08:08 2008 @@ -99,11 +99,13 @@ # uncomment next line to include the internal profiler # PROFILER = 1 +ifeq ($(ARCH),i386) # uncomment next line to use DRC MIPS3 engine X86_MIPS3_DRC = 1 # uncomment next line to use DRC PowerPC engine X86_PPC_DRC = 1 +endif # uncomment next line to build using unix-style libsdl on Mac OS X # (vs. the native framework port). Normal users should not enable this. @@ -116,7 +118,9 @@ #------------------------------------------------- # uncomment next line if you are building for a 64-bit target -# PTR64 = 1 +ifeq ($(ARCH),amd64) +PTR64 = 1 +endif # uncomment next line if you are building for a big-endian target # BIGENDIAN = 1 @@ -189,8 +193,8 @@ # compiler, linker and utilities AR = @ar -CC = @gcc -LD = @gcc +CC := @$(CC) +LD = @$(CC) MD = -mkdir$(EXE) RM = @rm -f @@ -214,7 +218,7 @@ endif # fullname is prefix+name+suffix+debugsuffix -FULLNAME = $(PREFIX)$(NAME)$(SUFFIX)$(DEBUGSUFFIX) +FULLNAME = $(NAME) # add an EXE suffix to get the final emulator name EMULATOR = $(FULLNAME)$(EXE) @@ -279,7 +283,7 @@ #------------------------------------------------- # 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 @@ -316,7 +320,7 @@ # if we are optimizing, include optimization options # and make all errors into warnings ifneq ($(OPTIMIZE),0) -CFLAGS += -Werror $(ARCHOPTS) -fno-strict-aliasing +CFLAGS += $(ARCHOPTS) -fno-strict-aliasing #CFLAGS += $(ARCHOPTS) -fno-strict-aliasing endif @@ -342,6 +346,7 @@ -I$(SRC)/lib/util \ -I$(SRC)/osd \ -I$(SRC)/osd/$(OSD) \ + -I$(LOCALBASE)/include @@ -352,7 +357,7 @@ # LDFLAGS are used generally; LDFLAGSEMULATOR are additional # flags only used when linking the core emulator ifneq ($(TARGETOS),macosx) -LDFLAGS = -Wl,--warn-common +LDFLAGS = -Wl,--warn-common $(PTHREAD_LIBS) -L$(LOCALBASE)/lib else LDFLAGS = endif