i4_make.hh 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /********************************************************************** <BR>
  2. This file is part of Crack dot Com's free source code release of
  3. Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
  4. information about compiling & licensing issues visit this URL</a>
  5. <PRE> If that doesn't help, contact Jonathan Clark at
  6. golgotha_source@usa.net (Subject should have "GOLG" in it)
  7. ***********************************************************************/
  8. #ifndef __I4_MAKE_HH
  9. #define __I4_MAKE_HH
  10. #include "table.hh"
  11. enum {
  12. BUILD_DEBUG =1<<0,
  13. BUILD_OPT =1<<1,
  14. BUILD_PROF =1<<2,
  15. BUILD_CLEAN =1<<3,
  16. BUILD_BACKUP =1<<4,
  17. BUILD_LAST =BUILD_BACKUP
  18. };
  19. enum os_type {
  20. OS_WIN32,
  21. OS_LINUX
  22. };
  23. enum
  24. {
  25. WIN32_CONSOLE_APP,
  26. WIN32_WINDOWED_APP
  27. };
  28. // global options
  29. struct mk_options_struct
  30. {
  31. int show_deps;
  32. int build_flags;
  33. int continue_on_error;
  34. int no_libs;
  35. int verbose,quiet;
  36. int unix_libs_are_shared;
  37. int no_compile;
  38. int no_tmp;
  39. int no_syms;
  40. int show_includes;
  41. char *project_file;
  42. char *target_name;
  43. char *tmp_dir;
  44. list targets_to_build;
  45. list targets_built;
  46. char slash_char;
  47. os_type os;
  48. int is_unix() { if (os==OS_LINUX) return 1; else return 0; }
  49. mk_options_struct()
  50. {
  51. project_file="project.i4";
  52. continue_on_error=0;
  53. build_flags=0;
  54. target_name=0;
  55. verbose=0;
  56. quiet=0;
  57. no_libs=0;
  58. show_deps=0;
  59. unix_libs_are_shared=0;
  60. no_compile=0;
  61. tmp_dir=0;
  62. no_tmp=0;
  63. no_syms=0;
  64. show_includes=0;
  65. }
  66. void get(int argc, char **argv);
  67. };
  68. list mk_global_defines;
  69. // options dependant on each target
  70. struct mk_target_struct
  71. {
  72. char *def_file;
  73. char *target;
  74. char *target_type;
  75. char *outdir;
  76. list dlls, libs, src, inc, defines;
  77. int app_type;
  78. char *cc_flags, *link_flags;
  79. void reset()
  80. {
  81. app_type=WIN32_CONSOLE_APP;
  82. def_file=0;
  83. target=0;
  84. cc_flags=0;
  85. link_flags=0;
  86. target=0;
  87. target_type=0;
  88. outdir=0;
  89. dlls.clear();
  90. libs.clear();
  91. src.clear();
  92. inc.clear();
  93. defines.clear();
  94. }
  95. mk_target_struct()
  96. {
  97. reset();
  98. }
  99. };
  100. extern mk_options_struct mk_options;
  101. #endif