xref: /titanic_52/usr/src/cmd/ast/libpp/Makefile.com (revision 906afcb89d0412cc073b95c2d701a804a8cdb62c)
1*906afcb8SAndy Fiddaman#
2*906afcb8SAndy Fiddaman# CDDL HEADER START
3*906afcb8SAndy Fiddaman#
4*906afcb8SAndy Fiddaman# The contents of this file are subject to the terms of the
5*906afcb8SAndy Fiddaman# Common Development and Distribution License (the "License").
6*906afcb8SAndy Fiddaman# You may not use this file except in compliance with the License.
7*906afcb8SAndy Fiddaman#
8*906afcb8SAndy Fiddaman# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*906afcb8SAndy Fiddaman# or http://www.opensolaris.org/os/licensing.
10*906afcb8SAndy Fiddaman# See the License for the specific language governing permissions
11*906afcb8SAndy Fiddaman# and limitations under the License.
12*906afcb8SAndy Fiddaman#
13*906afcb8SAndy Fiddaman# When distributing Covered Code, include this CDDL HEADER in each
14*906afcb8SAndy Fiddaman# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*906afcb8SAndy Fiddaman# If applicable, add the following below this CDDL HEADER, with the
16*906afcb8SAndy Fiddaman# fields enclosed by brackets "[]" replaced with your own identifying
17*906afcb8SAndy Fiddaman# information: Portions Copyright [yyyy] [name of copyright owner]
18*906afcb8SAndy Fiddaman#
19*906afcb8SAndy Fiddaman# CDDL HEADER END
20*906afcb8SAndy Fiddaman#
21*906afcb8SAndy Fiddaman#
22*906afcb8SAndy Fiddaman# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23*906afcb8SAndy Fiddaman# Use is subject to license terms.
24*906afcb8SAndy Fiddaman#
25*906afcb8SAndy Fiddaman# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
26*906afcb8SAndy Fiddaman
27*906afcb8SAndy FiddamanSHELL= /usr/bin/ksh93
28*906afcb8SAndy Fiddaman
29*906afcb8SAndy FiddamanLIBRARY= libpp.a
30*906afcb8SAndy FiddamanVERS= .1
31*906afcb8SAndy Fiddaman
32*906afcb8SAndy Fiddamaninclude ../Makefile.defs
33*906afcb8SAndy Fiddaman
34*906afcb8SAndy FiddamanOBJECTS += $(LIBOBJS)
35*906afcb8SAndy Fiddaman
36*906afcb8SAndy Fiddamaninclude $(SRC)/lib/Makefile.lib
37*906afcb8SAndy Fiddamaninclude ../../Makefile.ast
38*906afcb8SAndy Fiddaman
39*906afcb8SAndy FiddamanMAPFILES=       ../mapfile-vers
40*906afcb8SAndy Fiddaman
41*906afcb8SAndy FiddamanLIBS=		$(DYNLIB)
42*906afcb8SAndy Fiddaman
43*906afcb8SAndy FiddamanLDLIBS += -last -lc
44*906afcb8SAndy Fiddaman
45*906afcb8SAndy Fiddaman# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
46*906afcb8SAndy Fiddaman# case - it MUST come as the last element but future changes in -D options
47*906afcb8SAndy Fiddaman# may then cause silent breakage in the AST sources because the last -D
48*906afcb8SAndy Fiddaman# option specified overrides previous -D options so we prefer the current
49*906afcb8SAndy Fiddaman# way to explicitly list each single flag.
50*906afcb8SAndy FiddamanCPPFLAGS= \
51*906afcb8SAndy Fiddaman	$(DTEXTDOM) $(DTS_ERRNO) \
52*906afcb8SAndy Fiddaman	-I. \
53*906afcb8SAndy Fiddaman	-I$(ROOT)/usr/include/ast \
54*906afcb8SAndy Fiddaman	-I$(ROOT)/usr/include \
55*906afcb8SAndy Fiddaman	-D_PACKAGE_ast \
56*906afcb8SAndy Fiddaman	'-DUSAGE_LICENSE=\
57*906afcb8SAndy Fiddaman	    "[-author?Glenn Fowler <gsf@research.att.com>]"\
58*906afcb8SAndy Fiddaman	    "[-copyright?Copyright (c) 1986-2012 AT&T Intellectual Property]"\
59*906afcb8SAndy Fiddaman	    "[-license?http://www.eclipse.org/org/documents/epl-v10.html]"\
60*906afcb8SAndy Fiddaman	    "[--catalog?libpp]"'
61*906afcb8SAndy Fiddaman
62*906afcb8SAndy FiddamanCFLAGS += $(ASTCFLAGS)
63*906afcb8SAndy FiddamanCFLAGS64 += $(ASTCFLAGS64)
64*906afcb8SAndy Fiddaman
65*906afcb8SAndy FiddamanCERRWARN	+= -_gcc=-Wno-parentheses
66*906afcb8SAndy FiddamanCERRWARN	+= -_gcc=-Wno-uninitialized
67*906afcb8SAndy FiddamanCERRWARN	+= -_gcc=-Wno-char-subscripts
68*906afcb8SAndy FiddamanCERRWARN	+= -_gcc=-Wno-empty-body
69*906afcb8SAndy FiddamanCERRWARN	+= -_gcc=-Wno-unused-value
70*906afcb8SAndy Fiddaman
71*906afcb8SAndy Fiddamanall: $(LIBS)
72*906afcb8SAndy Fiddaman
73*906afcb8SAndy Fiddaman#
74*906afcb8SAndy Fiddaman# libpp is not lint-clean yet; fake up a target.  (You can use
75*906afcb8SAndy Fiddaman# "make lintcheck" to actually run lint; please send all lint fixes
76*906afcb8SAndy Fiddaman# upstream (to AT&T) so the next update will pull them into ON.)
77*906afcb8SAndy Fiddaman#
78*906afcb8SAndy Fiddamanlint:
79*906afcb8SAndy Fiddaman	@ print "usr/src/lib/libpp is not lint-clean: skipping"
80*906afcb8SAndy Fiddaman
81*906afcb8SAndy Fiddamaninclude $(SRC)/lib/Makefile.targ
82*906afcb8SAndy Fiddaman
83*906afcb8SAndy Fiddamanppdef.h: $(ASTSRC)/pp.tab
84*906afcb8SAndy Fiddaman	$(AST_TOOLS)/gentab -d $(ASTSRC)/pp.tab > $@
85*906afcb8SAndy Fiddaman
86*906afcb8SAndy Fiddamanpptab.h: $(ASTSRC)/pp.tab
87*906afcb8SAndy Fiddaman	$(AST_TOOLS)/gentab -t $(ASTSRC)/pp.tab > $@
88*906afcb8SAndy Fiddaman
89*906afcb8SAndy Fiddamanpics/%.o: $(ASTSRC)/%.c ppdef.h pptab.h
90*906afcb8SAndy Fiddaman	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
91*906afcb8SAndy Fiddaman	$(POST_PROCESS_O)
92*906afcb8SAndy Fiddaman
93*906afcb8SAndy FiddamanCLOBBERFILES += pptab.h ppdef.h
94*906afcb8SAndy Fiddaman
95*906afcb8SAndy Fiddamaninclude ../../Makefile.astmsg
96