MAKEFILE.BOR 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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. #* PROJ_NAME = name of the library you're building *
  40. #* OBJECTS = list of objects in your library *
  41. #* *
  42. #* Optional changes to makefile: *
  43. #* PROJ_DIR = full pathname of your working directory *
  44. #* .path.xxx = full pathname where various file types live *
  45. #* *
  46. #***************************************************************************
  47. .AUTODEPEND
  48. #---------------------------------------------------------------------------
  49. # Verify user's environment
  50. #---------------------------------------------------------------------------
  51. !ifndef WIN32LIB
  52. !error WIN32LIB Environment var not configured.
  53. !endif
  54. !ifndef WIN32VCS
  55. !error WIN32VCS Environment var not configured.
  56. !endif
  57. !ifndef COMPILER
  58. !error COMPILER Environment var not configured.
  59. !endif
  60. #===========================================================================
  61. # User-defined section: the user should tailor this section for each project
  62. #===========================================================================
  63. PROJ_NAME = misc
  64. PROJ_DIR = $(WIN32LIB)\$(PROJ_NAME)
  65. LIB_DIR = $(WIN32LIB)\lib
  66. !include $(WIN32LIB)\\project.cfg
  67. #---------------------------------------------------------------------------
  68. # Project-dependent variables
  69. #---------------------------------------------------------------------------
  70. OBJECTS = \
  71. crc.obj \
  72. ddraw.obj \
  73. delay.obj \
  74. detproc.obj \
  75. facing8.obj \
  76. facing16.obj \
  77. facingFF.obj \
  78. fading.obj \
  79. findargv.obj \
  80. irandom.obj \
  81. lib.obj \
  82. opsys.obj \
  83. random.obj \
  84. reverse.obj \
  85. shakescr.obj \
  86. exit.obj \
  87. cliprect.obj \
  88. version.obj
  89. #---------------------------------------------------------------------------
  90. # Path macros: one path for each file type.
  91. # These paths are used to tell make where to find/put each file type.
  92. #---------------------------------------------------------------------------
  93. .path.asm = $(PROJ_DIR)
  94. .path.c = $(PROJ_DIR)
  95. .path.cpp = $(PROJ_DIR)
  96. .path.h = $(PROJ_DIR)
  97. .path.obj = $(PROJ_DIR)
  98. .path.lib = $(WIN32LIB)\lib
  99. .path.exe = $(PROJ_DIR)
  100. #===========================================================================
  101. # Pre-defined section: there should be little need to modify this section.
  102. #===========================================================================
  103. #---------------------------------------------------------------------------
  104. # Tools/commands
  105. #---------------------------------------------------------------------------
  106. C_CMD = bcc32
  107. CPP_CMD = bcc32
  108. LIB_CMD = tlib
  109. LINK_CMD = tlink32
  110. ASM_CMD = tasm32
  111. #---------------------------------------------------------------------------
  112. # Include & library paths
  113. # If LIB & INCLUDE are already defined, they are used in addition to the
  114. # WWLIB32 lib & include; otherwise, they're constructed from
  115. # BCDIR & TNTDIR
  116. #---------------------------------------------------------------------------
  117. LIBPATH = $(WIN32LIB)\LIB;$(COMPILER)\LIB
  118. INCLUDEPATH = $(WIN32LIB)\INCLUDE;$(COMPILER)\INCLUDE
  119. #---------------------------------------------------------------------------
  120. # Implicit rules
  121. # Compiler:
  122. # ($< = full dependent with path)
  123. # Assembler:
  124. # output obj's are constructed from .obj: & the $& macro
  125. # ($< = full dependent with path)
  126. # tasm's cfg file is not invoked as a response file.
  127. #---------------------------------------------------------------------------
  128. .c.obj:
  129. $(C_CMD) $(CC_CFG) $<
  130. .cpp.obj:
  131. $(CPP_CMD) $(CC_CFG) $<
  132. .asm.obj:
  133. $(ASM_CMD) $(ASM_CFG) $<
  134. #---------------------------------------------------------------------------
  135. # Default target: configuration files & library (in that order)
  136. #---------------------------------------------------------------------------
  137. all: $(LIB_DIR)\$(PROJ_NAME).lib
  138. #---------------------------------------------------------------------------
  139. # Build the library
  140. # The original library is deleted by the librarian
  141. # Lib objects & -+ commands are constructed by substituting within the
  142. # $^@ macro (which expands to all target dependents, separated with
  143. # spaces)
  144. # Tlib's cfg file is not invoked as a response file.
  145. # All headers & source files are copied into WIN32LIB\SRCDEBUG, for debugging
  146. #---------------------------------------------------------------------------
  147. $(LIB_DIR)\\$(PROJ_NAME).lib: $(OBJECTS) wwlib32.h
  148. copy *.h $(WIN32LIB)\\include
  149. copy *.inc $(WIN32LIB)\\include
  150. copy *.cpp $(WIN32LIB)\\srcdebug
  151. copy *.asm $(WIN32LIB)\\srcdebug
  152. $(LIB_CMD) $< $(LIB_CFG) @&&|
  153. +-crc.obj &
  154. +-ddraw.obj &
  155. +-delay.obj &
  156. +-detproc.obj &
  157. +-exit.obj &
  158. +-facing8.obj &
  159. +-facing16.obj &
  160. +-facingFF.obj &
  161. +-fading.obj &
  162. +-findargv.obj &
  163. +-irandom.obj &
  164. +-lib.obj &
  165. +-opsys.obj &
  166. +-random.obj &
  167. +-reverse.obj &
  168. +-shakescr.obj &
  169. +-cliprect.obj &
  170. +-version.obj
  171. |
  172. #---------------------------------------------------------------------------
  173. # Create the test directory and make it.
  174. #---------------------------------------------------------------------------
  175. test:
  176. mkdir test
  177. cd test
  178. copy $(WWVCS)\\$(PROJ_NAME)\test\vcs.cfg
  179. update
  180. wmake
  181. cd ..