xref: /titanic_50/usr/src/lib/libuutil/Makefile.com (revision 4944376cd5de3dcd3b4feeaad9cbedbc024d1474)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28LIBRARY =	libuutil.a
29VERS =		.1
30
31OBJECTS = \
32	avl.o \
33	uu_alloc.o \
34	uu_avl.o \
35	uu_dprintf.o \
36	uu_ident.o \
37	uu_list.o \
38	uu_misc.o \
39	uu_open.o \
40	uu_pname.o \
41	uu_strtoint.o
42
43include ../../Makefile.lib
44include ../../Makefile.rootfs
45
46LIBS =		$(DYNLIB) $(LINTLIB)
47
48$(NOT_NATIVE)NATIVE_BUILD = $(POUND_SIGN)
49$(NATIVE_BUILD)VERS =
50$(NATIVE_BUILD)LIBS = $(DYNLIB)
51
52SRCS =	\
53	../../../common/avl/avl.c \
54	../common/uu_alloc.c \
55	../common/uu_avl.c \
56	../common/uu_dprintf.c \
57	../common/uu_ident.c \
58	../common/uu_list.c \
59	../common/uu_misc.c \
60	../common/uu_open.c \
61	../common/uu_pname.c \
62	../common/uu_strtoint.c
63
64LINTS =		$(OBJECTS:%.o=%.ln)
65
66SRCDIR =	../common
67$(LINTLIB):=	SRCS = $(SRCDIR)/$(LINTSRC)
68LDLIBS +=	-lc
69
70AVLDIR =	../../../common/avl
71
72CFLAGS +=	$(CCVERBOSE)
73CPPFLAGS +=	-I$(SRCDIR) -I../../common/inc
74LINTFLAGS +=	-erroff=E_GLOBAL_COULD_BE_STATIC2
75LINTFLAGS64 +=	-erroff=E_GLOBAL_COULD_BE_STATIC2
76
77MY_NATIVE_CPPFLAGS = -DNATIVE_BUILD -I$(SRCDIR)
78MY_NATIVE_LDLIBS = -lc
79
80$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
81
82.KEEP_STATE:
83
84all: $(LIBS) $(NOT_NATIVE)
85
86lint: $(LINTLIB) globallint
87
88globallint: $(LINTS)
89	$(LINT.c) $(LINTS) $(LDLIBS)
90
91%.ln: $(SRCDIR)/%.c
92	$(LINT.c) -c $<
93
94%.ln: $(AVLDIR)/%.c
95	$(LINT.c) -c $<
96
97pics/%.o:	$(AVLDIR)/%.c
98	$(COMPILE.c) -o $@ $<
99	$(POST_PROCESS_O)
100
101include ../../Makefile.targ
102