xref: /illumos-gate/usr/src/cmd/Makefile.ctf (revision f7d1ac84cff3dab5b700f71d44f3a017e85ea10e)
1e0ad97e3SJonathan Adams#
2e0ad97e3SJonathan Adams# CDDL HEADER START
3e0ad97e3SJonathan Adams#
4e0ad97e3SJonathan Adams# The contents of this file are subject to the terms of the
5e0ad97e3SJonathan Adams# Common Development and Distribution License (the "License").
6e0ad97e3SJonathan Adams# You may not use this file except in compliance with the License.
7e0ad97e3SJonathan Adams#
8e0ad97e3SJonathan Adams# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9e0ad97e3SJonathan Adams# or http://www.opensolaris.org/os/licensing.
10e0ad97e3SJonathan Adams# See the License for the specific language governing permissions
11e0ad97e3SJonathan Adams# and limitations under the License.
12e0ad97e3SJonathan Adams#
13e0ad97e3SJonathan Adams# When distributing Covered Code, include this CDDL HEADER in each
14e0ad97e3SJonathan Adams# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15e0ad97e3SJonathan Adams# If applicable, add the following below this CDDL HEADER, with the
16e0ad97e3SJonathan Adams# fields enclosed by brackets "[]" replaced with your own identifying
17e0ad97e3SJonathan Adams# information: Portions Copyright [yyyy] [name of copyright owner]
18e0ad97e3SJonathan Adams#
19e0ad97e3SJonathan Adams# CDDL HEADER END
20e0ad97e3SJonathan Adams#
21e0ad97e3SJonathan Adams#
22e0ad97e3SJonathan Adams# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23e0ad97e3SJonathan Adams# Use is subject to license terms.
247a58f538SRobert Mustacchi# Copyright 2021 Oxide Computer Company
25e0ad97e3SJonathan Adams#
26e0ad97e3SJonathan Adams
277a58f538SRobert Mustacchi#
287a58f538SRobert Mustacchi# The default mode at the moment is to use ctfconvert on object files
297a58f538SRobert Mustacchi# and merge them together. If you set this to 'link' after including
307a58f538SRobert Mustacchi# Makefile.ctf, it will switch that so instead we just do a single
317a58f538SRobert Mustacchi# ctfconvert on the resulting linked binary.
327a58f538SRobert Mustacchi#
337a58f538SRobert MustacchiCTF_MODE = objs
347a58f538SRobert Mustacchi
357a58f538SRobert MustacchiPOST_objs = ; $(CTFMERGE) $(CTFMRGFLAGS) -L VERSION -o $@ $(OBJS)
367a58f538SRobert MustacchiPOST_O_objs = ; $(CTFCONVERT_O)
377a58f538SRobert Mustacchi
387a58f538SRobert MustacchiPOST_link = $(CTFCONVERT) -L VERSION $@
397a58f538SRobert MustacchiPOST_O_link =
407a58f538SRobert Mustacchi
417a58f538SRobert MustacchiPROCESS_CTF = $(POST_$(CTF_MODE))
427a58f538SRobert MustacchiPOST_PROCESS_O += $(POST_O_$(CTF_MODE))
43e0ad97e3SJonathan Adams
44e0ad97e3SJonathan AdamsCFLAGS += $(CTF_FLAGS)
45*f7d1ac84SRichard LoweCFLAGS64 += $(CTF_FLAGS_64)
46e0ad97e3SJonathan AdamsNATIVE_CFLAGS += $(CTF_FLAGS)
47