startup.mk 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. # Common startup script that defines all variables common to
  30. # all startup scripts. These define the DMAKE runtime
  31. # environment and the values are dependant on the version of
  32. # DMAKE in use.
  33. #
  34. #############################################################################
  35. # Disable warnings for macros redefined here that were given
  36. # on the command line.
  37. __.SILENT := $(.SILENT)
  38. .SILENT := yes
  39. # Import enivornment variables that we use common to all compilers
  40. .IMPORT .IGNORE : TEMP SHELL COMSPEC INCLUDE LIB SCITECH PRIVATE SCITECH_LIB
  41. .IMPORT .IGNORE : DBG OPT OPT_SIZE SHW BETA USE_WIN32 FPU BUILD_DLL BUILD_FOR_DLL
  42. .IMPORT .IGNORE : IMPORT_DLL USE_TASMX WIN32_GUI USE_WIN16 USE_NASM CHECKED
  43. .IMPORT .IGNORE : OS2_SHELL SOFTICE_PATH MAX_WARN USE_SOFTICE USE_TASM32
  44. .IMPORT .IGNORE : DLL_START_TASM USE_SNAP USE_X11 USE_LINUX STATIC_LIBS LIBC
  45. .IMPORT .IGNORE : SHOW_ARGS BOOT_STRAP_DMAKE
  46. TMPDIR := $(TEMP)
  47. # Determine if the host machine is a Windows/DOS or Unix box
  48. .IF $(COMSPEC)
  49. WIN32_HOST := 1
  50. .ELSE
  51. USE_NASM := 1
  52. UNIX_HOST := 1
  53. .ENDIF
  54. # Setup to either user NASM or TASM as the assembler
  55. .IF $(USE_NASM)
  56. .ELSE
  57. USE_TASM := 1
  58. .ENDIF
  59. .IF $(UNIX_HOST)
  60. # Standard file suffix definitions
  61. #
  62. # NOTE: Linux/Unix does not require any extenion for executeable files, but you
  63. # can use an extension if you wish. We use the .exe extension for building
  64. # executeable files so that we can use implicit rules to make the
  65. # makefiles simpler and more portable between systems (exe also makes it
  66. # easier for cross-compile/debugging situations). When you install
  67. # the files to a local bin directory, you will probably want to remove
  68. # the .exe extension.
  69. L := .a # Libraries
  70. E := .exe # Executables for glibc
  71. O := .o # Objects
  72. A := .asm # Assembler sources
  73. S := .s # GNU assembler sources
  74. P := .cpp # C++ sources
  75. # File prefix/suffix definitions. The following prefixes are defined, and are
  76. # used primarily to abstract between the Unix style libXX.a naming convention
  77. # and the DOS/Windows/OS2 naming convention of XX.lib.
  78. LP := lib # LP - Library file prefix (name of file on disk)
  79. LL := -l # Library link prefix (name of library on link command line)
  80. LE := # Library link suffix (extension of library on link command line)
  81. # We use the Unix shell at all times
  82. SHELL := /bin/sh
  83. SHELLFLAGS := -c
  84. .ELSE
  85. # Standard file DOS/Win/OS2 suffix definitions
  86. L := .lib # Libraries
  87. .IF $(USE_SNAP)
  88. E := .sxe # Snap Executables
  89. D := .sll # Snap Dynamic Link Library file
  90. .ELSE
  91. E := .exe # Executables
  92. D := .dll # Dynamic Link Library file
  93. .ENDIF
  94. O := .obj # Objects
  95. A := .asm # Assembler sources
  96. P := .cpp # C++ sources
  97. R := .res # Compiled resource file
  98. S := .s # Assyntax.h style assembler
  99. # File prefix/suffix definitions. The following prefixes are defined, and are
  100. # used primarily to abstract between the Unix style libXX.a naming convention
  101. # and the DOS/Windows/OS2 naming convention of XX.lib.
  102. LP := # LP - Library file prefix (name of file on disk)
  103. LL := # Library link prefix (name of library on link command line)
  104. LE := .lib # Library link suffix (extension of library on link command line)
  105. # We use the DOS/Win/OS2 style shell at all times
  106. SHELL := $(COMSPEC)
  107. GROUPSHELL := $(SHELL)
  108. SHELLFLAGS := $(SWITCHAR)c
  109. GROUPFLAGS := $(SHELLFLAGS)
  110. SHELLMETAS := *"?<>
  111. .IF $(OS2_SHELL)
  112. GROUPSUFFIX := .cmd
  113. .ELSE
  114. GROUPSUFFIX := .bat
  115. .ENDIF
  116. DIRSEPSTR := \\
  117. DIVFILE = $(TMPFILE:s,/,\)
  118. .ENDIF
  119. # Standard Unix style shell commands. Since these do not exist on
  120. # regular DOS/Win/OS2 installations we use our own '' versions
  121. # instead. To boostrtap a new OS you may wish to use the regular
  122. # unix versions.
  123. .IF $(BOOT_STRAP_DMAKE)
  124. CP := cp
  125. MD := mkdir
  126. RM := rm
  127. ECHO := echo
  128. .ELSE
  129. CP := k_cp
  130. MD := k_md
  131. RM := k_rm
  132. ECHO := k_echo
  133. .ENDIF
  134. # Definition of $(MAKE) macro for recursive makes.
  135. MAKE = $(MAKECMD) $(MFLAGS)
  136. # Macro to install a library file
  137. INSTALL := $(CP)
  138. # DMAKE uses this recipe to remove intermediate targets
  139. .REMOVE :; $(RM) -f $<
  140. # Turn warnings back to previous setting.
  141. .SILENT := $(__.SILENT)
  142. # We dont use TABS in our makefiles
  143. .NOTABS := yes