RULES.MAK 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  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. # Size of the program shape buffer (passed to MAKESHPS.EXE)
  19. SHAPEBUFFSIZE = 20000
  20. # Default paths to use
  21. ROOTCD = v:\projects\c&c0\cstrike2\cd\\
  22. ROOTDIR = ..\\
  23. MAPDIR = ..\\
  24. ROOTCODEDIR = .\\
  25. ABSROOT = ..\\
  26. WAVDIR = f:\projects\c&c0\audio\amingame\\
  27. SCOREDIR = f:\projects\c&c0\audio\amingame\scores\\
  28. VQADIR = f:\projects\c&c0\art\movies\\
  29. LANGDIR =
  30. INGAMEDIR = ingame
  31. TEMPDIR = s:
  32. # Override paths
  33. !if $d(GERMAN)
  34. ROOTCD = v:\projects\c&c0\cstrike2\cdger\\
  35. ROOTDIR = ..\\
  36. MAPDIR = ..\ger
  37. ROOTCODEDIR = .\\
  38. ABSROOT = ..\\
  39. WAVDIR = f:\projects\c&c0\audio\amingame\\
  40. LANGDIR = \german
  41. INGAMEDIR = ingamegr
  42. #VQADIR = s:t\\
  43. VQADIR = t:movies\\
  44. TEMPDIR = s:
  45. !endif
  46. !if $d(FRENCH)
  47. ROOTCD = v:\projects\c&c0\cstrike2\cdfre\\
  48. ROOTDIR = ..\\
  49. MAPDIR = ..\fre
  50. ROOTCODEDIR = .\\
  51. ABSROOT = ..\\
  52. WAVDIR = f:\projects\c&c0\audio\amingame\
  53. LANGDIR = \french
  54. INGAMEDIR=ingamefr
  55. VQADIR = t:movies\\
  56. TEMPDIR = s:
  57. !endif
  58. # Directory where temporary mixfiles can be stored.
  59. !if $d(TEMP_MIX_DIR)
  60. TEMP_MIX_DIR = $(TEMP_MIX_DIR)
  61. !else
  62. TEMP_MIX_DIR = $(TEMPDIR)t\m
  63. !endif
  64. !if $d(CPS)
  65. TEMP_CPS_DIR = $(CPS)
  66. !else
  67. TEMP_CPS_DIR = $(TEMPDIR)t
  68. !endif
  69. #.path.a6a = $(TEMP_CPS_DIR)\\ # Game formatted audio data
  70. #.path.a6j = $(TEMP_CPS_DIR)\\ # Game formatted audio data
  71. #.path.a8 = $(TEMP_CPS_DIR)\\ # Game formatted audio data
  72. #.path.a80 = $(TEMP_CPS_DIR)\\ # Game formatted audio data
  73. #.path.a81 = $(TEMP_CPS_DIR)\\ # Game formatted audio data
  74. #.path.a82 = $(TEMP_CPS_DIR)\\ # Game formatted audio data
  75. #.path.a83 = $(TEMP_CPS_DIR)\\ # Game formatted audio data
  76. #.path.a84 = $(TEMP_CPS_DIR)\\ # Game formatted audio data
  77. #.path.a8a = $(TEMP_CPS_DIR)\\ # Game formatted audio data
  78. #.path.a8j = $(TEMP_CPS_DIR)\\ # Game formatted audio data
  79. .path.a6 = $(TEMP_CPS_DIR)\\ # Game formatted audio data
  80. .path.anm = $(ROOTDIR)art\$(INGAMEDIR)\\ # Raw animation file
  81. .path.ash = .\\ # Autogenerated assembly header file
  82. .path.asm = .\\ # Raw assembly file
  83. .path.aud = $(TEMP_CPS_DIR)\\ # Game formatted audio data
  84. .path.c = .\\ # Raw C file
  85. .path.cd1 = $(ROOTCD)CD4\\ # CD #1 (Allies)
  86. .path.cd2 = $(ROOTCD)CD2\\ # CD #1 (Soviet)
  87. .path.cpp = .\\ # Raw C++ file
  88. .path.cps = $(TEMP_CPS_DIR)\\ # Compressed art
  89. .path.dat = $(TEMP_CPS_DIR)\\ # Generic data
  90. .path.des = $(TEMP_CPS_DIR)\\ # Desert icons
  91. .path.dip = $(TEMP_CPS_DIR)\\ # Generic compressed text (obsolete)
  92. .path.eng = $(TEMP_CPS_DIR)\\ # English compressed text
  93. .path.exe = $(ROOTDIR)run\\ # Executable (relative path from OBJ directory)
  94. .path.fin = $(ROOTDIR)art\ingame\fin\\ # Finale source animation
  95. .path.fnt = $(TEMP_CPS_DIR)\\ # Font (compressed)
  96. .path.foc = $(ROOTDIR)audio\french\\ # French digitized voices
  97. .path.fre = $(TEMP_CPS_DIR)\\ # French compressed text
  98. .path.gdi = $(TEMP_CPS_DIR)\\ # Good guy compressed files
  99. .path.ger = $(TEMP_CPS_DIR)\\ # German compressed text
  100. .path.goc = $(ROOTDIR)audio\german\\ # German digitized voices
  101. .path.h = .\\ # C header file
  102. .path.hi = $(TEMP_CPS_DIR)\\ # Shape file (processed)
  103. .path.hnt = $(TEMP_CPS_DIR)\\ # Font (compressed)
  104. .path.i = .\\ # Assembly header
  105. .path.icn = $(TEMP_CPS_DIR)\\ # Icon file (compressed)
  106. .path.ini = $(MAPDIR)maps\\ # INI control files
  107. .path.int = $(TEMP_CPS_DIR)\\ # Interior icons
  108. .path.j6 = $(TEMP_CPS_DIR)\\ # Game formatted audio data
  109. .path.jp = $(TEMP_CPS_DIR)\\ # Dinosaur compressed files
  110. .path.jun = $(TEMP_CPS_DIR)\\ # Jungle icons
  111. .path.juv = $(TEMP_CPS_DIR)\\ # Juvenile sound effects.
  112. .path.lbm = $(ROOTDIR)art\ingame\\ # Source art (uncompressed)
  113. .path.lnt = $(TEMP_CPS_DIR)\\ # Font (compressed)
  114. .path.low = $(TEMP_CPS_DIR)\\ # Shape file (processed)
  115. .path.lut = $(TEMP_CPS_DIR)\\ # Look up tables
  116. .path.mak = .\\ # Shape making control file
  117. .path.map = $(TEMP_CPS_DIR)\\ # Icon map data file
  118. .path.mid = $(ROOTDIR)audio\mid\\ # Midi file
  119. .path.mix = $(TEMP_MIX_DIR)\\ # Mix-file location.
  120. .path.mpr = $(MAPDIR)maps\\ # Multiplayer scenario files
  121. .path.mrf = $(TEMP_CPS_DIR)\\ # Palette morph data files
  122. .path.nod = $(TEMP_CPS_DIR)\\ # Bad guy compressed files
  123. .path.o = obj\\ # Overlay object file
  124. .path.obj = obj\\ # Object file
  125. .path.out = .\\ # Temporary parser file.
  126. .path.pak = $(ROOTDIR)run\\ # Packed file
  127. .path.pal = $(TEMP_CPS_DIR)\\ # Palette file (processed)
  128. .path.pcx = $(TEMP_CPS_DIR)\\ #.pcx files
  129. .path.pkt = $(MAPDIR)maps\\ # Scenario grouping control files
  130. .path.r00 = $(TEMP_CPS_DIR)\\ # Infantry response.
  131. .path.r01 = $(TEMP_CPS_DIR)\\ # Infantry response.
  132. .path.r02 = $(TEMP_CPS_DIR)\\ # Infantry response.
  133. .path.r03 = $(TEMP_CPS_DIR)\\ # Infantry response.
  134. .path.shp = $(TEMP_CPS_DIR)\\ # Shape file (processed)
  135. .path.sno = $(TEMP_CPS_DIR)\\ # Snow icons
  136. .path.sym = .\\ # Precompiled header symbol file.
  137. .path.tbl = $(TEMP_CPS_DIR)\\ # Remap table file.
  138. .path.tem = $(TEMP_CPS_DIR)\\ # Temperate icons
  139. .path.txt = $(ROOTDIR)code\eng\\ # Default location for text files.
  140. .path.v00 = $(TEMP_CPS_DIR)\\ # Infantry response.
  141. .path.v01 = $(TEMP_CPS_DIR)\\ # Infantry response.
  142. .path.v02 = $(TEMP_CPS_DIR)\\ # Infantry response.
  143. .path.v03 = $(TEMP_CPS_DIR)\\ # Infantry response.
  144. .path.v16 = $(TEMP_CPS_DIR)\\ # Game formatted audio data
  145. .path.vqa = $(VQADIR)vq$(LANGDIR)\\ # VQA movie files location.
  146. .path.vqp = $(VQADIR)vq$(LANGDIR)\\ # VQA Movie Interpolated palette files
  147. !if $d(FRENCH)
  148. .path.vqa = $(VQADIR)vq\french\\ # VQA movie files location.
  149. .path.vqp = $(VQADIR)vq\french\\ # VQA Movie Interpolated palette files
  150. !endif
  151. .path.wav = $(WAVDIR) # Digitized sample file (generic)
  152. .path.win = $(TEMP_CPS_DIR)\\ # Winter icons
  153. .path.wsa = $(TEMP_CPS_DIR)\\ # Processed animation file
  154. .path.wv = $(ROOTDIR)audio\wv\\ # Digitized sample file (generic)
  155. .path.xmi = $(ROOTDIR)audio\xmi\\ # MT-32 midi scores
  156. ##########################################################################
  157. # Rules
  158. #
  159. # Rule for converting anim files.
  160. #
  161. .anm.wsa:
  162. utils\animate $*.anm $(.path.anm)$&.lbm $(.path.wsa)$&.wsa -l -f -p
  163. #
  164. # Rule for converting art files.
  165. #
  166. .lbm.cps:
  167. utils\wwcomp $*.lbm $(.path.cps)$&.cps -ex -i
  168. #
  169. # Rule for converting outtake first frame art files.
  170. #
  171. {$(.path.lbm)outtake}.lbm.cps:
  172. utils\wwcomp $*.lbm $(.path.cps)$&.cps -ex
  173. {$(.path.anm)outtake}.anm.wsa:
  174. utils\animate $*.anm $(.path.anm)outtake\$&.lbm $(.path.wsa)$&.wsa -l -f -p
  175. {$(.path.anm)score}.anm.wsa:
  176. utils\animate $*.anm $(.path.wsa)$&.wsa -p
  177. #########################################################
  178. # Rule for creating palette files.
  179. #
  180. {$(.path.lbm)palettes}.lbm.pal:
  181. utils\wwcomp $*.lbm -ppal
  182. copy $&.pal $(.path.pal)$&.pal
  183. del $&.pal
  184. {$(.path.lbm)score}.lbm.pal:
  185. utils\wwcomp $*.lbm -ppal
  186. copy $&.pal $(.path.pal)$&.pal
  187. del $&.pal
  188. #########################################################
  189. # Rule for creating vehicles.
  190. {$(.path.anm)units}.anm.shp:
  191. utils\keyframe $*.anm $(.path.shp)$&.shp -l
  192. #########################################################
  193. # Rule for creating buildings.
  194. {$(.path.anm)building}.anm.shp:
  195. utils\keyframe $*.anm $(.path.shp)$&.shp -l
  196. #########################################################
  197. # Rule for creating misc shape animations.
  198. {$(.path.anm)anim}.anm.shp:
  199. utils\keyframe $*.anm $(.path.shp)$&.shp -l
  200. #########################################################
  201. # Rule for converting font files.
  202. {$(.path.lbm)fonts}.lbm.fnt:
  203. echo Creating font file "$&.fnt".
  204. utils\fontmake $*.lbm -o$(.path.fnt)$&.fnt
  205. {$(.path.lbm)hires}.lbm.hnt:
  206. echo Creating hi-res font file "$&.fnt".
  207. utils\fontmake $*.lbm -o$(.path.hnt)$&.hnt
  208. {$(.path.lbm)hires}.lbm.fnt:
  209. echo Creating lo-res font file "$&.fnt".
  210. utils\fontmake $*.lbm -o$(.path.hnt)$&.fnt
  211. {$(.path.lbm)lores}.lbm.lnt:
  212. echo Creating lo-res font file "$&.fnt".
  213. utils\fontmake $*.lbm -o$(.path.lnt)$&.lnt
  214. {$(.path.lbm)lores}.lbm.fnt:
  215. echo Creating lo-res font file "$&.fnt".
  216. utils\fontmake $*.lbm -o$(.path.lnt)$&.fnt
  217. #########################################################
  218. # Rules for creating overlay files.
  219. {$(.path.lbm)overlay}.lbm.cps:
  220. utils\wwcomp $*.lbm $(.path.cps)$&.cps
  221. {$(.path.anm)overlay}.anm.shp:
  222. utils\keyframe $*.anm $(.path.shp)$&.shp -l
  223. #########################################################
  224. # Rules for creating temperate files.
  225. {$(.path.lbm)temperat}.lbm.tem:
  226. utils\iconmap -r -w3 -o$(.path.tem)$&.tem $*.lbm
  227. {$(.path.anm)temperat}.anm.tem:
  228. utils\keyframe $*.anm $(.path.tem)$&.tem -l
  229. #########################################################
  230. # Rules for creating interior files.
  231. {$(.path.lbm)interior}.lbm.int:
  232. utils\iconmap -r -w3 -o$(.path.int)$&.int $*.lbm
  233. {$(.path.anm)interior}.anm.int:
  234. utils\keyframe $*.anm $(.path.int)$&.int -l
  235. #########################################################
  236. # Rules for creating winter files.
  237. {$(.path.lbm)snow}.lbm.sno:
  238. utils\iconmap -r -w3 -o$(.path.sno)$&.sno $*.lbm
  239. {$(.path.anm)snow}.anm.sno:
  240. utils\keyframe $*.anm $(.path.sno)$&.sno -l
  241. #########################################################
  242. # Rules for creating desert files.
  243. {$(.path.lbm)desert}.lbm.des:
  244. utils\iconmap -r -w3 -o$(.path.des)$&.des $*.lbm
  245. {$(.path.anm)desert}.anm.des:
  246. utils\keyframe $*.anm $(.path.des)$&.des -l
  247. #########################################################
  248. # Generic icon file creation.
  249. .lbm.icn:
  250. utils\iconmap -r -w3 -o$(.path.icn)$&.icn $*.lbm
  251. #########################################################
  252. # Text files.
  253. {eng}.txt.eng:
  254. utils\textmake $*.txt $(.path.eng)$&.eng $&.h
  255. {ger}.txt.ger:
  256. utils\textmake $*.txt $(.path.ger)$&.ger $&.h
  257. {fre}.txt.fre:
  258. utils\textmake $*.txt $(.path.fre)$&.fre $&.h
  259. #########################################################
  260. # Score/mapsel files.
  261. {$(.path.anm)score}.anm.shp:
  262. utils\keyframe $*.anm $(.path.shp)$&.shp -l
  263. {$(.path.lbm)score}.lbm.cps:
  264. utils\wwcomp $*.lbm $(.path.cps)$&.cps -ex -i
  265. #########################################################
  266. # Generic shape files.
  267. #.lbm.shp:
  268. # utils\makeshps -q $*.lbm $&.mak $(.path.cps)$&.shp $(SHAPEBUFFSIZE)
  269. {$(.path.anm)generic}.anm.shp:
  270. utils\keyframe $*.anm $(.path.shp)$&.shp -l
  271. .c.lob:
  272. utils\LINT -ml -si2 -sl4 +v $(WWLIB)WWLIB.LNT $*.c >$&.err
  273. # Generic shape file creation.
  274. {$(.path.anm)}.anm.shp:
  275. utils\keyframe $*.anm $(.path.shp)$&.shp -l
  276. {$(.path.lbm)units}.lbm.cps:
  277. utils\wwcomp $*.lbm $(.path.cps)$&.cps -ex -i
  278. ##########################################################
  279. # Hi-res data files
  280. #
  281. {$(.path.anm)hires}.anm.hi:
  282. utils\keyframe $*.anm $(.path.hi)$&.hi -l
  283. # Hi-res font files
  284. {$(.path.lbm)hires}.lbm.fnt:
  285. echo Creating font file "$&.fnt".
  286. utils\fontmake $*.lbm -o$(.path.fnt)$&.fnt
  287. #########################################################
  288. # Rule for creating low res data files.
  289. {$(.path.anm)lores}.anm.low:
  290. utils\keyframe $*.anm $(.path.low)$&.low -l
  291. {$(.path.lbm)lores}.lbm.cps:
  292. utils\wwcomp $*.lbm $(.path.cps)$&.cps -ex -i
  293. #######################################
  294. # Rules to convert 16 bit audio files.
  295. {$(SCOREDIR)}.wav.aud:
  296. utils\audiomak $(SCOREDIR)$&.wav $(.path.aud)$&.aud
  297. {$(.path.wav)speech$(LANGDIR)}.wav.aud:
  298. utils\audiomak $(.path.wav)speech$(LANGDIR)\$&.wav $(.path.aud)$&.aud
  299. {$(.path.wav)sfx\tanya$(LANGDIR)}.wav.aud:
  300. utils\audiomak $(.path.wav)sfx\tanya$(LANGDIR)\$&.wav $(.path.aud)$&.aud
  301. {$(.path.wav)sfx$(LANGDIR)}.wav.aud:
  302. utils\audiomak $(.path.wav)sfx$(LANGDIR)\$&.wav $(.path.aud)$&.aud
  303. {$(.path.wav)sfx\v00$(LANGDIR)}.wav.v00:
  304. utils\audiomak $(.path.wav)sfx\v00$(LANGDIR)\$&.wav $(.path.aud)$&.v00
  305. {$(.path.wav)sfx\v01$(LANGDIR)}.wav.v01:
  306. utils\audiomak $(.path.wav)sfx\v01$(LANGDIR)\$&.wav $(.path.aud)$&.v01
  307. {$(.path.wav)sfx\v02$(LANGDIR)}.wav.v02:
  308. utils\audiomak $(.path.wav)sfx\v02$(LANGDIR)\$&.wav $(.path.aud)$&.v02
  309. {$(.path.wav)sfx\v03$(LANGDIR)}.wav.v03:
  310. utils\audiomak $(.path.wav)sfx\v03$(LANGDIR)\$&.wav $(.path.aud)$&.v03
  311. {$(.path.wav)sfx\r00$(LANGDIR)}.wav.r00:
  312. utils\audiomak $(.path.wav)sfx\r00$(LANGDIR)\$&.wav $(.path.aud)$&.r00
  313. {$(.path.wav)sfx\r01$(LANGDIR)}.wav.r01:
  314. utils\audiomak $(.path.wav)sfx\r01$(LANGDIR)\$&.wav $(.path.aud)$&.r01
  315. {$(.path.wav)sfx\r02$(LANGDIR)}.wav.r02:
  316. utils\audiomak $(.path.wav)sfx\r02$(LANGDIR)\$&.wav $(.path.aud)$&.r02
  317. {$(.path.wav)sfx\r03$(LANGDIR)}.wav.r03:
  318. utils\audiomak $(.path.wav)sfx\r03$(LANGDIR)\$&.wav $(.path.aud)$&.r03