xref: /illumos-gate/usr/src/cmd/sgs/yacc/Makefile.targ (revision 9ccfd38e64be4d6a2c01daa15fe7f5627122bdc2)
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 (the "License").
6# You may not use this file except in compliance with the License.
7#
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.
12#
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]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2015 Gary Mills
23# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
27#
28
29$(PROG): objs .WAIT $(POBJS)
30	$(LINK.c) $(POBJS) -o $@ $(LDLIBS)
31	$(POST_PROCESS)
32
33# conditional assignment of default permissions for the installed
34# DYNLIB/DYNLIBCCC.  Set here and in Makefile.mach, instead of Makefile.lib,
35# because ROOTLIBDIR may be changed in the including makefile after it has
36# included Makefile.lib.
37#
38$(ROOTLIBDIR)/$(DYNLIB) :=	FILEMODE= 755
39$(ROOTLIBDIR)/$(DYNLIBCCC) :=	FILEMODE= 755
40
41$(ROOTLIBDIR64)/$(DYNLIB) :=	FILEMODE= 755
42$(ROOTLIBDIR64)/$(DYNLIBCCC) :=	FILEMODE= 755
43
44# library install rules
45$(ROOTLIBDIR)/%: %
46	$(INS.file)
47$(ROOTLIBDIR64)/%: %
48	$(INS.file)
49
50$(ROOTLIBDIR)/$(LIBLINKS): $(ROOTLIBDIR)/$(LIBLINKS)$(VERS)
51	$(INS.liblink)
52$(ROOTLIBDIR64)/$(LIBLINKS): $(ROOTLIBDIR64)/$(LIBLINKS)$(VERS)
53	$(INS.liblink64)
54
55$(ROOTLIBDIR)/$(LIBLINKSCCC): $(ROOTLIBDIR)/$(LIBLINKSCCC)$(VERS)
56	$(INS.liblinkccc)
57$(ROOTLIBDIR64)/$(LIBLINKSCCC): $(ROOTLIBDIR64)/$(LIBLINKSCCC)$(VERS)
58	$(INS.liblinkccc64)
59
60objs pics:
61	-@mkdir -p $@
62
63$(DYNLIB): pics .WAIT $$(PICS)
64	$(BUILD.SO)
65	$(POST_PROCESS_SO)
66
67$(DYNLIBCCC): pics .WAIT $$(PICS)
68	$(BUILDCCC.SO)
69	$(POST_PROCESS_SO)
70
71objs/%.o pics/%.o:	../common/%.c
72	$(COMPILE.c) -o $@ $<
73	$(POST_PROCESS_O)
74
75$(DYNLINKLIBDIR)/%: %$(VERS)
76	$(INS.liblink)
77
78$(ROOTCOMPATLINKS) $(ROOTCOMPATLINKS64):
79	$(RM) $@; $(SYMLINK) $(COMPATLINKTARGET) $@
80
81clean:
82		$(RM) $(POBJS) $(OBJS) $(PICS) $(CLEANFILES)
83