4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License, Version 1.0 only
6 # (the "License"). You may not use this file except in compliance
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
23 # Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
30 include ../../Makefile.libstand
52 # We don't want thread-specific errno's in kmdb, as we're single-threaded.
56 ../../../common/libstand \
60 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
61 CPPFLAGS = $(INCDIRS:%=-I%) -D_KMDB
64 # kmdb is a kernel module, so we'll use the kernel's build flags.
65 CFLAGS += $(STAND_FLAGS_32)
66 CFLAGS64 += $(STAND_FLAGS_64)
70 LINTFLAGS += -n -errtags=yes
71 CLINTFILES = $(SRCS:%.c=%.ln)
72 LINTFILES = $(CLINTFILES:%.s=%.ln)
74 CERRWARN += -_gcc=-Wno-parentheses
77 COBJS = $(SRCS:%.c=%.o)
78 OBJS = $(COBJS:%.s=%.o)
81 .PARALLEL: $(OBJS) $(LINTFILES)
86 $(AR) r $(LIB) $(OBJS)
89 $(RM) $(LIB) $(OBJS) $(LINTFILES)
92 $(LINT) $(LINTFLAGS) $(LINTFILES)
95 # Dynamic rules for object construction
98 %.o: ../../../common/libstand/%.c
102 %.o: $(SRC)/common/util/%.c
106 %.o: $(SRC)/common/util/i386/%.s
109 %.o: ../../libstand/%.c
110 $(COMPILE.c) -o $@ $<
113 %.o: ../../libstand/%.s
114 $(COMPILE.s) -o $@ $<
120 %.ln: ../../../common/libstand/%.c
123 %.ln: $(SRC)/common/util/%.c
126 %.ln: $(SRC)/common/util/i386/%.s
129 %.ln: ../../libstand/%.c