blob: a06525bd6d78f45db9ebae7e10ae5c57668c1f96 [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 PALOcdf815b2015-04-11 18:31:04 +020052# Override Makefile.master's settings of GCCLIBDIR
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070053#
Richard Lowe6a3e8e82012-04-14 20:29:22 -040054GCCLIBDIR= $(GCCLIBDIR64)
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070055
56#
57# Override Makefile.master's settings of CC, CCC, AS and LINT
58#
59CC= $($(MACH64)_CC)
60CCC= $($(MACH64)_CCC)
61CPP= $($(MACH64)_CPP)
62AS= $($(MACH64)_AS)
63LD= $($(MACH64)_LD)
64LINT= $($(MACH64)_LINT)
65
66BUILD.SO= $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) \
Rod Evans1e495772010-06-28 15:32:48 -070067 $(PICS) $(EXTPICS) -L $(ROOTLIBDIR64) $(LDLIBS)
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070068
Rod Evans2a8d6eb2009-05-07 16:01:18 -070069#
70# ld(1) requires the -64 option to create a 64-bit filter solely from a mapfile
71#
72MAPFILECLASS= -64
73
wesolows159cf8a2005-08-18 18:05:02 -070074CCNEEDED = -lCrun
Keith M Wesolowski494f7e12013-07-17 17:05:07 -070075$(__GNUC64)CCNEEDED = -L$(GCCLIBDIR) -lstdc++
Richard Lowe1a5ea532012-06-25 21:03:47 -040076$(__GNUC64)CCNEEDED += -lgcc_s
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070077
Rod Evans1e495772010-06-28 15:32:48 -070078BUILDCCC.SO= $(CCC) $(CCFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) \
79 $(PICS) $(EXTPICS) $(LDLIBS) $(CCNEEDED)
rie24da5b32007-05-17 16:27:31 -070080MAPFILE.NGB = $(MAPFILE.NGB_$(MACH64))