Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | # ========== Copyright Header Begin ========================================== |
2 | # | |
3 | # OpenSPARC T2 Processor File: Makefile.master | |
4 | # Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved. | |
5 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES. | |
6 | # | |
7 | # The above named program is free software; you can redistribute it and/or | |
8 | # modify it under the terms of the GNU General Public | |
9 | # License version 2 as published by the Free Software Foundation. | |
10 | # | |
11 | # The above named program is distributed in the hope that it will be | |
12 | # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | # General Public License for more details. | |
15 | # | |
16 | # You should have received a copy of the GNU General Public | |
17 | # License along with this work; if not, write to the Free Software | |
18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | |
19 | # | |
20 | # ========== Copyright Header End ============================================ | |
21 | # Makefile.master | |
22 | # Top level makefile options for rst tools | |
23 | ||
24 | S1S8 = /import/datools/vendor/forte/s1s8/SUNWspro | |
25 | CC = $(S1S8)/bin/cc | |
26 | CCC = $(S1S8)/bin/CC | |
27 | ||
28 | APDIR = /import/archperf | |
29 | RSTDIR=$(APDIR)/pkgs/rst/latest | |
30 | SHADE_DIR=/import/shade/v6/latest-$(HOST3264) | |
31 | ||
32 | # install DIR relative to the sub directories | |
33 | INSTALL_DIR = $(TOP_DIR)/pkg | |
34 | ||
35 | INSTALL_TARG = 32opt | |
36 | ||
37 | BUILD_DIR = $(TOP_DIR)/build | |
38 | OBJ_DIR = $(BUILD_DIR)/$(TARG) | |
39 | ||
40 | CCLARGEFILE:sh = getconf LFS_CFLAGS # for large file support | |
41 | ||
42 | CFLAGS_BASE = -mt -xtarget=ultra3 -dalign $(INCLUDES) | |
43 | ||
44 | CFLAGS32 = -xarch=v8plus $(CCLARGEFILE) | |
45 | CFLAGS64 = -xarch=v9 | |
46 | ||
47 | CFLAGSDBG = -g | |
48 | CFLAGSOPT = -xO4 | |
49 | ||
50 | CFLAGSAMD64 = -xarch=amd64 -mt -xO4 -KPIC $(INCLUDES) -DARCH_AMD64 | |
51 | ||
52 | CFLAGS64OPT = $(CFLAGS_BASE) $(CFLAGS64) $(CFLAGSOPT) | |
53 | CFLAGS32OPT = $(CFLAGS_BASE) $(CFLAGS32) $(CFLAGSOPT) | |
54 | CFLAGS64DBG = $(CFLAGS_BASE) $(CFLAGS64) $(CFLAGSDBG) | |
55 | CFLAGS32DBG = $(CFLAGS_BASE) $(CFLAGS32) $(CFLAGSDBG) | |
56 | ||
57 | # don't need to redefine CCFLAGS/CXXFLAGS - just CFLAGS | |
58 | CCFLAGS = $(CFLAGS) | |
59 | CXXFLAGS = $(CFLAGS) | |
60 | ||
61 | # path to include files - keep in mind the build dir structure | |
62 | # component dir is rstf, rstzip etc. Contains build dirs | |
63 | # build dir is 32g/64g/32opt/64opt etc. | |
64 | # root dir is the rst workspace dir | |
65 | ||
66 | # we get include files from component dir first, then from | |
67 | # other components in root dir | |
68 | INCLUDES = -I$(CUR_DIR) -I$(CUR_DIR)/.. -I$(CUR_DIR)/../.. | |
69 | ||
70 | # path to search for source files. we typically build inside | |
71 | # build-specific subdirectories 32g, 64opt etc. from sources at | |
72 | # the main component directory. | |
73 | # VPATH = .:.. | |
74 | ||
75 | # Dependence rules | |
76 | %amd64 := CFLAGS=$(CFLAGSAMD64) | |
77 | %amd64 := AS=/usr/ccs/bin/as | |
78 | %amd64 := ASFLAGS=-P -xarch=amd64 -KPIC -DARCH_AMD64 | |
79 | %amd64 := HOST3264=64 | |
80 | ||
81 | %amd64 := BUILDTAG=amd64 | |
82 | %amd64 := S1S8=/usr/dist/share/sunstudio_i386/SUNWspro | |
83 | %amd64 := ZLIB= | |
84 | %amd64 := SPIXINC=-I/import/archperf/pkgs/spix/1.1/x64/inc | |
85 | %amd64 := SPIXLIB=-L/import/archperf/pkgs/spix/1.1/x64/lib -lspix_sparc | |
86 | %amd64 := RSTZIP3_LIBS=$(SPIXLIB) -lz | |
87 | ||
88 | ||
89 | %32g := CFLAGS=$(CFLAGS32DBG) | |
90 | %64g := CFLAGS=$(CFLAGS64DBG) | |
91 | %32opt := CFLAGS=$(CFLAGS32OPT) | |
92 | %64opt := CFLAGS=$(CFLAGS64OPT) | |
93 | ||
94 | %32g := HOST3264=32 | |
95 | %32opt := HOST3264=32 | |
96 | %64g := HOST3264=64 | |
97 | %64opt := HOST3264=64 | |
98 | ||
99 | %32g := BUILDTAG=32g | |
100 | %64g := BUILDTAG=64g | |
101 | %32opt := BUILDTAG=32opt | |
102 | %64opt := BUILDTAG=64opt | |
103 | ||
104 | default: | |
105 | @echo must specify one or more of: 32g 32opt 64g 64opt amd64 | |
106 |