xref: /onnv-gate/usr/src/cmd/mdb/Makefile.libstandctf (revision 4271:dda1ded496b7)
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
5*4271Srie# Common Development and Distribution License (the "License").
6*4271Srie# 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#
22*4271Srie# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate# Use is subject to license terms.
240Sstevel@tonic-gate#
250Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
260Sstevel@tonic-gate
270Sstevel@tonic-gate.KEEP_STATE:
280Sstevel@tonic-gate
290Sstevel@tonic-gateCTF_COMMON_SRCS = \
300Sstevel@tonic-gate	ctf_create.c \
310Sstevel@tonic-gate	ctf_decl.c \
320Sstevel@tonic-gate	ctf_error.c \
330Sstevel@tonic-gate	ctf_hash.c \
340Sstevel@tonic-gate	ctf_labels.c \
350Sstevel@tonic-gate	ctf_lookup.c \
360Sstevel@tonic-gate	ctf_open.c \
370Sstevel@tonic-gate	ctf_types.c \
380Sstevel@tonic-gate	ctf_util.c
390Sstevel@tonic-gate
400Sstevel@tonic-gateCTF_STUB_SRCS = \
410Sstevel@tonic-gate	ctf_subr.c
420Sstevel@tonic-gate
430Sstevel@tonic-gateMAPFILE = ../../../common/libstandctf/mapfile
440Sstevel@tonic-gate
450Sstevel@tonic-gate$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
460Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/common/ctf -I../../../common -DCTF_OLD_VERSIONS -D_MDB \
470Sstevel@tonic-gate    -Dvsnprintf=ctf_vsnprintf
480Sstevel@tonic-gate
490Sstevel@tonic-gate#
500Sstevel@tonic-gate# kmdb is a kernel module, so we'll use the kernel's build flags.
510Sstevel@tonic-gateCFLAGS += $(STAND_FLAGS_32)
520Sstevel@tonic-gateCFLAGS64 += $(STAND_FLAGS_64)
530Sstevel@tonic-gate
54*4271SrieLDFLAGS = $(ZNOVERSION) $(BREDUCE) -M $(MAPFILE) -dy -r
550Sstevel@tonic-gate
560Sstevel@tonic-gateLIB = libstandctf.so
570Sstevel@tonic-gateOBJS = $(CTF_COMMON_SRCS:%.c=%.o) $(CTF_STUB_SRCS:%.c=%.o)
580Sstevel@tonic-gateLINTFILES = $(OBJS:%.o=%.ln)
590Sstevel@tonic-gate
600Sstevel@tonic-gateLINTFLAGS += -n -errtags=yes
610Sstevel@tonic-gate
620Sstevel@tonic-gate.NO_PARALLEL:
630Sstevel@tonic-gate.PARALLEL: $(OBJS)
640Sstevel@tonic-gate
650Sstevel@tonic-gateinstall all: $(LIB)
660Sstevel@tonic-gate
670Sstevel@tonic-gate$(LIB): $(OBJS) $(MAPFILE)
680Sstevel@tonic-gate	$(LD) $(LDFLAGS) -o $@ $(OBJS)
690Sstevel@tonic-gate
700Sstevel@tonic-gateclobber clean:
710Sstevel@tonic-gate	$(RM) $(LIB) $(OBJS) $(LINTFILES)
720Sstevel@tonic-gate
730Sstevel@tonic-gatelint: $(LINTFILES)
740Sstevel@tonic-gate	$(LINT) $(LINTFLAGS) $(LINTFILES)
750Sstevel@tonic-gate
760Sstevel@tonic-gate#
770Sstevel@tonic-gate# Dynamic rules for object construction
780Sstevel@tonic-gate#
790Sstevel@tonic-gate
800Sstevel@tonic-gate%.o: ../../../common/libstandctf/%.c
810Sstevel@tonic-gate	$(COMPILE.c) $<
820Sstevel@tonic-gate	$(CTFCONVERT_O)
830Sstevel@tonic-gate
840Sstevel@tonic-gate%.o: $(SRC)/common/ctf/%.c
850Sstevel@tonic-gate	$(COMPILE.c) $<
860Sstevel@tonic-gate	$(CTFCONVERT_O)
870Sstevel@tonic-gate
880Sstevel@tonic-gate#
890Sstevel@tonic-gate# Lint
900Sstevel@tonic-gate#
910Sstevel@tonic-gate
920Sstevel@tonic-gate%.ln: ../../../common/libstandctf/%.c
930Sstevel@tonic-gate	$(LINT.c) -c $<
940Sstevel@tonic-gate
950Sstevel@tonic-gate%.ln: $(SRC)/common/ctf/%.c
960Sstevel@tonic-gate	$(LINT.c) -c $<
97