qnxnto.mk 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. # QNX Neutrino version for GNU C/C++
  30. #
  31. #############################################################################
  32. # Disable warnings for macros redefined here that were given
  33. # on the command line.
  34. __.SILENT := $(.SILENT)
  35. .SILENT := yes
  36. # Import enivornment variables that we use common to all compilers
  37. .IMPORT .IGNORE : TEMP SHELL INCLUDE LIB SCITECH PRIVATE SCITECH_LIB
  38. .IMPORT .IGNORE : DBG OPT OPT_SIZE SHW BETA CHECKED USE_QNX USE_QNXNTO
  39. .IMPORT .IGNORE : USE_EGCS USE_PHOTON USE_X11 USE_BIOS
  40. TMPDIR := $(TEMP)
  41. # Standard file suffix definitions
  42. #
  43. # NOTE: Qnx does not require any extension for executeable files, but you
  44. # can use an extension if you wish. We use the .x extension for building
  45. # executeable files so that we can use implicit rules to make the
  46. # makefiles simpler and more portable between systems. When you install
  47. # the files to a local bin directory, you will probably want to remove
  48. # the .x extension.
  49. L := .a # Libraries
  50. E := .x # Executables
  51. O := .o # Objects
  52. A := .asm # Assembler sources
  53. S := .s # GNU assembler sources
  54. P := .cpp # C++ sources
  55. # File prefix/suffix definitions. The following prefixes are defined, and are
  56. # used primarily to abstract between the Unix style libXX.a naming convention
  57. # and the DOS/Windows/OS2 naming convention of XX.lib.
  58. LP := lib # LP - Library file prefix (name of file on disk)
  59. LL := -l # Library link prefix (name of library on link command line)
  60. LE := # Library link suffix (extension of library on link command line)
  61. # We use the Unix shell at all times
  62. SHELL := /bin/sh
  63. SHELLFLAGS := -c
  64. # Definition of $(MAKE) macro for recursive makes.
  65. MAKE = $(MAKECMD) $(MFLAGS)
  66. # Macro to install a library file
  67. INSTALL := cp
  68. # DMAKE uses this recipe to remove intermediate targets
  69. .REMOVE :; $(RM) -f $<
  70. # Turn warnings back to previous setting.
  71. .SILENT := $(__.SILENT)
  72. # We dont use TABS in our makefiles
  73. .NOTABS := yes
  74. # Define that we are compiling for QNX
  75. USE_QNX := 1
  76. # Default commands for compiling, assembling linking and archiving.
  77. CC := qcc
  78. CFLAGS := -Vgcc_ntox86 -I. -Iinclude $(INCLUDE)
  79. CPPFLAGS := -Vgcc_ntox86 -I. -Iinclude $(INCLUDE)
  80. CXX := QCC
  81. AS := nasm
  82. ASFLAGS := -t -f elf -d__FLAT__ -d__GNUC__ -dSTDCALL_MANGLE -iinclude -i$(SCITECH)/include -d__NOU__
  83. LD := qcc
  84. LDFLAGS := -Vgcc_ntox86 -L. -lm
  85. LIB := ar
  86. LIBFLAGS := rc
  87. # Optionally turn on debugging information
  88. .IF $(DBG)
  89. CFLAGS += -g2
  90. LDFLAGS += -g2
  91. .ELSE
  92. # NASM does not support debugging information yet
  93. ASFLAGS +=
  94. .ENDIF
  95. # Optionally turn on optimisations
  96. .IF $(OPT_MAX)
  97. CFLAGS += -Ot
  98. .ELIF $(OPT)
  99. CFLAGS += -O
  100. .ELIF $(OPT_SIZE)
  101. CFLAGS += -Os
  102. .ENDIF
  103. # Compile flag for whether to build photon or non-photon lib
  104. .IF $(USE_PHOTON)
  105. CFLAGS += -D__PHOTON__
  106. .ENDIF
  107. # Compile flag for whether to build X11 or non-X11 lib
  108. .IF $(USE_X11)
  109. CFLAGS += -D__X11__
  110. .ENDIF
  111. # Optionally compile a beta release version of a product
  112. .IF $(BETA)
  113. CFLAGS += -DBETA
  114. ASFLAGS += -dBETA
  115. .ENDIF
  116. # Target environment dependant flags
  117. CFLAGS += -D__QNX__ -D__UNIX__
  118. ASFLAGS += -d__QNX__ -d__UNIX__
  119. # Define the base directory for library files
  120. .IF $(CHECKED)
  121. LIB_BASE_DIR := $(SCITECH_LIB)/lib/debug
  122. CFLAGS += -DCHECKED=1
  123. .ELSE
  124. LIB_BASE_DIR := $(SCITECH_LIB)/lib/release
  125. .ENDIF
  126. # Define where to install library files
  127. LIB_DEST := $(LIB_BASE_DIR)/qnxnto
  128. LDFLAGS += -L$(LIB_DEST)
  129. # Place to look for PMODE library files
  130. PMLIB := -lpm
  131. # Define which file contains our rules
  132. RULES_MAK := qnxnto.mk