xref: /titanic_50/usr/src/cmd/sgs/yacc/Makefile.com (revision 80ab886d233f514d54c2a6bdeb9fdfd951bd6881)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# cmd/sgs/yacc/Makefile.com
29#
30
31COMOBJS=	y1.o y2.o y3.o y4.o
32WHATOBJS=	whatdir.o
33POBJECTS=	$(COMOBJS) $(WHATOBJS)
34POBJS=		$(POBJECTS:%=objs/%)
35
36OBJECTS=	libmai.o libzer.o
37
38LIBRARY=	liby.a
39VERS=		.1
40YACCPAR=	yaccpar
41
42# 32-bit environment mapfile
43MAPFILE=	../common/mapfile-vers
44
45include ../../../../lib/Makefile.lib
46
47# Override default source file derivation rule (in Makefile.lib)
48# from objects
49#
50SRCS=		$(COMOBJS:%.o=../common/%.c) \
51		$(WHATOBJS:%.o=../../whatdir/common/%.c) \
52		$(OBJECTS:%.o=../common/%.c)
53
54LIBS =          $(DYNLIB) $(LINTLIB)
55
56# Tune ZDEFS to ignore undefined symbols for building the yacc shared library
57# since these symbols (mainly yyparse) are to be resolved elsewhere.
58#
59$(DYNLIB):= ZDEFS = $(ZNODEFS)
60$(DYNLIBCCC):= ZDEFS = $(ZNODEFS)
61LINTSRCS=	../common/llib-l$(LIBNAME)
62
63INCLIST=	-I../../include -I../../include/$(MACH)
64CPPFLAGS=	$(INCLIST) $(DEFLIST) $(CPPFLAGS.master)
65LDLIBS=		$(LDLIBS.cmd)
66BUILD.AR=	$(AR) $(ARFLAGS) $@ `$(LORDER) $(OBJS) | $(TSORT)`
67LINTFLAGS=	-ax
68LINTPOUT=	lintp.out
69
70C99MODE= $(C99_ENABLE)
71CFLAGS += $(CCVERBOSE)
72CFLAGS64 += $(CCVERBOSE)
73
74$(LINTLIB):=	LINTFLAGS = -nvx
75$(ROOTCCSBINPROG):= FILEMODE = 0555
76
77ROOTYACCPAR=	$(YACCPAR:%=$(ROOTCCSBIN)/%)
78ROOTLINTDIR=	$(ROOTLIBDIR)
79ROOTLINT=	$(LINTSRCS:../common/%=$(ROOTLINTDIR)/%)
80
81DYNLINKLIBDIR=	$(ROOTLIBDIR)
82DYNLINKLIB=	$(LIBLINKS:%=$(DYNLINKLIBDIR)/%)
83
84$(DYNLIB) :=	LDLIBS += -lc
85
86DYNFLAGS += -M$(MAPFILE)
87
88CLEANFILES +=	$(LINTPOUT) $(LINTOUT)
89CLOBBERFILES +=	$(LIBS) $(LIBRARY)
90