MAKEFILE.BOR 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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 .EXE makefile *
  23. #* *
  24. #* File Name : MAKEFILE *
  25. #* *
  26. #* Programmer : Julio R. Jerez *
  27. #* *
  28. #* Start Date : Jan 20, 1995 *
  29. #* *
  30. #* Last Update : *
  31. #* *
  32. #*-------------------------------------------------------------------------*
  33. #* *
  34. #* Required environment variables: *
  35. #* WIN32LIB = your root WWFLAT path *
  36. #* WIN32VCS = root directory for wwlib 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. .AUTODEPEND
  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: the user should tailor this section for each project
  65. #===========================================================================
  66. #---------------------------------------------------------------------------
  67. # PROJ_NAME = library name
  68. # PROJ_DIR = directory containing source & objects
  69. #---------------------------------------------------------------------------
  70. PROJ_NAME = test
  71. PROJ_DIR = $(WIN32LIB)\keyboard\$(PROJ_NAME)
  72. LIB_DIR = $(WIN32LIB)\lib
  73. #---------------------------------------------------------------------------
  74. # Project-dependent variables
  75. #---------------------------------------------------------------------------
  76. OBJECTS = \
  77. $(PROJ_NAME).obj \
  78. keyboard.obj
  79. !if 0
  80. PROJ_LIBS = \
  81. drawbuff.lib \
  82. win32lib.lib
  83. !else
  84. PROJ_LIBS = \
  85. drawbuff.lib \
  86. mem.lib \
  87. misc.lib \
  88. iff.lib \
  89. rawfile.lib \
  90. tile.lib \
  91. font.lib
  92. !endif
  93. #---------------------------------------------------------------------------
  94. # Path macros: one path for each file type.
  95. # These paths are used to tell make where to find/put each file type.
  96. #---------------------------------------------------------------------------
  97. .path.asm = $(PROJ_DIR)
  98. .path.c = $(PROJ_DIR)
  99. .path.cpp = $(PROJ_DIR)
  100. .path.h = $(PROJ_DIR)
  101. .path.obj = $(PROJ_DIR)
  102. .path.lib = $(WIN32LIB)\lib
  103. .path.exe = $(PROJ_DIR)
  104. #---------------------------------------------------------------------------
  105. # Tools/commands
  106. #---------------------------------------------------------------------------
  107. C_CMD = bcc32
  108. CPP_CMD = bcc32
  109. LIB_CMD = tlib
  110. LINK_CMD = tlink32
  111. ASM_CMD = tasm32
  112. #---------------------------------------------------------------------------
  113. # Include & library paths
  114. # If LIB & INCLUDE are already defined, they are used in addition to the
  115. # WWLIB32 lib & include; otherwise, they're constructed from
  116. # BCDIR
  117. #---------------------------------------------------------------------------
  118. LIBPATH = $(WIN32LIB)\LIB;$(COMPILER)\LIB
  119. INCLUDEPATH = $(WIN32LIB)\INCLUDE;$(COMPILER)\INCLUDE
  120. !include $(WIN32LIB)\\project.cfg
  121. #---------------------------------------------------------------------------
  122. # Implicit rules
  123. # Compiler:
  124. # ($< = full dependent with path)
  125. # Assembler:
  126. # output obj's are constructed from .obj: & the $& macro
  127. # ($< = full dependent with path)
  128. # tasm's cfg file is not invoked as a response file.
  129. #---------------------------------------------------------------------------
  130. .c.obj:
  131. $(C_CMD) $(CC_CFG) $<
  132. .cpp.obj:
  133. $(CPP_CMD) $(CC_CFG) $<
  134. .asm.obj:
  135. $(ASM_CMD) $(ASM_CFG) $<
  136. .lbm.cps:
  137. $(WIN32LIB)\\TOOLS\WWCOMP $*.lbm $*.cps
  138. #---------------------------------------------------------------------------
  139. # Default target
  140. #---------------------------------------------------------------------------
  141. all: $(PROJ_NAME).exe
  142. #---------------------------------------------------------------------------
  143. # Build the EXE
  144. #---------------------------------------------------------------------------
  145. $(PROJ_NAME).exe: $(OBJECTS) $(PROJ_LIBS)
  146. $(LINK_CMD) @&&|
  147. $(LINK_CFG) +
  148. $(COMPILER)\\LIB\\c0w32.obj+
  149. $(OBJECTS)
  150. $<,$*
  151. $(PROJ_LIBS) +
  152. import32.lib +
  153. cw32i.lib
  154. $*.def
  155. |
  156. $(PROJ_LIBS):
  157. echo updating base library $^@
  158. cd ..
  159. make
  160. cd $(PROJ_DIR)
  161. #**************************** End of makefile ******************************