tigcc.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /* TIGCC - A front-end for the compiler, assembler, linker and some other
  2. * stuffs.
  3. * Copyright (C) 2001 John David Ratliff
  4. * Copyright (C) 2001-2002 Romain Liévin
  5. * Copyright (C) 2002-2004 Kevin Kofler
  6. * Modified by Nils Gesbert, 2003
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  21. */
  22. #ifndef _TIGCC_H
  23. #define _TIGCC_H
  24. #define VERSION "1.3.1"
  25. #define TIGCC_VERSION "0.96 Beta 6 r1"
  26. /* global enumerations */
  27. enum Boolean {FALSE,TRUE};
  28. enum FileTypes {BADFILE,CFILE,ASMFILE,SFILE,OFILE,AFILE,QLLFILE};
  29. /* global definitions */
  30. #define REDIRECT "tigcc.log"
  31. #define DEVNULL "/dev/null"
  32. #define TMP_PCK "tempprog.pck"
  33. /* constants */
  34. // #define MAX_ARRAY_FILES 128
  35. /* (NG) Should be OK : */
  36. #define MAX_ARRAY_FILES argc
  37. /* global arrays */
  38. char **gcc_argv = NULL;
  39. char **ld_argv = NULL;
  40. typedef struct {
  41. unsigned short count;
  42. char *files[0];
  43. } array_of_files;
  44. array_of_files *src_files = NULL;
  45. array_of_files *obj_files = NULL;
  46. array_of_files *asm_files = NULL;
  47. array_of_files *a68k_files = NULL;
  48. array_of_files *ar_files = NULL;
  49. const char *tigcc_args[] =
  50. {
  51. "--version", "-V", "-h", "--help", "-q", "--quiet", "-v", "--verbose", "-v0",
  52. "-E", "-S", "-c", "-pack", "-bsr", "-outputbin", "--outputbin", "-standalone",
  53. "--standalone", "-o", "--output", "-r", "--redirect", "-g", "--debug", "-Wa,",
  54. "-WA,", "-np", "-ar", "-quill", "-keep", "--keep", "-save-temps",
  55. "--save-temps", "--native", "--fargo", "--flash-os", "--remove-unused",
  56. "--optimize-relocs", "--optimize-code", "--optimize-nops",
  57. "--optimize-returns", "--optimize-branches", "--optimize-moves",
  58. "--optimize-tests", "--optimize-calcs", "--cut-ranges", "--reorder-sections",
  59. "--merge-constants", "--all-relocs", "--omit-bss-init", "-n", "--varname",
  60. "-d", "--data-var", "--data-var-copy=never", "--data-var-copy=always",
  61. "--data-var-copy=archived", "--dump", "--dump0", "--dump1", "--dump2",
  62. "--dump3", "--dump4", "--dump5", "--dump6", "--dump7", "--dump8", "--dump9",
  63. NULL
  64. };
  65. /* global vars */
  66. char *outfile = NULL;
  67. char packfile[9];
  68. char *tigcc_base = NULL;
  69. char *as_args = NULL;
  70. char *a68k_args = NULL;
  71. /* global control variables */
  72. short int verbose = FALSE, quiet = FALSE, redirect = FALSE, delete = TRUE;
  73. short int debug = FALSE, nostdlib = FALSE, outputbin = FALSE, do_pack = FALSE;
  74. short int do_compile = TRUE, do_assemble = TRUE, do_link = TRUE, staticlib = FALSE;
  75. short int keepobj = FALSE, savetemps = FALSE, fargo = FALSE, flashos = FALSE;
  76. short int allrelocs = FALSE, nomergesections = FALSE, optreturns = FALSE;
  77. short int printcommands = FALSE;
  78. short int gcc_argc = 1;
  79. short int ld_argc = 1;
  80. /* internal/developer use only */
  81. short int patch = TRUE;
  82. #endif