blob: 79ed039f668e2849e9559ecb8020c30a6fa144ca [file] [log] [blame]
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -07001#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
rie24da5b32007-05-17 16:27:31 -07005# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -07007#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
Rod Evans1e495772010-06-28 15:32:48 -070022# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
Garrett D'Amore538aa542014-07-06 12:52:24 -070023# Copyright 2014 Garrett D'Amore <garrett@damore.org>
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070024#
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070025
26# rebind basic build macros to 64-bit versions
27
28CFLAGS= $(CFLAGS64)
29CCFLAGS= $(CCFLAGS64)
30COPTFLAG= $(COPTFLAG64)
31CCOPTFLAG= $(CCOPTFLAG64)
32COMPILE.c= $(COMPILE64.c)
33COMPILE.cc= $(COMPILE64.cc)
34COMPILE.s= $(COMPILE64.s)
35COMPILE.d= $(COMPILE64.d)
dh1429644c063562009-09-30 13:40:27 -060036COMPILE.b= $(COMPILE64.b)
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070037LINK.c= $(LINK64.c)
38LINK.cc= $(LINK64.cc)
39LINT.c= $(LINT64.c)
40
Richard Lowe2d4be7a2012-09-07 23:51:24 -040041CTF_FLAGS= $(CTF_FLAGS_64)
42
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070043OFFSETS_CREATE= $(OFFSETS_CREATE64)
44
45#
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070046# Moved these up to the top level here, so they can be overridden
47#
48LDLIBS.cmd = $(LDLIBS64)
49LDLIBS.lib = $(LDLIBS64)
50
51#
Richard Lowe6a3e8e82012-04-14 20:29:22 -040052# Override Makefile.master's settings of SFWLIBDIR and GCCLIBDIR
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070053#
54SFWLIBDIR= $(SFWLIBDIR64)
Richard Lowe6a3e8e82012-04-14 20:29:22 -040055GCCLIBDIR= $(GCCLIBDIR64)
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070056
57#
58# Override Makefile.master's settings of CC, CCC, AS and LINT
59#
60CC= $($(MACH64)_CC)
61CCC= $($(MACH64)_CCC)
62CPP= $($(MACH64)_CPP)
63AS= $($(MACH64)_AS)
64LD= $($(MACH64)_LD)
65LINT= $($(MACH64)_LINT)
66
wesolows02e56f32005-09-20 15:07:36 -070067REAL_CC= $(CW_CC_CMD:sh)
68REAL_CCC= $(CW_CCC_CMD:sh)
69
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070070BUILD.SO= $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) \
Rod Evans1e495772010-06-28 15:32:48 -070071 $(PICS) $(EXTPICS) -L $(ROOTLIBDIR64) $(LDLIBS)
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070072
Rod Evans2a8d6eb2009-05-07 16:01:18 -070073#
74# ld(1) requires the -64 option to create a 64-bit filter solely from a mapfile
75#
76MAPFILECLASS= -64
77
wesolows159cf8a2005-08-18 18:05:02 -070078CCNEEDED = -lCrun
Keith M Wesolowski494f7e12013-07-17 17:05:07 -070079$(__GNUC64)CCNEEDED = -L$(GCCLIBDIR) -lstdc++
Richard Lowe1a5ea532012-06-25 21:03:47 -040080$(__GNUC64)CCNEEDED += -lgcc_s
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070081
Rod Evans1e495772010-06-28 15:32:48 -070082BUILDCCC.SO= $(CCC) $(CCFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) \
83 $(PICS) $(EXTPICS) $(LDLIBS) $(CCNEEDED)
rie24da5b32007-05-17 16:27:31 -070084MAPFILE.NGB = $(MAPFILE.NGB_$(MACH64))