xref: /titanic_44/usr/src/lib/libsum/Makefile.com (revision 104d3bde5b4ac46904f144d3676110fc57a69603)
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#
23# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27SHELL=/usr/bin/ksh93
28
29LIBRARY=	libsum.a
30VERS=		.1
31
32OBJECTS= \
33	sumlib.o
34
35include ../../Makefile.astmsg
36
37include ../../Makefile.lib
38
39# mapfile-vers does not live with the sources in in common/ to make
40# automated code updates easier.
41MAPFILES=       ../mapfile-vers
42
43# Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
44include ../../../Makefile.ast
45
46LIBS =		$(DYNLIB) $(LINTLIB)
47
48LDLIBS += \
49		-last \
50		-lmd \
51		-lc
52
53$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
54
55SRCDIR =	../common
56
57# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
58# case - it MUST come as the last element but future changes in -D options
59# may then cause silent breakage in the AST sources because the last -D
60# option specified overrides previous -D options so we prefer the current
61# way to explicitly list each single flag.
62# Notes:
63#   - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
64CPPFLAGS = \
65	$(DTEXTDOM) $(DTS_ERRNO) \
66	-Isrc/lib/libsum \
67	-I$(ROOT)/usr/include/ast \
68	-D_PACKAGE_ast \
69	-D_BLD_DLL
70
71CFLAGS += \
72	$(ASTCFLAGS)
73CFLAGS64 += \
74	$(ASTCFLAGS64)
75
76# Suppress this one warning as the fix would break old gcc, which upstream
77# still supports. This needs a better fix (later).
78pics/sumlib.o	:= CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
79
80.KEEP_STATE:
81
82all: $(LIBS)
83
84#
85# libsum is not lint-clean yet; fake up a target.  (You can use
86# "make lintcheck" to actually run lint; please send all lint fixes
87# upstream (to AT&T) so the next update will pull them into ON.)
88#
89lint:
90	@ print "usr/src/lib/libsum is not lint-clean: skipping"
91
92include ../../Makefile.targ
93