R. Belmont |
Cuckoo for IGAvania
|
|
|
Reged: 09/21/03
|
Posts: 9714
|
Loc: ECV-197 The Orville
|
|
Send PM
|
|
|
HOW TO: single-driver (formerly "tiny") builds (revised for MAME 0.167+)
#344070 - 08/15/15 11:47 PM
|
|
|
(Revised 11/5/2015 for MAME 0.167+ and the Apple II example now actually works).
make SUBTARGET=name SOURCES=src/mame/drivers/whatever.c REGENIE=1
name affects the output executable name (and can be omitted if the default 'mame' is OK), the SOURCES must be the partial path to at least one driver file.
For example, an Apple II-only binary can be made with "make SOURCES=src/mame/drivers/apple2.c,src/mame/drivers/apple2e.c,src/mame/video/apple2.c REGENIE=1". A Namco System 12-only binary can be made with "make SOURCES=src/mame/drivers/namcos12.c REGENIE=1".
This is much, much faster when working on a driver than making and linking all of MAME, especially post-merger. (Don't forget your usual -j flags to take advantage of multiple cores).
Edited by R. Belmont (11/05/15 06:34 PM)
|
|
|
redk9258 |
Regular
|
|
|
Reged: 09/21/03
|
Posts: 3968
|
Loc: Troy, Illinois USA
|
|
Send PM
|
|
|
Re: HOW TO: single-driver (formerly "tiny") builds
[Re: R. Belmont]
#344079 - 08/16/15 04:50 AM
|
|
|
This post should be a sticky!
This sounds cool. Can you have more than 1 driver? Say Pacman, Donkey Kong & Galaga?
|
|
|
redk9258 |
Regular
|
|
|
Reged: 09/21/03
|
Posts: 3968
|
Loc: Troy, Illinois USA
|
|
Send PM
|
|
|
Re: HOW TO: single-driver (formerly "tiny") builds
[Re: redk9258]
#344082 - 08/16/15 05:52 AM
|
|
|
Doesn't work for me. ;-(
D:\MAMECOMPILE\MAME-SVN>make -j5 SUBTARGET=pacman DRIVERS=src/mame/drivers/pacma n.c REGENIE=1
Code:
Linking pacman.exe... ../../../../mingw-gcc/bin/x64/Release/mame_pacman/libmame_pacman.a(pacman.o):pac man.c:(.text$_ZN13driver_device19driver_init_wrapperI12pacman_stateXadL_ZNS1_12i nit_pacplusEvEEEEvR15running_machine[_ZN13driver_device19driver_init_wrapperI12p acman_stateXadL_ZNS1_12init_pacplusEvEEEEvR15running_machine]+0x9): undefined re ference to `pacman_state::pacplus_decode()' ../../../../mingw-gcc/bin/x64/Release/mame_pacman/libmame_pacman.a(pacman.o):pac man.c:(.text$_ZN13driver_device19driver_init_wrapperI12pacman_stateXadL_ZNS1_13i nit_jumpshotEvEEEEvR15running_machine[_ZN13driver_device19driver_init_wrapperI12 pacman_stateXadL_ZNS1_13init_jumpshotEvEEEEvR15running_machine]+0x9): undefined reference to `pacman_state::jumpshot_decode()' D:/MAMECOMPILE/buildtools/vendor/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2 /../../../../x86_64-w64-mingw32/bin/ld.exe: ../../../../mingw-gcc/bin/x64/Releas e/mame_pacman/libmame_pacman.a(pacman.o): bad reloc address 0x9 in section `.tex t$_ZN13driver_device19driver_init_wrapperI12pacman_stateXadL_ZNS1_13init_jumpsho tEvEEEEvR15running_machine[_ZN13driver_device19driver_init_wrapperI12pacman_stat eXadL_ZNS1_13init_jumpshotEvEEEEvR15running_machine]' D:/MAMECOMPILE/buildtools/vendor/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2 /../../../../x86_64-w64-mingw32/bin/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status pacman.make:224: recipe for target '../../../../../pacman.exe' failed make[2]: *** [../../../../../pacman.exe] Error 1 makefile:88: recipe for target 'pacman' failed make[1]: *** [pacman] Error 2 makefile:749: recipe for target 'windows_x64' failed make: *** [windows_x64] Error 2
|
|
|
|
Re: HOW TO: single-driver (formerly "tiny") builds
[Re: redk9258]
#344087 - 08/16/15 12:10 PM
|
|
|
It won't work for some drivers where there are complex dependencies without manually adding some extra bits to the generated scripts.
I've suggested we add a script parsable list at the top of such files so that we can make them easier to handle and have it automatically add the extra dependencies in such cases, but others shot that idea down.
|
|
|
redk9258 |
Regular
|
|
|
Reged: 09/21/03
|
Posts: 3968
|
Loc: Troy, Illinois USA
|
|
Send PM
|
|
|
Re: HOW TO: single-driver (formerly "tiny") builds
[Re: Haze]
#344091 - 08/16/15 03:25 PM
|
|
|
I tried it again this morning with Donkey Kong. It worked.
|
|
|
Stiletto |
They're always after me Lucky ROMS!
|
|
|
Reged: 03/07/04
|
Posts: 6472
|
|
|
Send PM
|
|
|
Re: HOW TO: single-driver (formerly "tiny") builds
[Re: redk9258]
#344094 - 08/16/15 06:13 PM
|
|
|
> This post should be a sticky!
Done!
- Stiletto
|
|
|
redk9258 |
Regular
|
|
|
Reged: 09/21/03
|
Posts: 3968
|
Loc: Troy, Illinois USA
|
|
Send PM
|
|
|
Re: HOW TO: single-driver (formerly "tiny") builds
[Re: Stiletto]
#350836 - 02/28/16 06:25 PM
|
|
|
I guess this no longer works?
|
|
|