Merge commit 'f864f99efe57685e1762590c1a880dd16bca6da9' into merges
[unleashed.git] / usr / src / cmd / mdb / Makefile.libstand
blob2d4e2a4c9731ff9e1748b7facb7a3148cc9a073c
2 # CDDL HEADER START
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
7 # with the License.
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]
20 # CDDL HEADER END
23 # Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24 # Use is subject to license terms.
27 .KEEP_STATE:
28 .SUFFIXES:
30 include ../../Makefile.libstand
32 SRCS += \
33         bcmp.c \
34         bcopy.c \
35         bsearch.c \
36         bzero.c \
37         ctime.c \
38         ctype.c \
39         errno.c \
40         getopt.c \
41         memchr.c \
42         memcmp.c \
43         memcpy.c \
44         memccpy.c \
45         memmove.c \
46         memset.c \
47         qsort.c \
48         string.c \
49         strtol.c \
50         strtoul.c
52 INCDIRS = \
53         ../../../common/libstand \
54         ../../libstand \
55         $(ROOT)/usr/include
57 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
58 CPPFLAGS = $(INCDIRS:%=-I%) -D_KMDB
60 C99MODE=        $(C99_ENABLE)
63 # kmdb is a kernel module, so we'll use the kernel's build flags.
64 CFLAGS64 += $(STAND_FLAGS_64)
66 ASFLAGS += -D_ASM
68 CERRWARN += -Wno-parentheses
70 LIB = libstand.a
71 COBJS = $(SRCS:%.c=%.o)
72 OBJS = $(COBJS:%.s=%.o)
74 .NO_PARALLEL:
75 .PARALLEL: $(OBJS)
77 install all: $(LIB)
79 $(LIB): $(OBJS)
80         $(AR) rc $(LIB) $(OBJS)
82 clobber clean:
83         $(RM) $(LIB) $(OBJS)
86 # Dynamic rules for object construction
89 %.o: ../../../common/libstand/%.c
90         $(COMPILE.c) $<
91         $(CTFCONVERT_O)
93 %.o: $(SRC)/common/util/%.c
94         $(COMPILE.c) $<
95         $(CTFCONVERT_O)
97 %.o: $(SRC)/common/util/i386/%.s
98         $(COMPILE.s) $<
100 %.o: ../../libstand/%.c
101         $(COMPILE.c) -o $@ $<
102         $(CTFCONVERT_O)
104 %.o: ../../libstand/%.s
105         $(COMPILE.s) -o $@ $<