Develop and Download Open Source Software

Browse CVS Repository

Diff of /mame32jp/mame32jp/makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.1.1 by zero, Tue Apr 23 08:44:22 2002 UTC revision 1.13 by zero, Fri May 24 09:53:11 2002 UTC
# Line 1  Line 1 
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
16    
17  # select compiler  # select compiler
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
# Line 27  X86_ASM_68000 = 1 Line 33  X86_ASM_68000 = 1
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    
# Line 37  EXTRA_FOLDER = -DEXTRA_FOLDER Line 46  EXTRA_FOLDER = -DEXTRA_FOLDER
46  MAME32JP = -DMAME32JP  MAME32JP = -DMAME32JP
47    
48  # uncomment next line to support disable blurring filter  # uncomment next line to support disable blurring filter
49  NFILTER = -DNFILTER  # NFILTER = -DNFILTER
50    
51  # uncomment next line to support game selection by a joystick  # uncomment next line to support game selection by a joystick
52  JOYGUI = -DJOYGUI  JOYGUI = -DJOYGUI
53    
54  # uncomment next line to support stretch to fullscreen  # uncomment next line to support stretch to fullscreen
55  FSSTRETCH = -DFSSTRETCH  # FSSTRETCH = -DFSSTRETCH
56    
57  # language  # language
58  JAPANESE = 1  # JAPANESE = 1
59  # ENGLISH = 1  # ENGLISH = 1
60    
61  # build console version  # build console version
62  # BUILD_CONSOLE = -DBUILD_CONSOLE  ifdef CONSOLE_MODE
63    BUILD_CONSOLE = -DBUILD_CONSOLE
64    endif
65    
66  # use fast (register) calling convention (for VC).  # use fast (register) calling convention (for VC).
67  # USE_FASTCALL = -DFASTCALL  # USE_FASTCALL = -DFASTCALL
# Line 62  JAPANESE = 1 Line 73  JAPANESE = 1
73  # PLEASE DO NOT CHANGE THE FOLLOWING SETTINGS!  # PLEASE DO NOT CHANGE THE FOLLOWING SETTINGS!
74    
75  # if compiler is not selected, GCC is used as the default.  # if compiler is not selected, GCC is used as the default.
76    ifdef IP4
77    INTEL = 1
78    USE_VC = 1
79    USE_GCC =
80    endif
81    
82    ifndef JAPANESE
83    ifndef ENGLISH
84    JAPANESE=1
85    endif
86    endif
87    
88  ifndef USE_VC  ifndef USE_VC
89  ifndef USE_GCC  ifndef USE_GCC
90  USE_GCC = 1  USE_GCC = 1
# Line 83  USE_VC = Line 106  USE_VC =
106  endif  endif
107    
108  # compiler, linker and assembler  # compiler, linker and assembler
 ifdef IP4  
 INTEL = 1  
 endif  
109    
110  ifdef USE_GCC  ifdef USE_GCC
111    AR = @ar    AR = @ar
# Line 114  ASMFLAGS = -f win32 $(SUPPORT_32BPP) Line 134  ASMFLAGS = -f win32 $(SUPPORT_32BPP)
134    
135    
136  # utilities  # utilities
137  RM = del  RM = @rm -f
138  RMDIR = rd /S /Q  RMDIR = rd /S /Q
139  MD = -md  MD = -mkdir.exe -p
140    
141    
142  ifdef USE_GCC  ifdef USE_GCC
# Line 142  endif Line 162  endif
162  ifdef JAPANESE  ifdef JAPANESE
163  LANGUAGE = -DJAPANESE  LANGUAGE = -DJAPANESE
164  ENGLISH =  ENGLISH =
 SUFFIX = jp  
165  else  else
166  LANGUAGE = -DENGLISH  LANGUAGE = -DENGLISH
167  JAPANESE =  JAPANESE =
 SUFFIX = e  
168  endif  endif
169    SUFFIX = jp
170    
171  ifdef SYMBOLS  ifdef SYMBOLS
172  CPUTYPE = debug  CPUTYPE = debug
# Line 179  else Line 198  else
198        COMPILETYPE = -DCOMPILETYPE=12        COMPILETYPE = -DCOMPILETYPE=12
199      else      else
200        ifdef IP4        ifdef IP4
201          ARCH = -G7 -QaxW          ARCH = -G7 -QxW
202          CPUTYPE = pentium4          CPUTYPE = pentium4
203          COMPILETYPE = -DCOMPILETYPE=3          COMPILETYPE = -DCOMPILETYPE=3
204        else        else
# Line 200  NAME = $(TARGET)32$(SUFFIX) Line 219  NAME = $(TARGET)32$(SUFFIX)
219  # some structures and thus they can't be linked against each other.  # some structures and thus they can't be linked against each other.
220  # cleantiny isn't needed anymore, because the tiny build has its  # cleantiny isn't needed anymore, because the tiny build has its
221  # own object directory too.  # own object directory too.
222  OBJ = obj/$(CPUTYPE)  DIR_PREFIX1 = windows
223    DIR_PREFIX2 = japanese
224    ifdef CONSOLE_MODE
225      DIR_PREFIX1=console
226    endif
227    ifdef ENGLISH
228      DIR_PREFIX2 = english
229    endif
230    
231  EMULATOR = exe/$(CPUTYPE)/$(NAME)$(EXE)  DIR_SUFFIX = $(DIR_PREFIX1)/$(DIR_PREFIX2)/$(CPUTYPE)
232    OBJ = obj/$(DIR_SUFFIX)
233    EXEDIR = exe/$(DIR_SUFFIX)
234    EMULATOR = $(EXEDIR)/$(NAME)$(EXE)
235    
236  #####################################################################  #####################################################################
237  # check enviroment  # check enviroment
# Line 241  DEFS = \ Line 270  DEFS = \
270          -DHAS_CPUS \          -DHAS_CPUS \
271          -DHAS_SOUND \          -DHAS_SOUND \
272          -DLSB_FIRST=1 \          -DLSB_FIRST=1 \
         -DZLIB_DLL \  
273          $(MAME_VERSION) \          $(MAME_VERSION) \
274          $(USE_FASTCALL) \          $(USE_FASTCALL) \
275          -DMAME_FIX \          -DMAME_FIX \
# Line 448  OBJDIRS = \ Line 476  OBJDIRS = \
476          $(OBJ)/Win32/Mame32UI \          $(OBJ)/Win32/Mame32UI \
477          $(OBJ)/Win32/hlp          $(OBJ)/Win32/hlp
478    
479    ifeq ($(TARGET),mmsnd)
480    OBJDIRS += $(OBJ)/mmsnd $(OBJ)/mmsnd/machine $(OBJ)/mmsnd/drivers $(OBJ)/mmsnd/sndhrdw
481    endif
482    
483  #####################################################################  #####################################################################
484    
485  all: maketree $(EMULATOR) extra  all: maketree $(EMULATOR) extra
# Line 471  DBGDEFS = Line 503  DBGDEFS =
503  DBGOBJS =  DBGOBJS =
504  endif  endif
505    
506  #extra: $(TOOLS) $(HELPFILES)  ifdef COMPILESYSTEM_CYGWIN
507  extra:  $(HELPFILES)  CFLAGS  += -mno-cygwin
508    LDFLAGS += -mno-cygwin
509    endif
510    
511    extra:  $(TOOLS) $(HELPFILES)
512    
513  # combine the various definitions to one  # combine the various definitions to one
514  CDEFS = $(DEFS) $(COREDEFS) $(CPUDEFS) $(SOUNDDEFS) $(ASMDEFS) $(DBGDEFS)  CDEFS = $(DEFS) $(COREDEFS) $(CPUDEFS) $(SOUNDDEFS) $(ASMDEFS) $(DBGDEFS)
515    
516    # primary target
517  $(EMULATOR): $(OBJS) $(COREOBJS) $(OSOBJS) $(DRVLIBS) $(RES)  $(EMULATOR): $(OBJS) $(COREOBJS) $(OSOBJS) $(DRVLIBS) $(RES)
518  # always recompile the version string  # always recompile the version string
519  ifdef USE_GCC  ifdef USE_GCC
# Line 485  else Line 522  else
522          $(CC) $(CDEFS) $(CFLAGS) -Fo$(OBJ)/version.o -c src/version.c          $(CC) $(CDEFS) $(CFLAGS) -Fo$(OBJ)/version.o -c src/version.c
523  endif  endif
524          @echo Linking $@...          @echo Linking $@...
525            $(MD) $(EXEDIR)
526  ifdef USE_GCC  ifdef USE_GCC
527          $(LD) $(LDFLAGS) $(PROGRAM_TYPE) $(OBJS) $(COREOBJS) $(OSOBJS) $(LIBS) $(DRVLIBS) $(RES) -o $@          $(LD) $(LDFLAGS) $(PROGRAM_TYPE) $(OBJS) $(COREOBJS) $(OSOBJS) $(LIBS) $(DRVLIBS) $(RES) -o $@
528  else  else
# Line 494  ifndef SYMBOLS Line 532  ifndef SYMBOLS
532  #       upx $(EMULATOR)  #       upx $(EMULATOR)
533  endif  endif
534    
535  romcmp$(EXE): $(OBJ)/romcmp.o $(OBJ)/unzip.o  romcmp$(EXE): $(OBJ)/romcmp.o $(OBJ)/unzip.o $(OBJ)/zlib.a
536          @echo Linking $@...          @echo Linking $@...
537  ifdef USE_GCC  ifdef USE_GCC
538          $(LD) $(LDFLAGS) $(CONSOLE_PROGRAM) $^ $(LIBS) -o $@          $(LD) $(LDFLAGS) $(CONSOLE_PROGRAM) $^ $(OBJ)/zlib.a $(LIBS) -o $@
539  else  else
540          $(LD) $(LDFLAGS) $(CONSOLE_PROGRAM) $(LIBS) $(OBJ)/Win32/dirent.o -out:$@ $^          $(LD) $(LDFLAGS) $(CONSOLE_PROGRAM) $(OBJ)/zlib.a $(LIBS)$(OBJ)/Win32/dirent.o -out:$@ $^
541  endif  endif
542    
543  hdcomp$(EXE): $(OBJ)/romcmp.o $(OBJ)/unzip.o  hdcomp$(EXE): $(OBJ)/romcmp.o $(OBJ)/unzip.o $(OBJ)/zlib.a
544          @echo Linking $@...          @echo Linking $@...
545  ifdef USE_GCC  ifdef USE_GCC
546          $(LD) $(LDFLAGS) $(CONSOLE_PROGRAM) $^ $(LIBS) -o $@          $(LD) $(LDFLAGS) $(CONSOLE_PROGRAM) $^ $(OBJ)/zlib.a $(LIBS) -o $@
547  else  else
548          $(LD) $(LDFLAGS) $(CONSOLE_PROGRAM) $(LIBS) $(OBJ)/Win32/dirent.o -out:$@ $^          $(LD) $(LDFLAGS) $(CONSOLE_PROGRAM) $(OBJ)/zlib.a $(LIBS) $(OBJ)/Win32/dirent.o -out:$@ $^
549  endif  endif
550    
551  #--------------------------------------------------------------------  #--------------------------------------------------------------------
# Line 642  $(OBJ)/cpu/m68000/68020.o:  $(OBJ)/cpu/m Line 680  $(OBJ)/cpu/m68000/68020.o:  $(OBJ)/cpu/m
680    
681  $(OBJ)/%.a:  $(OBJ)/%.a:
682          @echo Archiving $@...          @echo Archiving $@...
683          @if exist $@ $(RM) $(subst /,\,$@)          $(RM) $@
684  ifdef USE_GCC  ifdef USE_GCC
685          $(AR) cr $@ $^          $(AR) cr $@ $^
686  else  else
# Line 657  makedir: Line 695  makedir:
695          @echo make makedir is no longer necessary, just type make          @echo make makedir is no longer necessary, just type make
696    
697  $(sort $(OBJDIRS)):  $(sort $(OBJDIRS)):
698          $(MD) $(subst /,\,$@)          $(MD) $@
699    
700  maketree2:  maketree2:
701          @echo Making object tree...          @echo Making object tree...
# Line 666  maketree: maketree2 $(sort $(OBJDIRS)) Line 704  maketree: maketree2 $(sort $(OBJDIRS))
704    
705  clean:  clean:
706          @echo Deleting object tree $(OBJ)...          @echo Deleting object tree $(OBJ)...
 #       @if exist $(OBJ) $(RMDIR) $(subst /,\,$(OBJ))  
 #       @echo Deleting $(EMULATOR)...  
 #       @if exist $(EMULATOR) $(RM) $(EMULATOR)  
707          $(RM) -r $(OBJ)          $(RM) -r $(OBJ)
708          @echo Deleting $(EMULATOR)...          @echo Deleting $(EMULATOR)...
709          $(RM) $(EMULATOR)          $(RM) $(EMULATOR)
# Line 678  clean68k: Line 713  clean68k:
713          $(RM) -r $(OBJ)/cpuintrf.o          $(RM) -r $(OBJ)/cpuintrf.o
714          $(RM) -r $(OBJ)/drivers/cps2.o          $(RM) -r $(OBJ)/drivers/cps2.o
715          $(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  

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.13

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26