gcc_win32.mk 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. # Cygwin port of GNU C/C++ to Win32.
  30. #
  31. #############################################################################
  32. # Include standard startup script definitions
  33. .IMPORT: SCITECH
  34. .INCLUDE: "$(SCITECH)\makedefs\startup.mk"
  35. # Import enivornment variables that we use
  36. .IMPORT .IGNORE : GCC2_LIBBASE
  37. # Override some file suffix definitions
  38. L := .a # Libraries
  39. O := .o # Objects
  40. # Override the file prefix/suffix definitions for library naming.
  41. LP := lib # LP - Library file prefix (name of file on disk)
  42. LL := -l # Library link prefix (name of library on link command line)
  43. LE := # Library link suffix (extension of library on link command line)
  44. # We are compiling for a 32 bit envionment
  45. _32BIT_ := 1
  46. # Default commands for compiling, assembling linking and archiving
  47. CC := gcc # C-compiler and flags
  48. CFLAGS := -Wall -I. -Iinclude -I$(SCITECH:s,\,/)/include -I$(PRIVATE:s,\,/)/include
  49. SHOW_CFLAGS := -c
  50. CXX := g++
  51. AS := nasm
  52. ASFLAGS := -t -f coff -F null -d__FLAT__ -d__GNUC__ -dSTDCALL_USCORE -iINCLUDE -i$(SCITECH)\INCLUDE
  53. SHOW_ASFLAGS := -f coff
  54. LD := gcc # Loader and flags
  55. LDXX := g++
  56. .IF $(WIN32_GUI)
  57. LDFLAGS := -L. -mwindows -e _mainCRTStartup
  58. .ELSE
  59. LDFLAGS := -L.
  60. .ENDIF
  61. RC := windres
  62. RCFLAGS := -O coff
  63. LIB := ar # Librarian
  64. LIBFLAGS := rcs
  65. YACC := bison -y
  66. LEX := flex
  67. SED := sed
  68. # Optionally turn on debugging information
  69. .IF $(DBG)
  70. CFLAGS += -g
  71. SHOW_CFLAGS += -g
  72. .ELSE
  73. # NASM does not support debugging information yet
  74. ASFLAGS +=
  75. .ENDIF
  76. # Optionally turn on optimisations
  77. .IF $(OPT_MAX)
  78. CFLAGS += -O6
  79. SHOW_CFLAGS += -O6
  80. .ELIF $(OPT)
  81. CFLAGS += -O2
  82. SHOW_CFLAGS += -O2
  83. .ELIF $(OPT_SIZE)
  84. CFLAGS += -O1
  85. SHOW_CFLAGS += -O1
  86. .ENDIF
  87. # Optionally turn on direct i387 FPU instructions
  88. .IF $(FPU)
  89. CFLAGS += -DFPU387
  90. ASFLAGS += -dFPU387
  91. .END
  92. # Optionally compile a beta release version of a product
  93. .IF $(BETA)
  94. CFLAGS += -DBETA
  95. SHOW_CFLAGS += -DBETA
  96. ASFLAGS += -dBETA
  97. SHOW_ASFLAGS += -dBETA
  98. .ENDIF
  99. # DOS extender dependant flags
  100. DX_CFLAGS +=
  101. DX_ASFLAGS += -dGCC_WIN32
  102. # Define the base directory for library files
  103. .IF $(CHECKED)
  104. LIB_BASE_DIR := $(SCITECH_LIB)\lib\debug
  105. CFLAGS += -DCHECKED=1
  106. SHOW_CFLAGS += -DCHECKED=1
  107. .ELSE
  108. LIB_BASE_DIR := $(SCITECH_LIB)\lib\release
  109. .ENDIF
  110. # Define where to install library files
  111. LIB_DEST := $(LIB_BASE_DIR)\WIN32\$(GCC2_LIBBASE)
  112. LDFLAGS += -L$(LIB_DEST)
  113. # Place to look for PMODE library files
  114. PMLIB := -lpm
  115. # Define which file contains our rules
  116. RULES_MAK := gcc_win32.mk