Import upstream u-boot 1.1.4
[u-boot.git] / board / MAI / bios_emulator / scitech / makedefs / gcc_dos.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 #               DJGPP V2 port of GNU C/C++ to DOS with DPMI only.
30 #
31 #############################################################################
32
33 # Include standard startup script definitions
34 .IMPORT: SCITECH
35 .INCLUDE: "$(SCITECH)\makedefs\startup.mk"
36
37 # Override some file suffix definitions
38    L            := .a     # Libraries
39    O            := .o     # Objects
40
41 # Override the file prefix/suffix definitions for library naming.
42    LP           := lib          # LP - Library file prefix (name of file on disk)
43    LL           := -l           # Library link prefix (name of library on link command line)
44    LE           :=                      # Library link suffix (extension of library on link command line)
45
46 # Import enivornment variables that we use
47 .IMPORT .IGNORE : DJ_LIBBASE
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
55    AS                   := nasm
56    ASFLAGS      := -t -f coff -F null -d__FLAT__ -d__GNUC__ -dSTDCALL_USCORE -iINCLUDE -i$(SCITECH)\INCLUDE
57    LD           := dj_ld    # Loader and flags
58    LDFLAGS      :=
59    LIB          := ar       # Librarian
60    LIBFLAGS     := rs
61    USE_NASM             := 1
62    USE_GCC              := 1
63
64 # Optionally turn on debugging information
65 .IF $(DBG)
66    CFLAGS       += -g       # Turn on debugging for C compiler
67 .END
68
69 # Optionally turn on optimisations
70 .IF $(OPT)
71    CFLAGS       += -O2
72 .ELIF $(OPT_SIZE)
73    CFLAGS       += -O1
74 .END
75
76 # Optionally turn on direct i387 FPU instructions
77
78 .IF $(FPU)
79    CFLAGS       += -DFPU387
80    ASFLAGS      += -dFPU387
81 .END
82
83 # Optionally compile a beta release version of a product
84 .IF $(BETA)
85    CFLAGS       += -DBETA
86    ASFLAGS      += -dBETA
87 .END
88
89 # DOS extender dependant flags
90    DX_CFLAGS    +=
91    DX_ASFLAGS   += -dDJGPP
92    USE_REALDOS  := 1
93
94 # Define the base directory for library files
95
96 .IF $(CHECKED)
97 LIB_BASE_DIR    := $(SCITECH_LIB)\lib\debug
98 CFLAGS                  += -DCHECKED=1
99 .ELSE
100 LIB_BASE_DIR    := $(SCITECH_LIB)\lib\release
101 .ENDIF
102
103 # Define where to install library files
104    LIB_DEST     := $(LIB_BASE_DIR)\DOS32\$(DJ_LIBBASE)
105
106 # Place to look for PMODE library files
107
108 PMLIB           := -lpm
109
110 # Define which file contains our rules
111
112    RULES_MAK    := dj32.mk