Import upstream u-boot 1.1.4
[u-boot.git] / board / MAI / bios_emulator / scitech / makedefs / gcc_win32.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 #               Cygwin port of GNU C/C++ to Win32.
30 #
31 #############################################################################
32
33 # Include standard startup script definitions
34 .IMPORT: SCITECH
35 .INCLUDE: "$(SCITECH)\makedefs\startup.mk"
36
37 # Import enivornment variables that we use
38 .IMPORT .IGNORE : GCC2_LIBBASE
39
40 # Override some file suffix definitions
41    L            := .a     # Libraries
42    O            := .o     # Objects
43
44 # Override the file prefix/suffix definitions for library naming.
45    LP           := lib          # LP - Library file prefix (name of file on disk)
46    LL           := -l           # Library link prefix (name of library on link command line)
47    LE           :=                      # Library link suffix (extension of library on link command line)
48
49 # We are compiling for a 32 bit envionment
50    _32BIT_      := 1
51
52 # Default commands for compiling, assembling linking and archiving
53    CC           := gcc      # C-compiler and flags
54    CFLAGS       := -Wall -I. -Iinclude -I$(SCITECH:s,\,/)/include -I$(PRIVATE:s,\,/)/include
55    SHOW_CFLAGS  := -c
56    CXX          := g++
57    AS                   := nasm
58    ASFLAGS      := -t -f coff -F null -d__FLAT__ -d__GNUC__ -dSTDCALL_USCORE -iINCLUDE -i$(SCITECH)\INCLUDE
59    SHOW_ASFLAGS := -f coff
60    LD           := gcc          # Loader and flags
61    LDXX                 := g++
62 .IF $(WIN32_GUI)
63    LDFLAGS      := -L. -mwindows -e _mainCRTStartup
64 .ELSE
65    LDFLAGS      := -L.
66 .ENDIF
67    RC           := windres
68    RCFLAGS              := -O coff
69    LIB          := ar       # Librarian
70    LIBFLAGS     := rcs
71    YACC                 := bison -y
72    LEX                  := flex
73    SED                  := sed
74
75 # Optionally turn on debugging information
76 .IF $(DBG)
77    CFLAGS       += -g
78    SHOW_CFLAGS  += -g
79 .ELSE
80 # NASM does not support debugging information yet
81    ASFLAGS      +=
82 .ENDIF
83
84 # Optionally turn on optimisations
85 .IF $(OPT_MAX)
86    CFLAGS       += -O6
87    SHOW_CFLAGS  += -O6
88 .ELIF $(OPT)
89    CFLAGS       += -O2
90    SHOW_CFLAGS  += -O2
91 .ELIF $(OPT_SIZE)
92    CFLAGS       += -O1
93    SHOW_CFLAGS  += -O1
94 .ENDIF
95
96 # Optionally turn on direct i387 FPU instructions
97
98 .IF $(FPU)
99    CFLAGS       += -DFPU387
100    ASFLAGS      += -dFPU387
101 .END
102
103 # Optionally compile a beta release version of a product
104 .IF $(BETA)
105    CFLAGS       += -DBETA
106    SHOW_CFLAGS  += -DBETA
107    ASFLAGS      += -dBETA
108    SHOW_ASFLAGS += -dBETA
109 .ENDIF
110
111 # DOS extender dependant flags
112    DX_CFLAGS    +=
113    DX_ASFLAGS   += -dGCC_WIN32
114
115 # Define the base directory for library files
116
117 .IF $(CHECKED)
118 LIB_BASE_DIR    := $(SCITECH_LIB)\lib\debug
119 CFLAGS                  += -DCHECKED=1
120 SHOW_CFLAGS         += -DCHECKED=1
121 .ELSE
122 LIB_BASE_DIR    := $(SCITECH_LIB)\lib\release
123 .ENDIF
124
125 # Define where to install library files
126    LIB_DEST     := $(LIB_BASE_DIR)\WIN32\$(GCC2_LIBBASE)
127    LDFLAGS      += -L$(LIB_DEST)
128
129 # Place to look for PMODE library files
130
131 PMLIB           := -lpm
132
133 # Define which file contains our rules
134
135    RULES_MAK    := gcc_win32.mk