xref: /onnv-gate/usr/src/cmd/mdb/Makefile.libstand (revision 524:259d2acc2f55)
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
50Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
60Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
70Sstevel@tonic-gate# with the License.
80Sstevel@tonic-gate#
90Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
100Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
110Sstevel@tonic-gate# See the License for the specific language governing permissions
120Sstevel@tonic-gate# and limitations under the License.
130Sstevel@tonic-gate#
140Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
150Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
160Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
170Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
180Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
190Sstevel@tonic-gate#
200Sstevel@tonic-gate# CDDL HEADER END
210Sstevel@tonic-gate#
220Sstevel@tonic-gate#
230Sstevel@tonic-gate# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
240Sstevel@tonic-gate# Use is subject to license terms.
250Sstevel@tonic-gate#
260Sstevel@tonic-gate#ident	"%Z%%M%	%I%	%E% SMI"
270Sstevel@tonic-gate#
280Sstevel@tonic-gate
290Sstevel@tonic-gate.KEEP_STATE:
300Sstevel@tonic-gate.SUFFIXES:
310Sstevel@tonic-gate
320Sstevel@tonic-gateinclude ../../Makefile.libstand
330Sstevel@tonic-gate
340Sstevel@tonic-gateSRCS += \
350Sstevel@tonic-gate	bcmp.c \
360Sstevel@tonic-gate	bcopy.c \
370Sstevel@tonic-gate	bsearch.c \
380Sstevel@tonic-gate	bzero.c \
390Sstevel@tonic-gate	ctime.c \
400Sstevel@tonic-gate	ctype.c \
410Sstevel@tonic-gate	errno.c \
420Sstevel@tonic-gate	getopt.c \
430Sstevel@tonic-gate	memchr.c \
440Sstevel@tonic-gate	memcmp.c \
450Sstevel@tonic-gate	memcpy.c \
460Sstevel@tonic-gate	memccpy.c \
470Sstevel@tonic-gate	memmove.c \
480Sstevel@tonic-gate	memset.c \
490Sstevel@tonic-gate	qsort.c \
500Sstevel@tonic-gate	string.c \
510Sstevel@tonic-gate	strtol.c \
520Sstevel@tonic-gate	strtoul.c
530Sstevel@tonic-gate
540Sstevel@tonic-gate# We don't want thread-specific errno's in kmdb, as we're single-threaded.
550Sstevel@tonic-gateDTS_ERRNO=
560Sstevel@tonic-gate
570Sstevel@tonic-gateINCDIRS = \
580Sstevel@tonic-gate	../../../common/libstand \
590Sstevel@tonic-gate	../../libstand \
600Sstevel@tonic-gate	$(ROOT)/usr/include
610Sstevel@tonic-gate
620Sstevel@tonic-gate$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
630Sstevel@tonic-gateCPPFLAGS = $(INCDIRS:%=-I%) -D_KMDB
640Sstevel@tonic-gate
650Sstevel@tonic-gate#
660Sstevel@tonic-gate# kmdb is a kernel module, so we'll use the kernel's build flags.
670Sstevel@tonic-gateCFLAGS += $(STAND_FLAGS_32)
680Sstevel@tonic-gateCFLAGS64 += $(STAND_FLAGS_64)
690Sstevel@tonic-gate
700Sstevel@tonic-gateASFLAGS += -P -D_ASM
710Sstevel@tonic-gate
720Sstevel@tonic-gateLINTFLAGS += -n -errtags=yes
730Sstevel@tonic-gateCLINTFILES = $(SRCS:%.c=%.ln)
740Sstevel@tonic-gateLINTFILES = $(CLINTFILES:%.s=%.ln)
750Sstevel@tonic-gate
760Sstevel@tonic-gateLIB = libstand.a
770Sstevel@tonic-gateCOBJS = $(SRCS:%.c=%.o)
780Sstevel@tonic-gateOBJS = $(COBJS:%.s=%.o)
790Sstevel@tonic-gate
800Sstevel@tonic-gate.NO_PARALLEL:
810Sstevel@tonic-gate.PARALLEL: $(OBJS) $(LINTFILES)
820Sstevel@tonic-gate
830Sstevel@tonic-gateinstall all: $(LIB)
840Sstevel@tonic-gate
850Sstevel@tonic-gate$(LIB): $(OBJS)
860Sstevel@tonic-gate	$(AR) r $(LIB) $(OBJS)
870Sstevel@tonic-gate
880Sstevel@tonic-gateclobber clean:
890Sstevel@tonic-gate	$(RM) $(LIB) $(OBJS) $(LINTFILES)
900Sstevel@tonic-gate
910Sstevel@tonic-gatelint: $(LINTFILES)
920Sstevel@tonic-gate	$(LINT) $(LINTFLAGS) $(LINTFILES)
930Sstevel@tonic-gate
940Sstevel@tonic-gate#
950Sstevel@tonic-gate# Dynamic rules for object construction
960Sstevel@tonic-gate#
970Sstevel@tonic-gate
980Sstevel@tonic-gate%.o: ../../../common/libstand/%.c
990Sstevel@tonic-gate	$(COMPILE.c) $<
1000Sstevel@tonic-gate	$(CTFCONVERT_O)
1010Sstevel@tonic-gate
1020Sstevel@tonic-gate%.o: $(SRC)/common/util/%.c
1030Sstevel@tonic-gate	$(COMPILE.c) $<
1040Sstevel@tonic-gate	$(CTFCONVERT_O)
1050Sstevel@tonic-gate
106*436Sdmick%.o: $(SRC)/common/util/i386/%.s
107*436Sdmick	$(COMPILE.s) $<
108*436Sdmick
1090Sstevel@tonic-gate%.o: ../../libstand/%.c
1100Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1110Sstevel@tonic-gate	$(CTFCONVERT_O)
1120Sstevel@tonic-gate
1130Sstevel@tonic-gate%.o: ../../libstand/%.s
1140Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
1150Sstevel@tonic-gate
1160Sstevel@tonic-gate#
1170Sstevel@tonic-gate# Lint
1180Sstevel@tonic-gate#
1190Sstevel@tonic-gate
1200Sstevel@tonic-gate%.ln: ../../../common/libstand/%.c
1210Sstevel@tonic-gate	$(LINT.c) -c $<
1220Sstevel@tonic-gate
1230Sstevel@tonic-gate%.ln: $(SRC)/common/util/%.c
1240Sstevel@tonic-gate	$(LINT.c) -c $<
1250Sstevel@tonic-gate
126*436Sdmick%.ln: $(SRC)/common/util/i386/%.s
127*436Sdmick	$(LINT.s) -c $<
128*436Sdmick
1290Sstevel@tonic-gate%.ln: ../../libstand/%.c
1300Sstevel@tonic-gate	$(LINT.c) -c $<
1310Sstevel@tonic-gate
1320Sstevel@tonic-gate%.ln: %.s
1330Sstevel@tonic-gate	$(LINT.s) -c $<
134