qnx4.mk 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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 version for Watcom 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_QNX4
  39. .IMPORT .IGNORE : USE_PHOTON USE_X11 USE_BIOS SHOW_ARGS MAX_WARN WC_LIBBASE
  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 := .exe # 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 := wcc386
  78. CFLAGS := -I. -Iinclude $(INCLUDE)
  79. CXX := wpp386
  80. AS := nasm
  81. ASFLAGS := -t -f obj -d__FLAT__ -dSTDCALL_MANGLE -iinclude -i$(SCITECH)/include
  82. LD := cc
  83. LDFLAGS := -L.
  84. LIB := ar
  85. LIBFLAGS := rc
  86. # Set the compiler warning level
  87. .IF $(MAX_WARN)
  88. CFLAGS += -w4
  89. .ELSE
  90. CFLAGS += -w1
  91. .ENDIF
  92. # Optionally turn on debugging information
  93. .IF $(DBG)
  94. CFLAGS += -d2
  95. LDFLAGS += -g2
  96. .ELSE
  97. # NASM does not support debugging information yet
  98. ASFLAGS +=
  99. .ENDIF
  100. # Optionally turn on optimisations
  101. .IF $(OPT)
  102. CFLAGS += -onatx-5r-fp5
  103. .ELIF $(OPT_SIZE)
  104. CFLAGS += -onaslmr-5r-fp5
  105. .ELIF $(NOOPT)
  106. CFLAGS += -od-5r
  107. .END
  108. # Compile flag for whether to build photon or non-photon lib
  109. .IF $(USE_PHOTON)
  110. CFLAGS += -D__PHOTON__
  111. .ENDIF
  112. # Compile flag for whether to build X11 or non-X11 lib
  113. .IF $(USE_X11)
  114. CFLAGS += -D__X11__
  115. .ENDIF
  116. # Optionally compile a beta release version of a product
  117. .IF $(BETA)
  118. CFLAGS += -DBETA
  119. ASFLAGS += -dBETA
  120. .ENDIF
  121. # Target environment dependant flags
  122. CFLAGS += -D__QNX__ -D__UNIX__
  123. ASFLAGS += -d__QNX__ -d__UNIX__
  124. # Define the base directory for library files
  125. .IF $(CHECKED)
  126. LIB_BASE_DIR := $(SCITECH_LIB)/lib/debug
  127. CFLAGS += -DCHECKED=1
  128. .ELSE
  129. LIB_BASE_DIR := $(SCITECH_LIB)/lib/release
  130. .ENDIF
  131. # Define where to install library files
  132. LIB_BASE := $(LIB_BASE_DIR)/qnx4/$(WC_LIBBASE)
  133. LIB_DEST := $(LIB_BASE)
  134. LDFLAGS += -L$(LIB_DEST)
  135. # Place to look for PMODE library files
  136. PMLIB := -lpm
  137. # Define which file contains our rules
  138. RULES_MAK := qnx4.mk