MAKEFILE.BOR 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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. #***************************************************************************
  19. #** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S **
  20. #***************************************************************************
  21. #* *
  22. #* Project Name : Westwood Library .LIB makefile *
  23. #* *
  24. #* File Name : MAKEFILE *
  25. #* *
  26. #* Programmer : Julio R. Jerez *
  27. #* *
  28. #* Start Date : Jan 26, 1995 *
  29. #* *
  30. #* *
  31. #*-------------------------------------------------------------------------*
  32. #* *
  33. #* Required environment variables: *
  34. #* WIN32LIB = your root WWFLAT path *
  35. #* WIN32VCS = root directory for wwlib version control archive *
  36. #* COMPILER = your Watcom installation path *
  37. #* *
  38. #* Required changes to makefile: *
  39. #* LIBS = list of all component libraries *
  40. #* *
  41. #* NOTE: For this makefile to work, each library directory MUST have the *
  42. #* same name as its library. *
  43. #* *
  44. #* "make install" installs the library on your drive *
  45. #* "make update" updates all source files in your slice *
  46. #* *
  47. #* To install or update just one library you may type: *
  48. #* "make -DLIBS=misc.lib install" *
  49. #* *
  50. #***************************************************************************
  51. #---------------------------------------------------------------------------
  52. # Verify user's environment
  53. #---------------------------------------------------------------------------
  54. !ifndef WIN32LIB
  55. !error WIN32LIB Environment var not configured.
  56. !endif
  57. !ifndef WIN32VCS
  58. !error WIN32VCS Environment var not configured.
  59. !endif
  60. !ifndef COMPILER
  61. !error COMPILER Environment var not configured.
  62. !endif
  63. #===========================================================================
  64. # User-defined section: list each library in this macro
  65. # NOTE: These are some order dependencies:
  66. # 1. The directory MISC must always be made first.
  67. # 2. The directory VIDEO must be made before the SYSTEM directory.
  68. #===========================================================================
  69. LIB_NAME = win32lib
  70. LIB_DIR = $(WIN32LIB)\lib
  71. !include $(WIN32LIB)\\project.cfg
  72. #---------------------------------------------------------------------------
  73. # LIBS macro: a list of all component libraries
  74. # "make LIBS=xxxx.lib [target]" makes/installs/updates only that library
  75. #---------------------------------------------------------------------------
  76. LIBS = \
  77. audio.lib \
  78. dipthong.lib \
  79. drawbuff.lib \
  80. font.lib \
  81. iff.lib \
  82. keyboard.lib \
  83. mem.lib \
  84. misc.lib \
  85. mono.lib \
  86. palette.lib \
  87. rawfile.lib \
  88. tile.lib \
  89. timer.lib \
  90. ww_win.lib \
  91. wsa.lib
  92. LIB_INSTALL = \
  93. audio.ins \
  94. dipthong.ins \
  95. drawbuff.ins \
  96. font.ins \
  97. iff.ins \
  98. keyboard.ins \
  99. mem.ins \
  100. misc.ins \
  101. mono.ins \
  102. palette.ins \
  103. rawfile.ins \
  104. tile.ins \
  105. timer.ins \
  106. ww_win.ins \
  107. wsa.ins
  108. LIB_UPDATE = \
  109. audio.upd \
  110. dipthong.upd \
  111. drawbuff.upd \
  112. font.upd \
  113. iff.upd \
  114. keyboard.upd \
  115. mem.upd \
  116. misc.upd \
  117. mono.upd \
  118. palette.upd \
  119. rawfile.upd \
  120. tile.upd \
  121. timer.upd \
  122. ww_win.upd \
  123. wsa.upd
  124. #===========================================================================
  125. # Pre-defined section: there should be little need to modify this section.
  126. #===========================================================================
  127. #---------------------------------------------------------------------------
  128. # Path macros: one path for each file type.
  129. # These paths are used to tell make where to find/put each file type.
  130. #---------------------------------------------------------------------------
  131. .path.lib = $(WIN32LIB)\\lib
  132. #---------------------------------------------------------------------------
  133. # Tools/commands
  134. # LIB_CMD: library command
  135. # LIB_CFG: library configuration file
  136. # VCS_UPDATE: version control update command; this command should update
  137. # all relevant files in a given directory with read-only
  138. # copies from the archive
  139. #---------------------------------------------------------------------------
  140. LIB_CMD = tlib
  141. VCS_UPDATE = update
  142. #---------------------------------------------------------------------------
  143. # Default target
  144. #---------------------------------------------------------------------------
  145. all: $(LIB_NAME).lib
  146. #---------------------------------------------------------------------------
  147. # Build the library
  148. # The original library is deleted by the librarian
  149. # Lib objects & -+ commands are constructed by substituting within the
  150. # $^@ macro (which expands to all target dependents, separated with
  151. # spaces)
  152. # Tlib's cfg file is not invoked as a response file.
  153. # All headers & source files are copied into WWFLAT\SRCDEBUG, for debugging
  154. #---------------------------------------------------------------------------
  155. $(LIB_NAME).lib: $(LIBS)
  156. del $<
  157. $(LIB_CMD) $< $(LIB_CFG) @&&|
  158. +$(WIN32LIB)\\lib\\audio.lib &
  159. +$(WIN32LIB)\\lib\\dipthong.lib &
  160. +$(WIN32LIB)\\lib\\drawbuff.lib &
  161. +$(WIN32LIB)\\lib\\font.lib &
  162. +$(WIN32LIB)\\lib\\iff.lib &
  163. +$(WIN32LIB)\\lib\\keyboard.lib &
  164. +$(WIN32LIB)\\lib\\mem.lib &
  165. +$(WIN32LIB)\\lib\\misc.lib &
  166. +$(WIN32LIB)\\lib\\mono.lib &
  167. +$(WIN32LIB)\\lib\\palette.lib &
  168. +$(WIN32LIB)\\lib\\rawfile.lib &
  169. +$(WIN32LIB)\\lib\\tile.lib &
  170. +$(WIN32LIB)\\lib\\timer.lib &
  171. +$(WIN32LIB)\\lib\\ww_win.lib &
  172. +$(WIN32LIB)\\lib\\wsa.lib
  173. |
  174. #---------------------------------------------------------------------------
  175. # This construct tells make how to make all component libraries
  176. # The commands get executed for every item in the macro.
  177. # The macro $: extracts only the directory name from the macro item.
  178. #---------------------------------------------------------------------------
  179. $(LIBS):
  180. echo Making $^&...
  181. cd $^&
  182. make
  183. cd ..
  184. #---------------------------------------------------------------------------
  185. # "make install" installs the library on your drive
  186. #---------------------------------------------------------------------------
  187. install: install_dirs $(LIB_INSTALL) .SYMBOLIC
  188. echo Compiling library...
  189. wmake
  190. echo Library installation complete.
  191. #---------------------------------------------------------------------------
  192. # At installation time, this target makes all non-library directories
  193. # This is a dependency for 'install'
  194. #---------------------------------------------------------------------------
  195. install_dirs: .SYMBOLIC
  196. echo Making directories...
  197. mkdir example
  198. mkdir include
  199. mkdir lib
  200. mkdir srcdebug
  201. mkdir tools
  202. cd tools
  203. copy $(%WWVCS)\tools\vcs.cfg
  204. $(VCS_UPDATE)
  205. cd..
  206. copy $(%WWVCS)\vcs.cfg
  207. $(VCS_UPDATE)
  208. cd example
  209. copy $(%WWVCS)\example\vcs.cfg
  210. $(VCS_UPDATE)
  211. cd ..
  212. #---------------------------------------------------------------------------
  213. # This target installs all library directories
  214. # This is a dependency for 'install'
  215. #---------------------------------------------------------------------------
  216. $(LIB_INSTALL): .SYMBOLIC
  217. echo Installing $^&...
  218. md $^&
  219. cd $^&
  220. copy $(%WWVCS)\$^&\vcs.cfg
  221. $(VCS_UPDATE)
  222. copy *.h ..\include
  223. copy *.inc ..\include
  224. cd ..
  225. #---------------------------------------------------------------------------
  226. # "make update" updates all source files in your slice
  227. #---------------------------------------------------------------------------
  228. update: $(LIB_UPDATE) .SYMBOLIC
  229. echo Library updated.
  230. #---------------------------------------------------------------------------
  231. # This target updates all library directories
  232. # This is a dependency for 'updates'
  233. #---------------------------------------------------------------------------
  234. $(LIB_UPDATE): .SYMBOLIC
  235. echo Updating $^&...
  236. cd $^&
  237. $(VCS_UPDATE)
  238. copy *.h ..\include
  239. copy *.inc ..\include
  240. cd ..