xref: /titanic_41/usr/src/cmd/sgs/yacc/Makefile.com (revision 8eea8e29cc4374d1ee24c25a07f45af132db3499)
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 2004 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
70$(LINTLIB):=	LINTFLAGS = -nvx
71$(ROOTCCSBINPROG):= FILEMODE = 0555
72
73ROOTYACCPAR=	$(YACCPAR:%=$(ROOTCCSBIN)/%)
74ROOTLINTDIR=	$(ROOTLIBDIR)
75ROOTLINT=	$(LINTSRCS:../common/%=$(ROOTLINTDIR)/%)
76
77DYNLINKLIBDIR=	$(ROOTLIBDIR)
78DYNLINKLIB=	$(LIBLINKS:%=$(DYNLINKLIBDIR)/%)
79
80# Need to make sure lib-make's are warning free
81$(DYNLIB) :=	CFLAGS += $(CCVERBOSE)
82$(DYNLIB) :=	CFLAGS64 += $(CCVERBOSE)
83$(DYNLIB) :=	LDLIBS += -lc
84
85DYNFLAGS += -M$(MAPFILE)
86
87CLEANFILES +=	$(LINTPOUT) $(LINTOUT)
88CLOBBERFILES +=	$(LIBS) $(LIBRARY)
89