]> git.ipfire.org Git - people/ms/u-boot.git/blob - board/MAI/bios_emulator/scitech/makedefs/gcc_beos.mk
* Patch by Thomas Frieden, 13 Nov 2002:
[people/ms/u-boot.git] / board / MAI / bios_emulator / scitech / makedefs / gcc_beos.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 # BeOS version for GNU C/C++.
30 #
31 #############################################################################
32
33 # Disable warnings for macros redefined here that were given
34 # on the command line.
35 __.SILENT := $(.SILENT)
36 .SILENT := yes
37
38 # Import enivornment variables that we use common to all compilers
39 .IMPORT .IGNORE : TEMP SHELL INCLUDE LIB SCITECH PRIVATE SCITECH_LIB
40 .IMPORT .IGNORE : DBG OPT OPT_SIZE SHW BETA CHECKED USE_X11 USE_LINUX
41 .IMPORT .IGNORE : USE_EGCS USE_PGCC STATIC_LIBS LIBC
42 TMPDIR := $(TEMP)
43
44 # Standard file suffix definitions
45 #
46 # NOTE: BeOS does not require any extenion for executeable files, but you
47 # can use an extension if you wish. We use the .x extension for building
48 # executeable files so that we can use implicit rules to make the
49 # makefiles simpler and more portable between systems. When you install
50 # the files to a local bin directory, you will probably want to remove
51 # the .x extension.
52 L := .a # Libraries
53 E := .x # Executables
54 O := .o # Objects
55 A := .asm # Assembler sources
56 S := .s # GNU assembler sources
57 P := .cpp # C++ sources
58
59 # File prefix/suffix definitions. The following prefixes are defined, and are
60 # used primarily to abstract between the Unix style libXX.a naming convention
61 # and the DOS/Windows/OS2 naming convention of XX.lib.
62 LP := lib # LP - Library file prefix (name of file on disk)
63 LL := -l # Library link prefix (name of library on link command line)
64 LE := # Library link suffix (extension of library on link command line)
65
66 # We use the Unix shell at all times
67 SHELLFLAGS := -c
68
69 # Definition of $(MAKE) macro for recursive makes.
70 MAKE = $(MAKECMD) $(MFLAGS)
71
72 # Macro to install a library file
73 INSTALL := cp
74
75 # DMAKE uses this recipe to remove intermediate targets
76 .REMOVE :; $(RM) -f $<
77
78 # Turn warnings back to previous setting.
79 .SILENT := $(__.SILENT)
80
81 # We dont use TABS in our makefiles
82 .NOTABS := yes
83
84 # Define that we are compiling for BeOS
85 USE_BEOS := 1
86
87 # Default commands for compiling, assembling linking and archiving.
88 CC := gcc
89 CFLAGS := -Wall -I. -Iinclude $(INCLUDE)
90 CXX := g++
91 AS := nasm
92 ASFLAGS := -f elf -d__FLAT__ -iinclude -i$(SCITECH)/include -d__NOU__
93 LD := gcc
94 LDFLAGS := -L.
95 LIB := ar
96 LIBFLAGS := rcs
97
98 # Link to static libraries if requested
99 .IF $(STATIC_LIBS)
100 LDFLAGS += -static
101 .ENDIF
102
103 # Optionally turn on debugging information
104 .IF $(DBG)
105 CFLAGS += -g
106 .ELSE
107 # NASM does not support debugging information yet
108 ASFLAGS +=
109 .ENDIF
110
111 # Optionally turn on optimisations
112 .IF $(OPT_MAX)
113 CFLAGS += -O6
114 .ELIF $(OPT)
115 CFLAGS += -O2
116 .ELIF $(OPT_SIZE)
117 CFLAGS += -O1
118 .ENDIF
119
120 # Optionally turn on direct i387 FPU instructions
121 .IF $(FPU)
122 CFLAGS += -DFPU387
123 ASFLAGS += -dFPU387
124 .END
125
126 # Optionally compile a beta release version of a product
127 .IF $(BETA)
128 CFLAGS += -DBETA
129 ASFLAGS += -dBETA
130 .ENDIF
131
132 # Disable standard C runtime library
133
134 .IF $(NO_RUNTIME)
135 CFLAGS += -fno-builtin -nostdinc
136 .ENDIF
137
138 # Target environment dependant flags
139 CFLAGS += -D__BEOS__
140 ASFLAGS += -d__BEOS__ -d__UNIX__
141
142 # Define the base directory for library files
143
144 .IF $(CHECKED)
145 LIB_BASE_DIR := $(SCITECH_LIB)/lib/debug
146 CFLAGS += -DCHECKED=1
147 .ELSE
148 LIB_BASE_DIR := $(SCITECH_LIB)/lib/release
149 .ENDIF
150
151 # Define where to install library files
152 LIB_DEST := $(LIB_BASE_DIR)/beos/gcc
153 LDFLAGS += -L$(LIB_DEST)
154
155 # Place to look for PMODE library files
156
157 PMLIB := -lpm
158
159 # Define which file contains our rules
160
161 RULES_MAK := gcc_beos.mk