]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - board/MAI/bios_emulator/scitech/makedefs/emx.mk
* Patch by Thomas Frieden, 13 Nov 2002:
[karo-tx-uboot.git] / board / MAI / bios_emulator / scitech / makedefs / emx.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 #               OS/2 version for EMX/GNU C/C++.
30 #
31 #############################################################################
32
33 # Include standard startup script definitions
34 .IMPORT: SCITECH
35 .INCLUDE: "$(SCITECH)\makedefs\startup.mk"
36
37 # Disable warnings for macros redefined here that were given
38 # on the command line.
39 __.SILENT       := $(.SILENT)
40 .SILENT         := yes
41
42 # Import enivornment variables that we use common to all compilers
43 .IMPORT .IGNORE : TEMP SHELL INCLUDE LIB SCITECH PRIVATE SCITECH_LIB
44 .IMPORT .IGNORE : DBG OPT OPT_SIZE CRTDLL SHW BETA CHECKED NO_EXCEPT NO_RTTI
45 .IMPORT .IGNORE : FULLSCREEN SHOW_ARGS
46    TMPDIR       := $(TEMP)
47
48 # Standard file suffix definitions
49    L            := .lib         # Libraries
50    E            := .exe         # Executables
51    O            := .obj         # Objects
52    A            := .asm         # Assembler sources
53    S            := .s           # GNU assembler sources
54    P            := .cpp         # C++ sources
55
56 # File prefix/suffix definitions. The following prefixes are defined, and are
57 # used primarily to abstract between the Unix style libXX.a naming convention
58 # and the DOS/Windows/OS2 naming convention of XX.lib.
59    LP           :=              # LP - Library file prefix (name of file on disk)
60    LL           := -l           # Library link prefix (name of library on link command line)
61    LE           :=              # Library link suffix (extension of library on link command line)
62
63 # Import enivornment variables that we use
64 .IMPORT .IGNORE : EMX_LIBBASE USE_OS232 USE_OS2GUI
65
66 # We are compiling for a 32 bit envionment
67    _32BIT_      := 1
68
69 # DMAKE uses this recipe to remove intermediate targets
70 .REMOVE :; $(RM) -f $<
71
72 # Turn warnings back to previous setting.
73 .SILENT := $(__.SILENT)
74
75 # We dont use TABS in our makefiles
76 .NOTABS         := yes
77
78 # Default commands for compiling, assembling linking and archiving.
79    CC           := gcc
80    CFLAGS       := -Zmt -Zomf -Wall -I. -I$(INCLUDE)
81    CXX          := gcc -x c++ -fno-exceptions -fno-rtti
82 .IF $(USE_NASM)
83    AS           := nasm
84    ASFLAGS      := -t -f obj -F null -d__FLAT__ -d__NOU__ -iINCLUDE -i$(SCITECH)\INCLUDE
85 .ELSE
86    AS           := tasm     # Assembler and flags
87    ASFLAGS      := /t /mx /m /oi /D__FLAT__ /D__NOU__ /iINCLUDE /i$(SCITECH)\INCLUDE
88 .ENDIF
89    LD           := gcc
90    LDXX         := gcc -x c++
91    LDFLAGS      := -L. -Zomf -Zmt
92    LIB          := emxomfar
93    LIBFLAGS     := -p32 rcv
94
95    YACC         := bison -y
96    LEX          := flex
97    SED          := sed
98
99 # Optionally turn off exceptions and RTTI for C++ code
100 .IF $(NO_EXCEPT)
101    CXX          += -fno-exceptions
102 .ENDIF
103 .IF $(NO_RTTI)
104    CXX          += -fno-rtti
105 .ENDIF
106
107 # Optionally turn on debugging information
108 .IF $(DBG)
109    CFLAGS       += -g
110 .ELSE
111 # Without -s, emx always runs LINK386 with the /DEBUG option
112    CFLAGS       += -s
113    LDFLAGS      += -s
114 # NASM does not support debugging information yet
115    ASFLAGS      +=
116 .ENDIF
117
118 # Optionally turn on optimisations
119 .IF $(OPT_MAX)
120    CFLAGS       += -O6
121 .ELIF $(OPT)
122    CFLAGS       += -O3 -fomit-frame-pointer
123 .ELIF $(OPT_SIZE)
124    CFLAGS       += -Os
125 .ENDIF
126
127 # Optionally turn on direct i387 FPU instructions
128 .IF $(FPU)
129    CFLAGS       += -DFPU387
130    ASFLAGS      += -dFPU387
131 .END
132
133 # Optionally compile a beta release version of a product
134 .IF $(BETA)
135    CFLAGS       += -DBETA
136    ASFLAGS      += -dBETA
137 .ENDIF
138
139 # Disable standard C runtime library
140 .IF $(NO_RUNTIME)
141 CFLAGS                  += -fno-builtin -nostdinc
142 .ENDIF
143
144 # Link against EMX DLLs (CRTDLL=1) or link with static C runtime libraries
145 .IF $(CRTDLL)
146   LDFLAGS       += -Zcrtdll
147 .ELSE
148   CFLAGS                += -Zsys
149   LDFLAGS       += -Zsys
150 .ENDIF
151
152 # Target environment dependant flags
153    CFLAGS       += -D__OS2_32__
154    CFLAGS       += -D__OS2__
155    ASFLAGS      += -d__OS2__
156
157 # Define the base directory for library files
158
159 .IF $(CHECKED)
160 LIB_BASE_DIR    := $(SCITECH_LIB)/lib/debug
161 CFLAGS          += -DCHECKED=1
162 .ELSE
163 LIB_BASE_DIR    := $(SCITECH_LIB)/lib/release
164 .ENDIF
165
166 # Define where to install library files
167    LIB_DEST     := $(LIB_BASE_DIR)\OS232\$(EMX_LIBBASE)
168    LDFLAGS      += -L$(LIB_DEST)
169
170 # Build 32-bit OS/2 apps
171 .IF $(BUILD_DLL)
172    CFLAGS       += -Zdll -DBUILD_DLL
173    LDFLAGS      += -Zdll
174    ASFLAGS      += -dBUILD_DLL
175 .ELSE
176 .IF $(USE_OS2GUI)
177    CFLAGS       += -D__OS2_PM__
178    LDFLAGS      += -Zlinker /PMTYPE:PM
179 .ELSE
180 .IF $(FULLSCREEN)
181    LDFLAGS      += -Zlinker /PMTYPE:NOVIO
182 .ELSE
183    LDFLAGS      += -Zlinker /PMTYPE:VIO
184 .ENDIF
185 .ENDIF
186 .ENDIF
187
188 # Place to look for PMODE library files
189
190 PMLIB           := -lpm
191
192 # Define which file contains our rules
193
194    RULES_MAK    := emx.mk