1 | #
|
---|
2 | # Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
|
---|
3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
---|
4 | #
|
---|
5 | # This code is free software; you can redistribute it and/or modify it
|
---|
6 | # under the terms of the GNU General Public License version 2 only, as
|
---|
7 | # published by the Free Software Foundation.
|
---|
8 | #
|
---|
9 | # This code is distributed in the hope that it will be useful, but WITHOUT
|
---|
10 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
---|
11 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
---|
12 | # version 2 for more details (a copy is included in the LICENSE file that
|
---|
13 | # accompanied this code).
|
---|
14 | #
|
---|
15 | # You should have received a copy of the GNU General Public License version
|
---|
16 | # 2 along with this work; if not, write to the Free Software Foundation,
|
---|
17 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
---|
18 | #
|
---|
19 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
---|
20 | # CA 95054 USA or visit www.sun.com if you need additional information or
|
---|
21 | # have any questions.
|
---|
22 | #
|
---|
23 | #
|
---|
24 |
|
---|
25 | # Generic compiler settings
|
---|
26 | CXX = g++
|
---|
27 |
|
---|
28 | CXX_FLAGS = -Zomf -march=i486 -mtune=generic
|
---|
29 |
|
---|
30 | # Based on BUILDARCH we add some flags and select the default compiler name
|
---|
31 | ifeq ($(BUILDARCH),i486)
|
---|
32 | CXX_FLAGS += -DIA32
|
---|
33 | endif
|
---|
34 |
|
---|
35 | # Compile for space above time.
|
---|
36 | ifeq ($(Variant),kernel)
|
---|
37 | PRODUCT_OPT_OPTION = -s -Os
|
---|
38 | FASTDEBUG_OPT_OPTION = -s -Os
|
---|
39 | DEBUG_OPT_OPTION = -g
|
---|
40 | ese
|
---|
41 | PRODUCT_OPT_OPTION = -s -O3
|
---|
42 | FASTDEBUG_OPT_OPTION = -s -O3
|
---|
43 | DEBUG_OPT_OPTION = -g
|
---|
44 | endif
|
---|
45 |
|
---|
46 | # If NO_OPTIMIZATIONS is defined in the environment, turn everything off
|
---|
47 | ifdef NO_OPTIMIZATIONS
|
---|
48 | PRODUCT_OPT_OPTION = $(DEBUG_OPT_OPTION)
|
---|
49 | FASTDEBUG_OPT_OPTION = $(DEBUG_OPT_OPTION)
|
---|
50 | endif
|
---|
51 |
|
---|
52 | # Generic linker settings
|
---|
53 | LINK = g++
|
---|
54 | LINK_FLAGS = \
|
---|
55 | -Zomf -Zmap -Zstack 0x2000 -Zlinker "DISABLE 1121" -Zhigh-mem \
|
---|
56 |
|
---|
57 | # @todo
|
---|
58 | #kernel32.lib user32.lib gdi32.lib winspool.lib \
|
---|
59 | #comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
|
---|
60 | #uuid.lib Wsock32.lib winmm.lib
|
---|