xref: /onnv-gate/usr/src/tools/ctf/cvt/Makefile.targ (revision 11227:cd2ac59c39f2)
10Sstevel@tonic-gate#
20Sstevel@tonic-gate# CDDL HEADER START
30Sstevel@tonic-gate#
40Sstevel@tonic-gate# The contents of this file are subject to the terms of the
510380SAli.Bahrami@Sun.COM# Common Development and Distribution License (the "License").
610380SAli.Bahrami@Sun.COM# You may not use this file except in compliance with the License.
70Sstevel@tonic-gate#
80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate# See the License for the specific language governing permissions
110Sstevel@tonic-gate# and limitations under the License.
120Sstevel@tonic-gate#
130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate#
190Sstevel@tonic-gate# CDDL HEADER END
200Sstevel@tonic-gate#
210Sstevel@tonic-gate#
2210380SAli.Bahrami@Sun.COM# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate# Use is subject to license terms.
240Sstevel@tonic-gate#
250Sstevel@tonic-gate
260Sstevel@tonic-gateall: $(PROG)
270Sstevel@tonic-gate
280Sstevel@tonic-gatectfconvert: $(CVTOBJS)
290Sstevel@tonic-gate	$(LINK.c) -o $@ $(CVTOBJS) $(LDLIBS)
300Sstevel@tonic-gate	$(POST_PROCESS)
310Sstevel@tonic-gate
320Sstevel@tonic-gatectfmerge: $(MRGOBJS)
33*11227SAli.Bahrami@Sun.COM	$(LINK.c) -o $@ $(MRGOBJS) $(LDLIBS)
340Sstevel@tonic-gate	$(POST_PROCESS)
350Sstevel@tonic-gate
360Sstevel@tonic-gate%.o: ../%.c
370Sstevel@tonic-gate	$(COMPILE.c) $<
380Sstevel@tonic-gate
390Sstevel@tonic-gate%.ln: ../%.c
400Sstevel@tonic-gate	$(LINT.c) -c $<
410Sstevel@tonic-gate
420Sstevel@tonic-gate$(ROOTONBLDMACHPROG): $(SELFTEST)
430Sstevel@tonic-gate$(SELFTEST): $(PROG)
440Sstevel@tonic-gate
450Sstevel@tonic-gateinstall: $(PROG) $(SELFTEST) .WAIT $(ROOTONBLDMACHPROG)
460Sstevel@tonic-gate
470Sstevel@tonic-gatelint: $(LINTFILES)
480Sstevel@tonic-gate	$(LINT) $(LINTFLAGS) $(CVTLINTFILES)
490Sstevel@tonic-gate	$(LINT) $(LINTFLAGS) $(MRGLINTFILES)
500Sstevel@tonic-gate
510Sstevel@tonic-gateclean:
520Sstevel@tonic-gate	$(RM) $(OBJS)
530Sstevel@tonic-gate
540Sstevel@tonic-gateCLOBBERFILES=$(LINTFILES)
550Sstevel@tonic-gate
560Sstevel@tonic-gate#
570Sstevel@tonic-gate# After we've built ctfconvert and ctfmerge, let's use them on ourselves.  The
580Sstevel@tonic-gate# RPATH in the built ctfconvert will only know how to find libdwarf if we invoke
590Sstevel@tonic-gate# the one in $(ROOT).  We haven't installed it there yet, though, so we have to
600Sstevel@tonic-gate# invoke the one in $(SRC).  We'll manually tell it where libdwarf is.
610Sstevel@tonic-gate#
620Sstevel@tonic-gateselftest: ctf_o ctfconvert_merge ctfmerge_merge
630Sstevel@tonic-gate
640Sstevel@tonic-gatectf_o:	$(OBJS:%.o=%_ctf)
650Sstevel@tonic-gate
660Sstevel@tonic-gate%_ctf:	%.o ctfconvert
670Sstevel@tonic-gate	LD_LIBRARY_PATH=$(DWARFSRCLIBDIR)/$(MACH) ./ctfconvert -l $@ $<
680Sstevel@tonic-gate
690Sstevel@tonic-gatectfconvert_merge: ctf_o ctfmerge
700Sstevel@tonic-gate	./ctfmerge -l $@ -o ctfconvert $(CVTOBJS)
710Sstevel@tonic-gate
720Sstevel@tonic-gatectfmerge_merge: ctf_o ctfmerge
730Sstevel@tonic-gate	./ctfmerge -l $@ -o ctfmerge $(MRGOBJS)
740Sstevel@tonic-gate
750Sstevel@tonic-gateinclude ../../Makefile.ctf.targ
76