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