mirror of
https://github.com/simh/simh.git
synced 2026-01-26 12:02:14 +00:00
BUILDROMS: Reorganize defines so multiple ROM includes have consistent names
This commit is contained in:
@@ -349,15 +349,11 @@ fprintf (iFile, " This file is a generated file and should NOT be edited or ch
|
||||
if (Comments)
|
||||
fprintf (iFile, "\r\n %s\r\n\r\n", Comments);
|
||||
fprintf (iFile, "*/\r\n");
|
||||
fprintf (iFile, "#undef BOOT_CODE_SIZE\r\n");
|
||||
fprintf (iFile, "#if !defined(BOOT_CODE_SIZE)\r\n");
|
||||
fprintf (iFile, "#define BOOT_CODE_SIZE 0x%X\r\n", (int)statb.st_size);
|
||||
fprintf (iFile, "#undef BOOT_CODE_CHECKSUM\r\n");
|
||||
fprintf (iFile, "#define BOOT_CODE_CHECKSUM 0x%X\r\n", checksum);
|
||||
fprintf (iFile, "#undef BOOT_CODE_FILENAME\r\n");
|
||||
fprintf (iFile, "#define BOOT_CODE_FILENAME \"%s\"\r\n", load_filename);
|
||||
fprintf (iFile, "#undef BOOT_CODE_FILEPATH\r\n");
|
||||
fprintf (iFile, "#define BOOT_CODE_FILEPATH \"%s\"\r\n", rom_filename);
|
||||
fprintf (iFile, "#undef BOOT_CODE_ARRAY\r\n");
|
||||
fprintf (iFile, "#if defined(DONT_USE_INTERNAL_ROM)\r\n");
|
||||
fprintf (iFile, "#define BOOT_CODE_ARRAY NULL\r\n");
|
||||
fprintf (iFile, "#else\r\n");
|
||||
@@ -365,7 +361,7 @@ fprintf (iFile, "#define BOOT_CODE_ARRAY %s\r\n", rom_array_name);
|
||||
fprintf (iFile, "#endif\r\n");
|
||||
fprintf (iFile, "#define BOOT_CODE_URL NULL\r\n");
|
||||
for (rom = 1; rom <= MAX_CONCURRENT_ROMS; rom++) {
|
||||
fprintf (iFile, "%s !defined(BOOT_CODE_SIZE_%d)\r\n", (rom == 1) ? "#if" : "#elif", rom);
|
||||
fprintf (iFile, "#elif !defined(BOOT_CODE_SIZE_%d)\r\n", rom);
|
||||
fprintf (iFile, "#define BOOT_CODE_SIZE_%d 0x%X\r\n", rom, (int)statb.st_size);
|
||||
fprintf (iFile, "#define BOOT_CODE_CHECKSUM_%d 0x%X\r\n", rom, checksum);
|
||||
fprintf (iFile, "#define BOOT_CODE_FILENAME_%d \"%s\"\r\n", rom, load_filename);
|
||||
|
||||
Reference in New Issue
Block a user