Merge commit '1f1540205fa6366266184180654434272c425ac2'
[unleashed.git] / usr / src / lib / libpp / Makefile.com
blob8af2f1910bf610fb416b00523185fee38a9ae9e0
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
22 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23 # Use is subject to license terms.
26 SHELL=/usr/bin/ksh93
28 LIBRARY=        libpp.a
29 VERS=           .1
31 OBJECTS= \
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
57 include ../../Makefile.astmsg
59 include ../../Makefile.lib
61 # mapfile-vers does not live with the sources in in common/ to make
62 # automated code updates easier.
63 MAPFILES=       ../mapfile-vers
65 # Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
66 include ../../../Makefile.ast
68 LIBS =          $(DYNLIB)
70 LDLIBS += \
71         -last \
72         -lc
74 SRCDIR =        ../common
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.
81 CPPFLAGS = \
82         $(DTEXTDOM) \
83         -I. \
84         -I$(ROOT)/usr/include/ast \
85         -I$(ROOT)/usr/include \
86         -D_PACKAGE_ast \
87         '-DUSAGE_LICENSE=\
88                 "[-author?Glenn Fowler <gsf@research.att.com>]"\
89                 "[-copyright?Copyright (c) 1986-2009 AT&T Intellectual Property]"\
90                 "[-license?http://www.opensource.org/licenses/cpl1.0.txt]"\
91                 "[--catalog?libpp]"'
94 CFLAGS += \
95         $(ASTCFLAGS)
96 CFLAGS64 += \
97         $(ASTCFLAGS64)
99 CERRWARN        += -Wno-parentheses
100 CERRWARN        += -Wno-uninitialized
101 CERRWARN        += -Wno-char-subscripts
102 CERRWARN        += -Wno-empty-body
103 CERRWARN        += -Wno-unused-value
105 pics/ppsearch.o         := CERRWARN += -Wno-sequence-point
106 pics/pplex.o            := CERRWARN += -Wno-implicit-fallthrough
107 pics/ppcpp.o            := CERRWARN += -Wno-implicit-fallthrough
108 pics/ppproto.o          := CERRWARN += -Wno-implicit-fallthrough
110 .KEEP_STATE:
112 all: $(LIBS)
114 include ../../Makefile.targ