2
0

MAKEFILE 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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 : Blade Runner *
  23. #* *
  24. #* File Name : MAKEFILE *
  25. #* *
  26. #* Programmer : Mike Grayford *
  27. #* *
  28. #* Start Date : Nov 14, 1995 *
  29. #* *
  30. #* Last Update : *
  31. #* *
  32. #*-------------------------------------------------------------------------*
  33. #* *
  34. #* Required environment variables: *
  35. #* WIN32LIB = the root of the WW library *
  36. #* WIN32VCS = root directory for WW library version control archive *
  37. #* COMPILER = your Watcom installation path *
  38. #* *
  39. #* *
  40. #* Required changes to makefile: *
  41. #* PROJ_NAME = name of the executable program you're building *
  42. #* PROJ_LIBS = Westwood libraries to link your EXE to *
  43. #* OBJECTS = list of objects in your current working directory *
  44. #* *
  45. #* Optional changes to makefile: *
  46. #* PROJ_DIR = full pathname of your working directory *
  47. #* .xxx: = full pathname where various file types live *
  48. #* *
  49. #***************************************************************************
  50. #---------------------------------------------------------------------------
  51. # Verify user's environment
  52. #---------------------------------------------------------------------------
  53. !ifndef %WIN32LIB
  54. !error WIN32LIB Environment var not configured.
  55. !endif
  56. !ifndef %WIN32VCS
  57. !error WIN32VCS Environment var not configured.
  58. !endif
  59. !ifndef %WATCOM
  60. !error WATCOM Environment var not configured.
  61. !endif
  62. #===========================================================================
  63. # User-defined section: the user should tailor this section for each project
  64. #===========================================================================
  65. #---------------------------------------------------------------------------
  66. # PROJ_NAME = library name
  67. # PROJ_DIR = directory containing source & objects
  68. #---------------------------------------------------------------------------
  69. PROJ_NAME = VQAVIEW
  70. PROJ_DIR = $(%BLADE)\VQA\VQAVIEW
  71. LIB_DIR = $(%WIN32LIB)\LIB
  72. VQA_LIB_DIR = $(%BLADE)\VQA\LIB
  73. !include $(%WIN32LIB)\project.cfg
  74. #---------------------------------------------------------------------------
  75. # Project-dependent variables
  76. #---------------------------------------------------------------------------
  77. OBJECTS = &
  78. gametime.obj &
  79. main.obj &
  80. mainwind.obj &
  81. monochrm.obj &
  82. movies.obj &
  83. pal.obj &
  84. vq.obj &
  85. wm.obj &
  86. interpal.obj
  87. RESOURCES = &
  88. dialogs.res &
  89. menus.res
  90. PROJ_LIBS = &
  91. drawbuff.lib &
  92. mem.lib &
  93. misc.lib &
  94. rawfile.lib
  95. VQA_LIBS = &
  96. vqa32wp.lib &
  97. vqm32wp.lib
  98. #---------------------------------------------------------------------------
  99. # Path macros: one path for each file type.
  100. # These paths are used to tell make where to find/put each file type.
  101. #---------------------------------------------------------------------------
  102. .EXTENSIONS: .res .rc
  103. .asm: $(PROJ_DIR)
  104. .c: $(PROJ_DIR)
  105. .cpp: $(PROJ_DIR)
  106. .h: $(PROJ_DIR)
  107. .obj: $(PROJ_DIR)
  108. .lib: $(%WIN32LIB)\lib;$(VQA_LIB_DIR)
  109. .exe: $(PROJ_DIR)
  110. .rc: $(PROJ_DIR)
  111. .res: $(PROJ_DIR)
  112. #---------------------------------------------------------------------------
  113. # Tools/commands
  114. #---------------------------------------------------------------------------
  115. C_CMD = wcc386
  116. CPP_CMD = wpp386
  117. LIB_CMD = wlib
  118. LINK_CMD = wlink
  119. ASM_CMD = tasm
  120. RC_CMD = wrc
  121. #---------------------------------------------------------------------------
  122. # Include & library paths
  123. # If LIB & INCLUDE are already defined, they are used in addition to the
  124. # WWLIB32 lib & include; otherwise, they're constructed from
  125. # BCDIR
  126. #---------------------------------------------------------------------------
  127. LIBPATH = $(%WIN32LIB)\LIB;$(%WATCOM)\LIB386\NT;$(BLADE)\VQA\LIB
  128. INCLUDEPATH = $(PROJ_DIR);$(%WIN32LIB)\INCLUDE;$(%WATCOM)\H;$(PROJ_DIR)\..;$(PROJ_DIR)\..\VQA32
  129. #---------------------------------------------------------------------------
  130. # Implicit rules
  131. # Compiler:
  132. # ($< = full dependent with path)
  133. # Assembler:
  134. # output obj's are constructed from .obj: & the $& macro
  135. # ($< = full dependent with path)
  136. # tasm's cfg file is not invoked as a response file.
  137. #---------------------------------------------------------------------------
  138. .c.obj: $(%WIN32LIB)\project.cfg .AUTODEPEND
  139. $(C_CMD) $(CC_CFG) $<
  140. .cpp.obj: $(%WIN32LIB)\project.cfg .AUTODEPEND
  141. $(CPP_CMD) -db $(CC_CFG) /i=$(INCLUDEPATH) $<
  142. .asm.obj: $(%WIN32LIB)\project.cfg
  143. $(ASM_CMD) $(ASM_CFG) $<
  144. .rc.res:
  145. $(RC_CMD) /r $<
  146. #---------------------------------------------------------------------------
  147. # Default target
  148. #---------------------------------------------------------------------------
  149. all: $(PROJ_NAME).exe
  150. #---------------------------------------------------------------------------
  151. # Build the EXE
  152. #---------------------------------------------------------------------------
  153. $(PROJ_NAME).exe: $(OBJECTS) $(PROJ_NAME).lnk $(PROJ_LIBS) $(VQA_LIBS) $(RESOURCES)
  154. $(LINK_CMD) $(LINK_CFG) name $^@ @$(PROJ_NAME).lnk
  155. for %index in ($(RESOURCES)) do $(RC_CMD) -t %index $(PROJ_NAME).exe
  156. #$(PROJ_LIBS):
  157. # echo updating base library $^@
  158. # cd ..
  159. # wmake
  160. # cd $(PROJ_DIR)
  161. $(PROJ_NAME).lnk : $(OBJECTS) makefile
  162. %create $^@
  163. for %index in ($(OBJECTS)) do %append $^@ file %index
  164. for %index in ($(PROJ_LIBS)) do %append $^@ library $(LIB_DIR)\%index
  165. %append $^@ library $(LIB_DIR)\ddraw.lib
  166. %append $^@ library $(LIB_DIR)\dsound.lib
  167. for %index in ($(VQA_LIBS)) do %append $^@ library $(VQA_LIB_DIR)\%index
  168. #**************************** End of makefile ******************************