cl386.mk 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. # Microsoft 386 C 6.0 32 bit. Supports 32 bit
  30. # OS/2 development.
  31. #
  32. #############################################################################
  33. # Include standard startup script definitions
  34. .IMPORT: SCITECH
  35. .INCLUDE: "$(SCITECH)\makedefs\startup.mk"
  36. # Import enivornment variables that we use
  37. .IMPORT .IGNORE : CL_LIBBASE USE_VDD
  38. .IMPORT .IGNORE : USE_MASM
  39. # Default commands for compiling, assembling linking and archiving
  40. CC := cl386 # C-compiler and flags
  41. # NB: The -Zf flag is ABSOLUTELY NECESSARY to compile IBM's OS/2 headers.
  42. # It isn't documented anywhere but obviously adds support for 48-bit
  43. # far pointers (ie. _far is valid in 32-bit code). Great.
  44. CFLAGS := -G3s -Zf -D__386__
  45. ASFLAGS := /t /mx /m /oi /D__FLAT__ /DSTDCALL_MANGLE /D__NOU_VAR__ /iINCLUDE /i$(SCITECH)\INCLUDE
  46. .IF $(USE_TASM32)
  47. AS := tasm32
  48. .ELIF $(USE_TASMX)
  49. AS := tasmx # Assembler and flags
  50. .ELIF $(USE_MASM)
  51. AS := masm # Assembler and flags
  52. ASFLAGS := /t /mx /D__FLAT__ /DSTDCALL_MANGLE /D__NOU_VAR__ /iINCLUDE /i$(SCITECH)\INCLUDE
  53. .ELSE
  54. AS := tasm # Assembler and flags
  55. .ENDIF
  56. LD := link386 # Linker and flags
  57. LDFLAGS = $(CFLAGS)
  58. RC := rc # Windows resource compiler
  59. RCFLAGS :=
  60. LIB := lib # Librarian
  61. LIBFLAGS := /NOI /NOE
  62. ILIB := implib # Import librarian
  63. ILIBFLAGS := /noignorecase
  64. # Optionally turn on debugging information
  65. .IF $(DBG)
  66. CFLAGS += -Zi # Turn on debugging for C compiler
  67. ASFLAGS += /zi # Turn on debugging for assembler
  68. .ELSE
  69. ASFLAGS += /q # Suppress object records not needed for linking
  70. .END
  71. # Optionally turn on optimisations
  72. .IF $(OPT)
  73. CFLAGS += /Ox
  74. .END
  75. # Optionally turn on direct i387 FPU instructions
  76. .IF $(FPU)
  77. CFLAGS += /FPi87 /DFPU387
  78. ASFLAGS += /DFPU387 /DFPU_REG_RTN
  79. .END
  80. # Optionally compile a beta release version of a product
  81. .IF $(BETA)
  82. CFLAGS += /DBETA
  83. ASFLAGS += /DBETA
  84. .END
  85. # Use a larger stack during linking if requested ???? How the fuck do you
  86. # specify linker options on the CL command line?????
  87. .IF $(STKSIZE)
  88. .ENDIF
  89. # Place to look for PMODE library files
  90. PMLIB := pm.lib
  91. # Define the base directory for library files
  92. .IF $(CHECKED)
  93. LIB_BASE_DIR := $(SCITECH_LIB)\lib\debug
  94. CFLAGS += -DCHECKED=1
  95. .ELSE
  96. LIB_BASE_DIR := $(SCITECH_LIB)\lib\release
  97. .ENDIF
  98. # Define where to install library files
  99. LIB_OS = os232
  100. LIB_BASE := $(LIB_BASE_DIR)\$(LIB_OS)\$(CL_LIBBASE)
  101. LIB_DEST := $(LIB_BASE)
  102. # Define which file contains our rules
  103. RULES_MAK := cl386.mk