xref: /titanic_41/usr/src/cmd/sgs/yacc/Makefile.targ (revision 1ae0874509b6811fdde1dfd46f0d93fd09867a3f)
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 1993-2003 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.targ
29#
30
31$(PROG): objs .WAIT $(POBJS)
32	$(LINK.c) $(POBJS) -o $@ $(LDLIBS)
33	$(POST_PROCESS)
34
35$(ROOTCCSBIN)/%: ../common/%
36	$(INS.file)
37
38# conditional assignment of default permissions for the installed
39# DYNLIB/DYNLIBCCC.  Set here and in Makefile.mach, instead of Makefile.lib,
40# because ROOTLIBDIR may be changed in the including makefile after it has
41# included Makefile.lib.
42#
43$(ROOTLIBDIR)/$(DYNLIB) :=	FILEMODE= 755
44$(ROOTLIBDIR)/$(DYNLIBCCC) :=	FILEMODE= 755
45
46$(ROOTLIBDIR64)/$(DYNLIB) :=	FILEMODE= 755
47$(ROOTLIBDIR64)/$(DYNLIBCCC) :=	FILEMODE= 755
48
49# library install rules
50$(ROOTLIBDIR)/%: %
51	$(INS.file)
52$(ROOTLIBDIR64)/%: %
53	$(INS.file)
54
55$(ROOTLIBDIR)/$(LIBLINKS): $(ROOTLIBDIR)/$(LIBLINKS)$(VERS)
56	$(INS.liblink)
57$(ROOTLIBDIR64)/$(LIBLINKS): $(ROOTLIBDIR64)/$(LIBLINKS)$(VERS)
58	$(INS.liblink64)
59
60$(ROOTLIBDIR)/$(LIBLINKSCCC): $(ROOTLIBDIR)/$(LIBLINKSCCC)$(VERS)
61	$(INS.liblinkccc)
62$(ROOTLIBDIR64)/$(LIBLINKSCCC): $(ROOTLIBDIR64)/$(LIBLINKSCCC)$(VERS)
63	$(INS.liblinkccc64)
64
65objs pics:
66	-@mkdir -p $@
67
68$(LIBRARY): objs .WAIT $$(OBJS)
69	$(BUILD.AR)
70	$(POST_PROCESS_A)
71
72$(DYNLIB): $(MAPFILE) pics .WAIT $$(PICS)
73	$(BUILD.SO)
74	$(POST_PROCESS_SO)
75
76$(DYNLIBCCC): pics .WAIT $$(PICS)
77	$(BUILDCCC.SO)
78	$(POST_PROCESS_SO)
79
80objs/%.o pics/%.o:	../common/%.c
81	$(COMPILE.c) -o $@ $<
82	$(POST_PROCESS_O)
83
84objs/%.o pics/%.o:	../../whatdir/common/%.c
85	$(COMPILE.c) -o $@ $<
86
87# install rule for lint library target
88$(ROOTLINTDIR)/%: ../common/%
89	$(INS.file)
90
91$(DYNLINKLIBDIR)/%: %$(VERS)
92	$(INS.liblink)
93
94clean:
95		$(RM) $(POBJS) $(OBJS) $(PICS) $(CLEANFILES)
96
97lint:		$(LINTPOUT) $(LINTLIB)
98
99$(LINTPOUT):	$(SRCS)
100		$(LINT.c) $(SRCS) > $(LINTPOUT) 2>&1
101
102$(LINTLIB):	$(LINTSRCS)
103		$(LINT.c) -o $(LIBNAME) $(LINTSRCS) > $(LINTOUT) 2>&1
104