Makefile.libstand revision 7c478bd95313f5f23a4c958a745db2134aa03244
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# CDDL HEADER START
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# The contents of this file are subject to the terms of the
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# Common Development and Distribution License, Version 1.0 only
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# (the "License"). You may not use this file except in compliance
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# with the License.
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# See the License for the specific language governing permissions
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# and limitations under the License.
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# When distributing Covered Code, include this CDDL HEADER in each
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# If applicable, add the following below this CDDL HEADER, with the
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# fields enclosed by brackets "[]" replaced with your own identifying
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# information: Portions Copyright [yyyy] [name of copyright owner]
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# CDDL HEADER END
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# Use is subject to license terms.
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo#ident "%Z%%M% %I% %E% SMI"
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# We don't want thread-specific errno's in kmdb, as we're single-threaded.
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo ../../libstand \
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae YooCPPFLAGS = $(INCDIRS:%=-I%) -D_KMDB
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# kmdb is a kernel module, so we'll use the kernel's build flags.
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae YooCFLAGS += $(STAND_FLAGS_32)
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae YooCFLAGS64 += $(STAND_FLAGS_64)
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae YooASFLAGS += -P -D_ASM
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# Reset STRIPFLAG to the empty string. MDB is intentionally installed
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# with a symbol table in order to help module developers.
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae YooLINTFLAGS += -n -errtags=yes
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae YooCLINTFILES = $(SRCS:%.c=%.ln)
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae YooLINTFILES = $(CLINTFILES:%.s=%.ln)
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae YooCOBJS = $(SRCS:%.c=%.o)
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae YooOBJS = $(COBJS:%.s=%.o)
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo.NO_PARALLEL:
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo.PARALLEL: $(OBJS) $(LINTFILES)
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yooinstall all: $(LIB)
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo$(LIB): $(OBJS)
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo $(AR) r $(LIB) $(OBJS)
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yooclobber clean:
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo $(RM) $(LIB) $(OBJS) $(LINTFILES)
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoolint: $(LINTFILES)
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo $(LINT) $(LINTFLAGS) $(LINTFILES)
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo# Dynamic rules for object construction
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo%.o: ../../../common/libstand/%.c
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo $(CTFCONVERT_O)
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo $(CTFCONVERT_O)
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo%.o: ../../libstand/%.c
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo $(CTFCONVERT_O)
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo%.o: ../../libstand/%.s
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo%.ln: ../../../common/libstand/%.c
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo%.ln: $(SRC)/common/util/%.c
2b371b262f7272266ff18cc2aff65176a2c16383Sungbae Yoo%.ln: ../../libstand/%.c