If you are committed to building a MAME library (ensuring you have the legal right to do so), avoid the wild west of random directory indexes. Instead, follow these best practices:
A "ROMset" is a massive collection of these files. Because MAME updates regularly to improve accuracy, the ROMs must match the version of the MAME emulator you are using, or they may not work. Understanding the Index of MAME ROMs: Types of Sets index of mame roms