sc32.mk 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. #############################################################################
  2. #
  3. # SciTech Multi-platform Graphics Library
  4. #
  5. # ========================================================================
  6. #
  7. # The contents of this file are subject to the SciTech MGL Public
  8. # License Version 1.0 (the "License"); you may not use this file
  9. # except in compliance with the License. You may obtain a copy of
  10. # the License at http://www.scitechsoft.com/mgl-license.txt
  11. #
  12. # Software distributed under the License is distributed on an
  13. # "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  14. # implied. See the License for the specific language governing
  15. # rights and limitations under the License.
  16. #
  17. # The Original Code is Copyright (C) 1991-1998 SciTech Software, Inc.
  18. #
  19. # The Initial Developer of the Original Code is SciTech Software, Inc.
  20. # All Rights Reserved.
  21. #
  22. # ========================================================================
  23. #
  24. # Descripton: Generic DMAKE startup makefile definitions file. Assumes
  25. # that the SCITECH environment variable has been set to point
  26. # to where all our stuff is installed. You should not need
  27. # to change anything in this file.
  28. #
  29. # Symantec C++ 6.x/7.x 32 bit version. Supports the DOSX
  30. # extender, FlashTek X32 and Phar Lap's TNT DOS Extender
  31. # and 32 bit Windows development.
  32. #
  33. #############################################################################
  34. # Include standard startup script definitions
  35. .IMPORT: SCITECH
  36. .INCLUDE: "$(SCITECH)\makedefs\startup.mk"
  37. # Import enivornment variables that we use
  38. .IMPORT .IGNORE : USE_TNT USE_X32 USE_X32VM SC_LIBBASE
  39. # We are compiling for a 32 bit envionment
  40. _32BIT_ := 1
  41. # Default commands for compiling, assembling linking and archiving
  42. CC := sc # C-compiler and flags
  43. CFLAGS := -Jm
  44. .IF $(USE_TASM32)
  45. AS := tasm32
  46. .ELIF $(USE_TASMX)
  47. AS := tasmx # Assembler and flags
  48. .ELSE
  49. AS := tasm # Assembler and flags
  50. .ENDIF
  51. .IF $(USE_WIN32)
  52. ASFLAGS := /t /mx /m /D__FLAT__ /iINCLUDE /i$(SCITECH)\INCLUDE
  53. .ELSE
  54. ASFLAGS := /t /mx /m /DES_NOT_DS /D__COMM__ /i$(SCITECH)\INCLUDE
  55. .ENDIF
  56. LD := sc # Loader and flags
  57. LD_FLAGS =
  58. RC := rcc # WIndows resource compiler
  59. RCFLAGS := -32 # Mark as Win32 compatible resources
  60. LIB := lib # Librarian
  61. LIBFLAGS := /N /B
  62. ILIB := implib # Import librarian
  63. ILIBFLAGS :=
  64. # Optionally turn on debugging information
  65. .IF $(DBG)
  66. CFLAGS += -g # Turn on debugging for C compiler (FlashView)
  67. .IF $(USE_TNT)
  68. LDFLAGS += -fullsym # Turn on debugging for TNT 386link linker
  69. .END
  70. .IF $(USE_X32) or $(USE_X32VM)
  71. LDFLAGS += -L/map # Turn on debugging for FlashView debugger
  72. .END
  73. .ELSE
  74. ASFLAGS += /q # Suppress object records not needed for linking
  75. .END
  76. # Optionally turn on optimisations
  77. .IF $(OPT)
  78. CFLAGS += -5 -o+all
  79. .ELIF $(OPT_SIZE)
  80. CFLAGS += -5 -o+space
  81. .END
  82. # Optionally turn on direct i387 FPU instructions
  83. .IF $(FPU)
  84. CFLAGS += -ff -DFPU387
  85. ASFLAGS += -DFPU387 -DFPU_REG_RTN
  86. .END
  87. # Optionally compile a beta release version of a product
  88. .IF $(BETA)
  89. CFLAGS += -DBETA
  90. ASFLAGS += -DBETA
  91. .END
  92. # User a larger stack if requested
  93. .IF $(STKSIZE)
  94. LDFLAGS += =$(STKSIZE)
  95. .ENDIF
  96. .IF $(USE_TNT) # Use Phar Lap's TNT DOS Extender
  97. CFLAGS += -mp
  98. DX_CFLAGS += -DTNT
  99. ASFLAGS += /D__FLAT__
  100. DX_ASFLAGS += -DTNT
  101. LD := 386link
  102. LDFLAGS += @sc32.dos -exe $@
  103. LIB_OS = DOS32
  104. .ELIF $(USE_X32VM) # Use FlashTek X-32VM DOS extender
  105. CFLAGS += -mx
  106. DX_CFLAGS += -DX32VM
  107. ASFLAGS += /D__X386__
  108. DX_ASFLAGS += -DX32VM
  109. LD := sc
  110. LDFLAGS += $(CFLAGS) x32v.lib
  111. LIB_OS = DOS32
  112. .ELIF $(USE_X32) # Use FlashTek X-32 DOS extender
  113. CFLAGS += -mx
  114. DX_CFLAGS += -DX32VM
  115. ASFLAGS += /D__X386__
  116. DX_ASFLAGS += -DX32VM
  117. LD := sc
  118. LDFLAGS += $(CFLAGS) x32.lib
  119. LIB_OS = DOS32
  120. .ELIF $(USE_WIN32) # Build 32 bit Windows NT app
  121. .IF $(BUILD_DLL)
  122. CFLAGS += -WD -mn
  123. ASFLAGS += -DBUILD_DLL
  124. .ELSE
  125. CFLAGS += -WA -mn
  126. .ENDIF
  127. DX_ASFLAGS += -D__WINDOWS32__
  128. LIB_OS = WIN32
  129. .ELSE # Use default Symantec DOSX extender
  130. USE_DOSX := 1
  131. USE_REALDOS := 1
  132. CFLAGS += -mx
  133. DX_CFLAGS += -DDOSX
  134. ASFLAGS += /D__X386__
  135. DX_ASFLAGS += -DDOSX
  136. LD := sc
  137. LDFLAGS += $(CFLAGS)
  138. LIB_OS = DOS32
  139. .END
  140. # Place to look for PMODE library files
  141. .IF $(USE_TNT)
  142. PMLIB := tnt\pm.lib
  143. .ELIF $(USE_X32)
  144. PMLIB := x32\pm.lib
  145. .ELSE
  146. PMLIB := dosx\pm.lib
  147. .END
  148. # Define the base directory for library files
  149. .IF $(CHECKED)
  150. LIB_BASE_DIR := $(SCITECH_LIB)\lib\debug
  151. CFLAGS += -DCHECKED=1
  152. .ELSE
  153. LIB_BASE_DIR := $(SCITECH_LIB)\lib\release
  154. .ENDIF
  155. # Define where to install library files
  156. LIB_BASE := $(LIB_BASE_DIR)\$(LIB_OS)\$(SC_LIBBASE)
  157. LIB_DEST := $(LIB_BASE)
  158. # Define which file contains our rules
  159. RULES_MAK := sc32.mk