MAKEFILE 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. #
  2. # Command & Conquer Red Alert(tm)
  3. # Copyright 2025 Electronic Arts Inc.
  4. #
  5. # This program is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. #
  18. .AUTODEPEND
  19. OBJECTS = audiomak.obj scode.obj
  20. .cpp.obj:
  21. bcc {$*.cpp }
  22. .asm.obj:
  23. tasm $<,$&.obj
  24. audiomak.exe: turboc.cfg tasm.cfg tlink.cfg $(OBJECTS)
  25. tlink @&&!
  26. c0l.obj $(OBJECTS)
  27. audiomak.exe
  28. audiomak.map
  29. CL.LIB MATHL.LIB EMU.LIB
  30. !
  31. ####################################################################
  32. # Creates the TURBOC configuration file (also affects CPP.EXE)
  33. turboc.cfg: makefile
  34. copy &&!
  35. -v # Debugging output.
  36. -y
  37. -Vt # Virtual table pointer comes at end of class members (NEVER CHANGE).
  38. -Vb- # Always near pointer to virtual table.
  39. -a- # Structures are packed (not byte aligned).
  40. -b- # Enums as small as possible.
  41. -3 # Enable 386 instructions.
  42. -ml # Large model.
  43. -C- # Don't allow nested comments (DON'T CHANGE THIS).
  44. -c # Just compile -- don't link.
  45. -Jg # Template instances are merged to avoid duplicates.
  46. -Id:\bc4\include # Header search path.
  47. -P- # If extension = .CPP then compile as C++, otherwise treat as C.
  48. -w # Enable all warnings.
  49. # -w! # Treat all warnings as errors.
  50. -X- # Turn on autodependency checking.
  51. -RT # Enable run time type itentification.
  52. -x # Enable exception handling code.
  53. -k- # Optimize: Use abbreviated stack frame.
  54. -vi # Turns "inline" expansion on.
  55. -Z # Optimize: Supress redundant register loads.
  56. -Oi # Optimize: Helper functions expanded inline.
  57. -O # Optimize: Jump optimization.
  58. -Op # Optimize: Copy propagation to supress reloads.
  59. -Ov # Optimize: Speeds array indexing inside of loops.
  60. -Og # Optimize: Eliminates common subexpressions (globally).
  61. -Oc # Optimize: Eliminates common subexpressions (locally).
  62. -Ol # Optimize: Use REP instruction where possible.
  63. -d # Optimize: Duplicate strings are merged.
  64. -r # Try to put auto variables into registers.
  65. -V # Use smart virtual tables (only usable with BCC and TLINK).
  66. -dc- # Keep strings in the data segment (DON'T CHANGE THIS).
  67. -Ff # Put very very large objects into the far segment.
  68. -K2- # Treat "char" different from "signed char" or "unsigned char".
  69. -Oa # Optimize: Assumes no pointer aliasing (could cause bugs)!
  70. -R- # Don't include browser data (only used by IDE).
  71. # -Oe # Optimize: Global register allocation tracking enabled.
  72. # -Ob # Optimize: Dead code elimination.
  73. # -Om # Optimize: Remove invariant code from loops.
  74. # -p # Pascal calling convention default.
  75. # -pr # Regiser calling convention default.
  76. # -po # Pass "this" in registers when calling member functions.
  77. # -f- # Floating point prohibited.
  78. # -Yo # Compile as overlay module.
  79. # -Ox # Optimize: Execution speed.
  80. ! turboc.cfg /Q
  81. ####################################################################
  82. # Creates TASM config file.
  83. tasm.cfg: makefile
  84. copy &&!
  85. /Zi # Include debug information into object file.
  86. /w+ICG
  87. /w-PDC
  88. /t
  89. /w2 # Maximum warning level.
  90. /ml # Large model.
  91. /w+
  92. /v
  93. /JIDEAL # Ideal mode.
  94. /JP386N # Enable 386 instructions.
  95. /UT300 # Force compatibility with old TASM.
  96. ! tasm.cfg
  97. ####################################################################
  98. # Creates the TLINK.CFG file which implicitly controls linking.
  99. tlink.cfg: makefile
  100. copy &&!
  101. /Ld:\bc4\lib
  102. /v
  103. /c
  104. /e
  105. /Tde
  106. ! tlink.cfg /Q