| 1 |
##################################################################### |
##################################################################### |
| 2 |
|
|
| 3 |
MAME_VERSION = -DMAME_VERSION=59 |
MAME_VERSION = -DMAME_VERSION=60 |
| 4 |
|
|
| 5 |
# set this to mame, mess or the destination you want to build |
# set this to mame, mess or the destination you want to build |
| 6 |
TARGET = mame |
# TARGET = mame |
| 7 |
|
# TARGET = mess |
| 8 |
|
# TARGET = neomame |
| 9 |
|
# TARGET = cpmame |
| 10 |
|
# TARGET = mmsnd |
| 11 |
|
# example for a tiny compile |
| 12 |
|
# TARGET = tiny |
| 13 |
ifeq ($(TARGET),) |
ifeq ($(TARGET),) |
| 14 |
TARGET = mame |
TARGET = mame |
| 15 |
endif |
endif |
| 18 |
USE_GCC = 1 |
USE_GCC = 1 |
| 19 |
# USE_VC = 1 |
# USE_VC = 1 |
| 20 |
|
|
| 21 |
# build a version for debugging games |
# uncomment next line to include the debugger |
| 22 |
# DEBUG = 1 |
# DEBUG = 1 |
| 23 |
|
|
| 24 |
# uncomment next line to include the symbols for symify |
# uncomment next line to include the symbols for symify |
| 25 |
# SYMBOLS = 1 |
# SYMBOLS = 1 |
| 26 |
|
|
| 27 |
# uncomment next line to generate a link map for exception handling in win32 |
# uncomment next line to generate a link map for exception handling in windows |
| 28 |
# MAP = 1 |
# MAP = 1 |
| 29 |
|
|
| 30 |
# uncomment next line to use Assembler 68000 engine |
# uncomment next line to use Assembler 68000 engine |
| 33 |
# uncomment next line to use Assembler 68020 engine |
# uncomment next line to use Assembler 68020 engine |
| 34 |
# X86_ASM_68020 = 1 |
# X86_ASM_68020 = 1 |
| 35 |
|
|
| 36 |
|
# uncomment next line to use cygwin compiler |
| 37 |
|
# COMPILESYSTEM_CYGWIN = 1 |
| 38 |
|
|
| 39 |
# uncomment next line to support 32bpp |
# uncomment next line to support 32bpp |
| 40 |
SUPPORT_32BPP = -DSUPPORT_32BPP |
SUPPORT_32BPP = -DSUPPORT_32BPP |
| 41 |
|
|
| 125 |
# utilities |
# utilities |
| 126 |
RM = @rm -f |
RM = @rm -f |
| 127 |
RMDIR = rd /S /Q |
RMDIR = rd /S /Q |
| 128 |
MD = -mkdir |
MD = -mkdir.exe |
| 129 |
|
|
| 130 |
|
|
| 131 |
ifdef USE_GCC |
ifdef USE_GCC |
| 209 |
# some structures and thus they can't be linked against each other. |
# some structures and thus they can't be linked against each other. |
| 210 |
# cleantiny isn't needed anymore, because the tiny build has its |
# cleantiny isn't needed anymore, because the tiny build has its |
| 211 |
# own object directory too. |
# own object directory too. |
| 212 |
OBJ = ../obj/$(CPUTYPE) |
OBJ = obj/$(CPUTYPE) |
| 213 |
|
|
| 214 |
EMULATOR = ../exe/$(CPUTYPE)/$(NAME)$(EXE) |
EMULATOR = exe/$(CPUTYPE)/$(NAME)$(EXE) |
| 215 |
|
|
| 216 |
##################################################################### |
##################################################################### |
| 217 |
# check enviroment |
# check enviroment |
| 250 |
-DHAS_CPUS \ |
-DHAS_CPUS \ |
| 251 |
-DHAS_SOUND \ |
-DHAS_SOUND \ |
| 252 |
-DLSB_FIRST=1 \ |
-DLSB_FIRST=1 \ |
|
-DZLIB_DLL \ |
|
| 253 |
$(MAME_VERSION) \ |
$(MAME_VERSION) \ |
| 254 |
$(USE_FASTCALL) \ |
$(USE_FASTCALL) \ |
| 255 |
-DMAME_FIX \ |
-DMAME_FIX \ |
| 456 |
$(OBJ)/Win32/Mame32UI \ |
$(OBJ)/Win32/Mame32UI \ |
| 457 |
$(OBJ)/Win32/hlp |
$(OBJ)/Win32/hlp |
| 458 |
|
|
| 459 |
|
ifeq ($(TARGET),mmsnd) |
| 460 |
|
OBJDIRS += $(OBJ)/mmsnd $(OBJ)/mmsnd/machine $(OBJ)/mmsnd/drivers $(OBJ)/mmsnd/sndhrdw |
| 461 |
|
endif |
| 462 |
|
|
| 463 |
##################################################################### |
##################################################################### |
| 464 |
|
|
| 465 |
all: maketree $(EMULATOR) extra |
all: maketree $(EMULATOR) extra |
| 483 |
DBGOBJS = |
DBGOBJS = |
| 484 |
endif |
endif |
| 485 |
|
|
| 486 |
#extra: $(TOOLS) $(HELPFILES) |
ifdef COMPILESYSTEM_CYGWIN |
| 487 |
extra: $(HELPFILES) |
CFLAGS += -mno-cygwin |
| 488 |
|
LDFLAGS += -mno-cygwin |
| 489 |
|
endif |
| 490 |
|
|
| 491 |
|
extra: $(TOOLS) $(HELPFILES) |
| 492 |
|
|
| 493 |
# combine the various definitions to one |
# combine the various definitions to one |
| 494 |
CDEFS = $(DEFS) $(COREDEFS) $(CPUDEFS) $(SOUNDDEFS) $(ASMDEFS) $(DBGDEFS) |
CDEFS = $(DEFS) $(COREDEFS) $(CPUDEFS) $(SOUNDDEFS) $(ASMDEFS) $(DBGDEFS) |
| 495 |
|
|
| 496 |
|
# primary target |
| 497 |
$(EMULATOR): $(OBJS) $(COREOBJS) $(OSOBJS) $(DRVLIBS) $(RES) |
$(EMULATOR): $(OBJS) $(COREOBJS) $(OSOBJS) $(DRVLIBS) $(RES) |
| 498 |
# always recompile the version string |
# always recompile the version string |
| 499 |
ifdef USE_GCC |
ifdef USE_GCC |
| 511 |
# upx $(EMULATOR) |
# upx $(EMULATOR) |
| 512 |
endif |
endif |
| 513 |
|
|
| 514 |
romcmp$(EXE): $(OBJ)/romcmp.o $(OBJ)/unzip.o |
romcmp$(EXE): $(OBJ)/romcmp.o $(OBJ)/unzip.o $(OBJ)/zlib.a |
| 515 |
@echo Linking $@... |
@echo Linking $@... |
| 516 |
ifdef USE_GCC |
ifdef USE_GCC |
| 517 |
$(LD) $(LDFLAGS) $(CONSOLE_PROGRAM) $^ $(LIBS) -o $@ |
$(LD) $(LDFLAGS) $(CONSOLE_PROGRAM) $^ $(OBJ)/zlib.a $(LIBS) -o $@ |
| 518 |
else |
else |
| 519 |
$(LD) $(LDFLAGS) $(CONSOLE_PROGRAM) $(LIBS) $(OBJ)/Win32/dirent.o -out:$@ $^ |
$(LD) $(LDFLAGS) $(CONSOLE_PROGRAM) $(OBJ)/zlib.a $(LIBS)$(OBJ)/Win32/dirent.o -out:$@ $^ |
| 520 |
endif |
endif |
| 521 |
|
|
| 522 |
hdcomp$(EXE): $(OBJ)/romcmp.o $(OBJ)/unzip.o |
hdcomp$(EXE): $(OBJ)/romcmp.o $(OBJ)/unzip.o $(OBJ)/zlib.a |
| 523 |
@echo Linking $@... |
@echo Linking $@... |
| 524 |
ifdef USE_GCC |
ifdef USE_GCC |
| 525 |
$(LD) $(LDFLAGS) $(CONSOLE_PROGRAM) $^ $(LIBS) -o $@ |
$(LD) $(LDFLAGS) $(CONSOLE_PROGRAM) $^ $(OBJ)/zlib.a $(LIBS) -o $@ |
| 526 |
else |
else |
| 527 |
$(LD) $(LDFLAGS) $(CONSOLE_PROGRAM) $(LIBS) $(OBJ)/Win32/dirent.o -out:$@ $^ |
$(LD) $(LDFLAGS) $(CONSOLE_PROGRAM) $(OBJ)/zlib.a $(LIBS) $(OBJ)/Win32/dirent.o -out:$@ $^ |
| 528 |
endif |
endif |
| 529 |
|
|
| 530 |
#-------------------------------------------------------------------- |
#-------------------------------------------------------------------- |
| 674 |
@echo make makedir is no longer necessary, just type make |
@echo make makedir is no longer necessary, just type make |
| 675 |
|
|
| 676 |
$(sort $(OBJDIRS)): |
$(sort $(OBJDIRS)): |
| 677 |
$(MD) $(subst /,\,$@) |
$(MD) $@ |
| 678 |
|
|
| 679 |
maketree2: |
maketree2: |
| 680 |
@echo Making object tree... |
@echo Making object tree... |
| 683 |
|
|
| 684 |
clean: |
clean: |
| 685 |
@echo Deleting object tree $(OBJ)... |
@echo Deleting object tree $(OBJ)... |
|
# @if exist $(OBJ) $(RMDIR) $(subst /,\,$(OBJ)) |
|
|
# @echo Deleting $(EMULATOR)... |
|
|
# @if exist $(EMULATOR) $(RM) $(EMULATOR) |
|
| 686 |
$(RM) -r $(OBJ) |
$(RM) -r $(OBJ) |
| 687 |
@echo Deleting $(EMULATOR)... |
@echo Deleting $(EMULATOR)... |
| 688 |
$(RM) $(EMULATOR) |
$(RM) $(EMULATOR) |
| 692 |
$(RM) -r $(OBJ)/cpuintrf.o |
$(RM) -r $(OBJ)/cpuintrf.o |
| 693 |
$(RM) -r $(OBJ)/drivers/cps2.o |
$(RM) -r $(OBJ)/drivers/cps2.o |
| 694 |
$(RM) -r $(OBJ)/cpu/m68000 |
$(RM) -r $(OBJ)/cpu/m68000 |
|
|
|
|
update: |
|
|
@echo Deleting old object files... |
|
|
# @if exist $(OBJ)\vidhrdw\neogeo.o $(RM) $(OBJ)\vidhrdw\neogeo.o |
|