Import upstream u-boot 1.1.4
[u-boot.git] / board / MAI / bios_emulator / scitech / makedefs / cl386.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 #               Microsoft 386 C 6.0 32 bit. Supports 32 bit
30 #               OS/2 development.
31 #
32 #############################################################################
33
34 # Include standard startup script definitions
35 .IMPORT: SCITECH
36 .INCLUDE: "$(SCITECH)\makedefs\startup.mk"
37
38 # Import enivornment variables that we use
39 .IMPORT .IGNORE : CL_LIBBASE USE_VDD
40 .IMPORT .IGNORE : USE_MASM
41
42 # Default commands for compiling, assembling linking and archiving
43    CC           := cl386       # C-compiler and flags
44    # NB: The -Zf flag is ABSOLUTELY NECESSARY to compile IBM's OS/2 headers.
45    #     It isn't documented anywhere but obviously adds support for 48-bit
46    #     far pointers (ie. _far is valid in 32-bit code). Great.
47    CFLAGS       := -G3s -Zf -D__386__
48    ASFLAGS      := /t /mx /m /oi /D__FLAT__ /DSTDCALL_MANGLE /D__NOU_VAR__ /iINCLUDE /i$(SCITECH)\INCLUDE
49 .IF $(USE_TASM32)
50    AS           := tasm32
51 .ELIF $(USE_TASMX)
52    AS           := tasmx   # Assembler and flags
53 .ELIF $(USE_MASM)
54    AS           := masm    # Assembler and flags
55    ASFLAGS      := /t /mx /D__FLAT__ /DSTDCALL_MANGLE /D__NOU_VAR__ /iINCLUDE /i$(SCITECH)\INCLUDE
56 .ELSE
57    AS           := tasm     # Assembler and flags
58 .ENDIF
59    LD           := link386  # Linker and flags
60    LDFLAGS       = $(CFLAGS)
61    RC           := rc       # Windows resource compiler
62    RCFLAGS      :=
63    LIB          := lib      # Librarian
64    LIBFLAGS     := /NOI /NOE
65    ILIB         := implib   # Import librarian
66    ILIBFLAGS    := /noignorecase
67
68 # Optionally turn on debugging information
69 .IF $(DBG)
70    CFLAGS       += -Zi      # Turn on debugging for C compiler
71    ASFLAGS      += /zi      # Turn on debugging for assembler
72 .ELSE
73    ASFLAGS      += /q       # Suppress object records not needed for linking
74 .END
75
76 # Optionally turn on optimisations
77 .IF $(OPT)
78    CFLAGS       += /Ox
79 .END
80
81 # Optionally turn on direct i387 FPU instructions
82
83 .IF $(FPU)
84    CFLAGS       += /FPi87 /DFPU387
85    ASFLAGS      += /DFPU387 /DFPU_REG_RTN
86 .END
87
88 # Optionally compile a beta release version of a product
89 .IF $(BETA)
90    CFLAGS       += /DBETA
91    ASFLAGS      += /DBETA
92 .END
93
94 # Use a larger stack during linking if requested ???? How the fuck do you
95 # specify linker options on the CL command line?????
96
97 .IF $(STKSIZE)
98 .ENDIF
99
100 # Place to look for PMODE library files
101
102 PMLIB           := pm.lib
103
104 # Define the base directory for library files
105
106 .IF $(CHECKED)
107 LIB_BASE_DIR    := $(SCITECH_LIB)\lib\debug
108 CFLAGS                  += -DCHECKED=1
109 .ELSE
110 LIB_BASE_DIR    := $(SCITECH_LIB)\lib\release
111 .ENDIF
112
113 # Define where to install library files
114    LIB_OS       = os232
115    LIB_BASE     := $(LIB_BASE_DIR)\$(LIB_OS)\$(CL_LIBBASE)
116    LIB_DEST     := $(LIB_BASE)
117
118 # Define which file contains our rules
119
120    RULES_MAK    := cl386.mk