xref: /titanic_41/usr/src/lib/libpp/Makefile.com (revision 71269a2275bf5a143dad6461eee2710a344e7261)
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 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28SHELL=/usr/bin/ksh
29
30LIBRARY=	libpp.a
31VERS=		.1
32
33OBJECTS= \
34	ppargs.o \
35	ppbuiltin.o \
36	ppcall.o \
37	ppcomment.o \
38	ppcontext.o \
39	ppcontrol.o \
40	ppcpp.o \
41	ppdata.o \
42	pperror.o \
43	ppexpr.o \
44	ppfsm.o \
45	ppincref.o \
46	ppinput.o \
47	ppkey.o \
48	pplex.o \
49	ppline.o \
50	ppmacref.o \
51	ppmisc.o \
52	ppop.o \
53	pppragma.o \
54	ppprintf.o \
55	ppproto.o \
56	ppsearch.o \
57	pptrace.o
58
59include ../../Makefile.astmsg
60
61include ../../Makefile.lib
62
63# mapfile-vers does not live with the sources in in common/ to make
64# automated code updates easier.
65MAPFILES=       ../mapfile-vers
66
67# Set common AST build flags (e.g., needed to support the math stuff).
68include ../../../Makefile.ast
69
70LIBS =		$(DYNLIB) $(LINTLIB)
71LDLIBS +=	-last -lc
72$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
73
74SRCDIR =	../common
75
76# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
77# case - it MUST come as the last element but future changes in -D options
78# may then cause silent breakage in the AST sources because the last -D
79# option specified overrides previous -D options so we prefer the current
80# way to explicitly list each single flag.
81CPPFLAGS = \
82	$(DTEXTDOM) $(DTS_ERRNO) \
83	-I. \
84	-I$(ROOT)/usr/include/ast \
85	-D_PACKAGE_ast \
86	'-DUSAGE_LICENSE=\
87		"[-author?Glenn Fowler <gsf@research.att.com>]"\
88		"[-copyright?Copyright (c) 1986-2007 AT&T Knowledge Ventures]"\
89		"[-license?http://www.opensource.org/licenses/cpl1.0.txt]"\
90		"[--catalog?libpp]"'
91
92CFLAGS += \
93	$(CCVERBOSE) \
94	-xstrconst
95CFLAGS64 += \
96	$(CCVERBOSE) \
97	-xstrconst
98
99pics/ppcall.o 		:= CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
100pics/ppcontrol.o 	:= CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
101pics/ppcpp.o		:= CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
102pics/pplex.o		:= CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
103pics/ppexpr.o		:= CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
104pics/ppop.o 		:= CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
105pics/ppsearch.o 	:= CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
106pics/ppsearch.o 	:= CERRWARN += -_gcc=-Wno-sequence-point
107
108.KEEP_STATE:
109
110all: $(LIBS)
111
112#
113# libpp is not lint-clean yet; fake up a target.  (You can use
114# "make lintcheck" to actually run lint; please send all lint fixes
115# upstream (to AT&T) so the next update will pull them into ON.)
116#
117lint:
118	@ print "usr/src/lib/libpp is not lint-clean: skipping"
119	@ $(TRUE)
120
121include ../../Makefile.targ
122