xref: /titanic_52/usr/src/lib/libuutil/Makefile.com (revision bdfc6d18da790deeec2e0eb09c625902defe2498)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
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.
13#
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]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29
30LIBRARY =	libuutil.a
31VERS =		.1
32
33OBJECTS = \
34	avl.o \
35	uu_alloc.o \
36	uu_avl.o \
37	uu_dprintf.o \
38	uu_ident.o \
39	uu_list.o \
40	uu_misc.o \
41	uu_open.o \
42	uu_pname.o \
43	uu_strtoint.o
44
45include ../../Makefile.lib
46include ../../Makefile.rootfs
47
48LIBS =		$(DYNLIB) $(LINTLIB)
49
50$(NOT_NATIVE)NATIVE_BUILD = $(POUND_SIGN)
51$(NATIVE_BUILD)VERS =
52$(NATIVE_BUILD)LIBS = $(DYNLIB)
53
54SRCS =	\
55	../../../common/avl/avl.c \
56	../common/uu_alloc.c \
57	../common/uu_avl.c \
58	../common/uu_dprintf.c \
59	../common/uu_ident.c \
60	../common/uu_list.c \
61	../common/uu_misc.c \
62	../common/uu_open.c \
63	../common/uu_pname.c \
64	../common/uu_strtoint.c
65
66LINTS =		$(OBJECTS:%.o=%.ln)
67
68$(LINTLIB):=	SRCS = $(SRCDIR)/$(LINTSRC)
69LDLIBS +=	-lc
70
71SRCDIR =	../common
72AVLDIR =	../../../common/avl
73MAPDIR =	../spec/$(TRANSMACH)
74SPECMAPFILE =	$(MAPDIR)/mapfile
75
76CFLAGS +=	-v
77CPPFLAGS +=	-I$(SRCDIR) -I../../common/inc
78LINTFLAGS +=	-erroff=E_GLOBAL_COULD_BE_STATIC2
79LINTFLAGS64 +=	-erroff=E_GLOBAL_COULD_BE_STATIC2
80
81MY_NATIVE_CPPFLAGS = -DNATIVE_BUILD -I$(SRCDIR)
82MY_NATIVE_LDLIBS = -lc
83
84$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
85
86.KEEP_STATE:
87
88all: $(LIBS)
89
90lint: $(LINTLIB) globallint
91
92globallint: $(LINTS)
93	$(LINT.c) $(LINTS) $(LDLIBS)
94
95%.ln: $(SRCDIR)/%.c
96	$(LINT.c) -c $<
97
98%.ln: $(AVLDIR)/%.c
99	$(LINT.c) -c $<
100
101pics/%.o:	$(AVLDIR)/%.c
102	$(COMPILE.c) -o $@ $<
103	$(POST_PROCESS_O)
104
105include ../../Makefile.targ
106