gcc_dos.mk 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. # DJGPP V2 port of GNU C/C++ to DOS with DPMI only.
  30. #
  31. #############################################################################
  32. # Include standard startup script definitions
  33. .IMPORT: SCITECH
  34. .INCLUDE: "$(SCITECH)\makedefs\startup.mk"
  35. # Override some file suffix definitions
  36. L := .a # Libraries
  37. O := .o # Objects
  38. # Override the file prefix/suffix definitions for library naming.
  39. LP := lib # LP - Library file prefix (name of file on disk)
  40. LL := -l # Library link prefix (name of library on link command line)
  41. LE := # Library link suffix (extension of library on link command line)
  42. # Import enivornment variables that we use
  43. .IMPORT .IGNORE : DJ_LIBBASE
  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
  49. AS := nasm
  50. ASFLAGS := -t -f coff -F null -d__FLAT__ -d__GNUC__ -dSTDCALL_USCORE -iINCLUDE -i$(SCITECH)\INCLUDE
  51. LD := dj_ld # Loader and flags
  52. LDFLAGS :=
  53. LIB := ar # Librarian
  54. LIBFLAGS := rs
  55. USE_NASM := 1
  56. USE_GCC := 1
  57. # Optionally turn on debugging information
  58. .IF $(DBG)
  59. CFLAGS += -g # Turn on debugging for C compiler
  60. .END
  61. # Optionally turn on optimisations
  62. .IF $(OPT)
  63. CFLAGS += -O2
  64. .ELIF $(OPT_SIZE)
  65. CFLAGS += -O1
  66. .END
  67. # Optionally turn on direct i387 FPU instructions
  68. .IF $(FPU)
  69. CFLAGS += -DFPU387
  70. ASFLAGS += -dFPU387
  71. .END
  72. # Optionally compile a beta release version of a product
  73. .IF $(BETA)
  74. CFLAGS += -DBETA
  75. ASFLAGS += -dBETA
  76. .END
  77. # DOS extender dependant flags
  78. DX_CFLAGS +=
  79. DX_ASFLAGS += -dDJGPP
  80. USE_REALDOS := 1
  81. # Define the base directory for library files
  82. .IF $(CHECKED)
  83. LIB_BASE_DIR := $(SCITECH_LIB)\lib\debug
  84. CFLAGS += -DCHECKED=1
  85. .ELSE
  86. LIB_BASE_DIR := $(SCITECH_LIB)\lib\release
  87. .ENDIF
  88. # Define where to install library files
  89. LIB_DEST := $(LIB_BASE_DIR)\DOS32\$(DJ_LIBBASE)
  90. # Place to look for PMODE library files
  91. PMLIB := -lpm
  92. # Define which file contains our rules
  93. RULES_MAK := dj32.mk