Hmmm, tu n'as pas cherché très bien à mon avis.
$ grep -i fargo `find . -name \*.c`
./export/exp_farg.c:/* exp_farg.c: Routines to export to a Fargo file
./export/exp_farg.c:#ifdef FARGO_SUPPORT
./export/exp_farg.c:// Fargo TI-BASIC fork
./export/exp_farg.c:const I1 FARGO_TIBASIC_FORK[] = {
./export/exp_farg.c:// Get the file size needed to export the program into a Fargo file.
./export/exp_farg.c:SIZE GetFargoFileSize (const PROGRAM *Program)
./export/exp_farg.c: return (MainSection->Size + sizeof (FARGO_TIBASIC_FORK));
./export/exp_farg.c:// Export the internal data structures into a Fargo file.
./export/exp_farg.c:BOOLEAN ExportFargoFile (const PROGRAM *Program, EXP_FILE *File, SIZE FileSize ATTRIBUTE_UNUSED, ProgramCalcs DestCalc ATTRIBUTE_UNUSED)
./export/exp_farg.c: ExportWrite (File, FARGO_TIBASIC_FORK, sizeof (FARGO_TIBASIC_FORK), 1);
./export/exp_farg.c: FailWithError (SectionFileName, "Fargo does not support AMS relocs.");
./export/exp_farg.c: FailWithError (SectionFileName, "Fargo does not support ROM calls. Use `tios__0000' and so on.");
./export/exp_farg.c: FailWithError (SectionFileName, "Fargo does not support RAM calls. Use `kernel__0000' and so on.");
./export/exp_farg.c:#endif /* FARGO_SUPPORT */
./export/export.c:#ifdef FARGO_SUPPORT
./export/export.c:#endif /* FARGO_SUPPORT */
./export/export.c:#ifdef FARGO_SUPPORT
./export/export.c: if (Program->Type == PT_FARGO)
./export/export.c: GetFileSize = GetFargoFileSize;
./export/export.c: ExportFile = ExportFargoFile;
./export/export.c:#endif /* FARGO_SUPPORT */
Voilà un endroit. (Traduction PT_FARGO -> ExportFargoFile.)
./insert/comprrlc.c:#ifdef FARGO_SUPPORT
./insert/comprrlc.c:// Append BSS relocation entries in the format required by Fargo 0.2.1. Append
./insert/comprrlc.c:BOOLEAN InsertFargo021SectionRefs (SECTION *Section, SECTION *TargetSection, SECTION *MergedSection, const LOCATION *Reference)
./insert/comprrlc.c: // Apply the format documented in _fargo021_program_header.s.
./insert/comprrlc.c:// Append library calls in the format required by Fargo 0.2.1.
./insert/comprrlc.c:BOOLEAN InsertFargo021Libraries (SECTION *Section, SECTION *MergedSection, const LOCATION *Reference)
./insert/comprrlc.c:#define AppendI1(i1) ({if (!AppendI1ToSection (Section, (i1))) { Result = FALSE; goto Fargo021LibsOutOfMem; } })
./insert/comprrlc.c:#define AppendI2(i2) ({if (!AppendI2ToSection (Section, (i2))) { Result = FALSE; goto Fargo021LibsOutOfMem; } })
./insert/comprrlc.c: // Apply the format documented in _fargo021_program_header.s.
./insert/comprrlc.c: goto Fargo021LibsOutOfMem;
./insert/comprrlc.c: goto Fargo021LibsOutOfMem;
./insert/comprrlc.c:Fargo021LibsOutOfMem:
./insert/comprrlc.c:#endif /* FARGO_SUPPORT */
./insert/kernel.c:#ifdef FARGO_SUPPORT
./insert/kernel.c:// Append library calls in the format required by Fargo v0.2.0.
./insert/kernel.c:BOOLEAN InsertFargo020Libraries (SECTION *Section)
./insert/kernel.c: // Apply the format documented in _fargo_program_header.s.
./insert/kernel.c:#endif /* FARGO_SUPPORT */
./insert/kernel.c:// TrailingZeroBytes is FALSE, use the Fargo v0.2.x format without
./main.c: if (Fargo)
./main.c:#ifdef FARGO_SUPPORT
./main.c: Program.Type = PT_FARGO;
Voilà un deuxième. (Traduction switch --fargo ou option Fargo dans l'IDE -> PT_FARGO.)
./main.c: Warning (NULL, "Fargo support in TIGCC is experimental.");
./main.c:#else /* !FARGO_SUPPORT */
./main.c: Error (NULL, "Fargo support is not compiled in.");
./main.c:#endif /* !FARGO_SUPPORT */
./main.c:#ifdef FARGO_SUPPORT
./main.c: // Fargo programs use the location in front
./main.c: if (Program.Type == PT_FARGO)
./main.c:#endif /* FARGO_SUPPORT */
./special.c:#ifdef FARGO_SUPPORT
./special.c: else if (SymbolNameMatches ("fargo"))
./special.c: Program->Type = PT_FARGO;
Et voilà le troisième. (Traduction symbole _fargo -> PT_FARGO.)
./special.c:#endif /* FARGO_SUPPORT */
./special.c:#ifdef FARGO_SUPPORT
./special.c: // Under Fargo, _library is a normal symbol as well.
./special.c: if (Program->Type == PT_FARGO)
./special.c:#endif /* FARGO_SUPPORT */
./special.c:#ifdef FARGO_SUPPORT
./special.c: else if (Program->Type == PT_FARGO)
./special.c: Result = Result && AddGlobalImport (Program, "__fargo_library_header");
./special.c: Result = Result && AddGlobalImport (Program, "__fargo_program_header");
./special.c:#endif /* FARGO_SUPPORT */
./special.c: || (!(strcmp (SymbolName, SYMPF_BUILTIN_INSERT "fargo021_relocs")))
./special.c:#ifdef FARGO_SUPPORT
./special.c: // Fargo-specific formats.
./special.c: else if (NameMatches ("fargo_exports"))
./special.c: else if (NameMatches ("fargo020_bss_refs"))
./special.c: else if (NameMatches ("fargo020_libs"))
./special.c: return InsertFargo020Libraries (Section);
./special.c:#endif /* FARGO_SUPPORT */
./special.c:#ifdef FARGO_SUPPORT
./special.c: // Fargo-specific formats.
./special.c: if (NameMatches ("fargo021_relocs"))
./special.c: else if (NameMatches ("fargo021_bss_refs"))
./special.c: return InsertFargo021SectionRefs (Section, Program->BSSSection, MergedSection, &Reference);
./special.c: else if (NameMatches ("fargo021_libs"))
./special.c: return InsertFargo021Libraries (Section, MergedSection, &Reference);
./special.c:#endif /* FARGO_SUPPORT */
Comme tu vois, ça se fait en 2 étapes. D'abord, on met le type du programme en fonction des switches (dans main.c) et/ou des exports à noms réservés (dans special.c), puis on met le type d'exportation en fonction du type du programme (dans export/export.c).