TEXT_BASE is in board/sandpoint/config.mk so say so...
[u-boot.git] / board / MAI / bios_emulator / scitech / makedefs / sc32.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 #               Symantec C++ 6.x/7.x 32 bit version. Supports the DOSX
30 #               extender, FlashTek X32 and Phar Lap's TNT DOS Extender
31 #               and 32 bit Windows development.
32 #
33 #############################################################################
34
35 # Include standard startup script definitions
36 .IMPORT: SCITECH
37 .INCLUDE: "$(SCITECH)\makedefs\startup.mk"
38
39 # Import enivornment variables that we use
40 .IMPORT .IGNORE : USE_TNT USE_X32 USE_X32VM SC_LIBBASE
41
42 # We are compiling for a 32 bit envionment
43    _32BIT_      := 1
44
45 # Default commands for compiling, assembling linking and archiving
46    CC           := sc       # C-compiler and flags
47    CFLAGS       := -Jm
48 .IF $(USE_TASM32)
49    AS           := tasm32
50 .ELIF $(USE_TASMX)
51    AS           := tasmx    # Assembler and flags
52 .ELSE
53    AS           := tasm     # Assembler and flags
54 .ENDIF
55 .IF $(USE_WIN32)
56    ASFLAGS      := /t /mx /m /D__FLAT__ /iINCLUDE /i$(SCITECH)\INCLUDE
57 .ELSE
58    ASFLAGS      := /t /mx /m /DES_NOT_DS /D__COMM__ /i$(SCITECH)\INCLUDE
59 .ENDIF
60    LD           := sc       # Loader and flags
61    LD_FLAGS      =
62    RC           := rcc      # WIndows resource compiler
63    RCFLAGS      := -32      # Mark as Win32 compatible resources
64    LIB          := lib      # Librarian
65    LIBFLAGS     := /N /B
66    ILIB         := implib   # Import librarian
67    ILIBFLAGS    :=
68
69 # Optionally turn on debugging information
70 .IF $(DBG)
71    CFLAGS       += -g       # Turn on debugging for C compiler (FlashView)
72 .IF $(USE_TNT)
73    LDFLAGS      += -fullsym # Turn on debugging for TNT 386link linker
74 .END
75 .IF $(USE_X32) or $(USE_X32VM)
76    LDFLAGS      += -L/map   # Turn on debugging for FlashView debugger
77 .END
78 .ELSE
79    ASFLAGS      += /q       # Suppress object records not needed for linking
80 .END
81
82 # Optionally turn on optimisations
83 .IF $(OPT)
84    CFLAGS       += -5 -o+all
85 .ELIF $(OPT_SIZE)
86    CFLAGS       += -5 -o+space
87 .END
88
89 # Optionally turn on direct i387 FPU instructions
90
91 .IF $(FPU)
92    CFLAGS       += -ff -DFPU387
93    ASFLAGS      += -DFPU387 -DFPU_REG_RTN
94 .END
95
96 # Optionally compile a beta release version of a product
97 .IF $(BETA)
98    CFLAGS       += -DBETA
99    ASFLAGS      += -DBETA
100 .END
101
102 # User a larger stack if requested
103
104 .IF $(STKSIZE)
105     LDFLAGS     += =$(STKSIZE)
106 .ENDIF
107
108 .IF $(USE_TNT)                  # Use Phar Lap's TNT DOS Extender
109    CFLAGS       += -mp
110    DX_CFLAGS    += -DTNT
111    ASFLAGS      += /D__FLAT__
112    DX_ASFLAGS   += -DTNT
113    LD           := 386link
114    LDFLAGS      += @sc32.dos -exe $@
115    LIB_OS       = DOS32
116 .ELIF $(USE_X32VM)              # Use FlashTek X-32VM DOS extender
117    CFLAGS       += -mx
118    DX_CFLAGS    += -DX32VM
119    ASFLAGS      += /D__X386__
120    DX_ASFLAGS   += -DX32VM
121    LD           := sc
122    LDFLAGS      += $(CFLAGS) x32v.lib
123    LIB_OS       = DOS32
124 .ELIF $(USE_X32)                # Use FlashTek X-32 DOS extender
125    CFLAGS       += -mx
126    DX_CFLAGS    += -DX32VM
127    ASFLAGS      += /D__X386__
128    DX_ASFLAGS   += -DX32VM
129    LD           := sc
130    LDFLAGS      += $(CFLAGS) x32.lib
131    LIB_OS       = DOS32
132 .ELIF $(USE_WIN32)              # Build 32 bit Windows NT app
133 .IF $(BUILD_DLL)
134    CFLAGS       += -WD -mn
135    ASFLAGS      += -DBUILD_DLL
136 .ELSE
137    CFLAGS       += -WA -mn
138 .ENDIF
139    DX_ASFLAGS   += -D__WINDOWS32__
140    LIB_OS       = WIN32
141 .ELSE                           # Use default Symantec DOSX extender
142    USE_DOSX     := 1
143    USE_REALDOS  := 1
144    CFLAGS       += -mx
145    DX_CFLAGS    += -DDOSX
146    ASFLAGS      += /D__X386__
147    DX_ASFLAGS   += -DDOSX
148    LD           := sc
149    LDFLAGS      += $(CFLAGS)
150    LIB_OS       = DOS32
151 .END
152
153 # Place to look for PMODE library files
154
155 .IF $(USE_TNT)
156 PMLIB           := tnt\pm.lib
157 .ELIF $(USE_X32)
158 PMLIB           := x32\pm.lib
159 .ELSE
160 PMLIB           := dosx\pm.lib
161 .END
162
163 # Define the base directory for library files
164
165 .IF $(CHECKED)
166 LIB_BASE_DIR    := $(SCITECH_LIB)\lib\debug
167 CFLAGS                  += -DCHECKED=1
168 .ELSE
169 LIB_BASE_DIR    := $(SCITECH_LIB)\lib\release
170 .ENDIF
171
172 # Define where to install library files
173    LIB_BASE     := $(LIB_BASE_DIR)\$(LIB_OS)\$(SC_LIBBASE)
174    LIB_DEST     := $(LIB_BASE)
175
176 # Define which file contains our rules
177
178    RULES_MAK    := sc32.mk