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