xref: /titanic_51/usr/src/lib/libpp/Makefile.com (revision 34f9b3eef6fdadbda0a846aa4d68691ac40eace5)
1da2e3ebdSchin#
2da2e3ebdSchin# CDDL HEADER START
3da2e3ebdSchin#
4da2e3ebdSchin# The contents of this file are subject to the terms of the
5da2e3ebdSchin# Common Development and Distribution License (the "License").
6da2e3ebdSchin# You may not use this file except in compliance with the License.
7da2e3ebdSchin#
8da2e3ebdSchin# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9da2e3ebdSchin# or http://www.opensolaris.org/os/licensing.
10da2e3ebdSchin# See the License for the specific language governing permissions
11da2e3ebdSchin# and limitations under the License.
12da2e3ebdSchin#
13da2e3ebdSchin# When distributing Covered Code, include this CDDL HEADER in each
14da2e3ebdSchin# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15da2e3ebdSchin# If applicable, add the following below this CDDL HEADER, with the
16da2e3ebdSchin# fields enclosed by brackets "[]" replaced with your own identifying
17da2e3ebdSchin# information: Portions Copyright [yyyy] [name of copyright owner]
18da2e3ebdSchin#
19da2e3ebdSchin# CDDL HEADER END
20da2e3ebdSchin#
21da2e3ebdSchin#
22*34f9b3eeSRoland Mainz# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23da2e3ebdSchin# Use is subject to license terms.
24da2e3ebdSchin#
25da2e3ebdSchin
267c2fbfb3SApril ChinSHELL=/usr/bin/ksh93
27da2e3ebdSchin
28da2e3ebdSchinLIBRARY=	libpp.a
29da2e3ebdSchinVERS=		.1
30da2e3ebdSchin
31da2e3ebdSchinOBJECTS= \
32da2e3ebdSchin	ppargs.o \
33da2e3ebdSchin	ppbuiltin.o \
34da2e3ebdSchin	ppcall.o \
35da2e3ebdSchin	ppcomment.o \
36da2e3ebdSchin	ppcontext.o \
37da2e3ebdSchin	ppcontrol.o \
38da2e3ebdSchin	ppcpp.o \
39da2e3ebdSchin	ppdata.o \
40da2e3ebdSchin	pperror.o \
41da2e3ebdSchin	ppexpr.o \
42da2e3ebdSchin	ppfsm.o \
43da2e3ebdSchin	ppincref.o \
44da2e3ebdSchin	ppinput.o \
45da2e3ebdSchin	ppkey.o \
46da2e3ebdSchin	pplex.o \
47da2e3ebdSchin	ppline.o \
48da2e3ebdSchin	ppmacref.o \
49da2e3ebdSchin	ppmisc.o \
50da2e3ebdSchin	ppop.o \
51da2e3ebdSchin	pppragma.o \
52da2e3ebdSchin	ppprintf.o \
53da2e3ebdSchin	ppproto.o \
54da2e3ebdSchin	ppsearch.o \
55da2e3ebdSchin	pptrace.o
56da2e3ebdSchin
57da2e3ebdSchininclude ../../Makefile.astmsg
58da2e3ebdSchin
59da2e3ebdSchininclude ../../Makefile.lib
60da2e3ebdSchin
61da2e3ebdSchin# mapfile-vers does not live with the sources in in common/ to make
62da2e3ebdSchin# automated code updates easier.
63da2e3ebdSchinMAPFILES=       ../mapfile-vers
64da2e3ebdSchin
657c2fbfb3SApril Chin# Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
66da2e3ebdSchininclude ../../../Makefile.ast
67da2e3ebdSchin
68da2e3ebdSchinLIBS =		$(DYNLIB) $(LINTLIB)
697c2fbfb3SApril Chin
707c2fbfb3SApril ChinLDLIBS += \
717c2fbfb3SApril Chin	-last \
727c2fbfb3SApril Chin	-lc
737c2fbfb3SApril Chin
74da2e3ebdSchin$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
75da2e3ebdSchin
76da2e3ebdSchinSRCDIR =	../common
77da2e3ebdSchin
78da2e3ebdSchin# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
79da2e3ebdSchin# case - it MUST come as the last element but future changes in -D options
80da2e3ebdSchin# may then cause silent breakage in the AST sources because the last -D
81da2e3ebdSchin# option specified overrides previous -D options so we prefer the current
82da2e3ebdSchin# way to explicitly list each single flag.
83da2e3ebdSchinCPPFLAGS = \
84da2e3ebdSchin	$(DTEXTDOM) $(DTS_ERRNO) \
85da2e3ebdSchin	-I. \
86da2e3ebdSchin	-I$(ROOT)/usr/include/ast \
87*34f9b3eeSRoland Mainz	-I$(ROOT)/usr/include \
88da2e3ebdSchin	-D_PACKAGE_ast \
89da2e3ebdSchin	'-DUSAGE_LICENSE=\
90da2e3ebdSchin		"[-author?Glenn Fowler <gsf@research.att.com>]"\
91*34f9b3eeSRoland Mainz		"[-copyright?Copyright (c) 1986-2009 AT&T Intellectual Property]"\
92da2e3ebdSchin		"[-license?http://www.opensource.org/licenses/cpl1.0.txt]"\
93da2e3ebdSchin		"[--catalog?libpp]"'
94da2e3ebdSchin
957c2fbfb3SApril Chin
96da2e3ebdSchinCFLAGS += \
977c2fbfb3SApril Chin	$(ASTCFLAGS)
98da2e3ebdSchinCFLAGS64 += \
997c2fbfb3SApril Chin	$(ASTCFLAGS64)
100da2e3ebdSchin
101da2e3ebdSchinpics/ppcall.o 		:= CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
102da2e3ebdSchinpics/ppcontrol.o 	:= CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
103da2e3ebdSchinpics/ppcpp.o		:= CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
104da2e3ebdSchinpics/ppexpr.o		:= CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
105*34f9b3eeSRoland Mainzpics/pplex.o		:= CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
106da2e3ebdSchinpics/ppop.o 		:= CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
107da2e3ebdSchinpics/ppsearch.o 	:= CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
108da2e3ebdSchinpics/ppsearch.o 	:= CERRWARN += -_gcc=-Wno-sequence-point
109da2e3ebdSchin
110da2e3ebdSchin.KEEP_STATE:
111da2e3ebdSchin
112da2e3ebdSchinall: $(LIBS)
113da2e3ebdSchin
114da2e3ebdSchin#
115da2e3ebdSchin# libpp is not lint-clean yet; fake up a target.  (You can use
116da2e3ebdSchin# "make lintcheck" to actually run lint; please send all lint fixes
117da2e3ebdSchin# upstream (to AT&T) so the next update will pull them into ON.)
118da2e3ebdSchin#
119da2e3ebdSchinlint:
120da2e3ebdSchin	@ print "usr/src/lib/libpp is not lint-clean: skipping"
121da2e3ebdSchin
122da2e3ebdSchininclude ../../Makefile.targ
123