xref: /onnv-gate/usr/src/lib/Makefile.targ (revision 12719:bd9fb35d09c2)
10Sstevel@tonic-gate#
20Sstevel@tonic-gate# CDDL HEADER START
30Sstevel@tonic-gate#
40Sstevel@tonic-gate# The contents of this file are subject to the terms of the
51717Swesolows# Common Development and Distribution License (the "License").
61717Swesolows# You may not use this file except in compliance with the License.
70Sstevel@tonic-gate#
80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate# See the License for the specific language governing permissions
110Sstevel@tonic-gate# and limitations under the License.
120Sstevel@tonic-gate#
130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate#
190Sstevel@tonic-gate# CDDL HEADER END
200Sstevel@tonic-gate#
210Sstevel@tonic-gate#
22*12719SRod.Evans@Sun.COM# Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
230Sstevel@tonic-gate#
242522Sraf
252522Sraf#
260Sstevel@tonic-gate# included to define local library targets
270Sstevel@tonic-gate#
280Sstevel@tonic-gate
290Sstevel@tonic-gate# conditional assignment of default permissions for the installed
300Sstevel@tonic-gate# DYNLIB/DYNLIBCCC.  Set here and in Makefile.mach, instead of Makefile.lib,
310Sstevel@tonic-gate# because ROOTLIBDIR may be changed in the including makefile after it has
320Sstevel@tonic-gate# included Makefile.lib.
330Sstevel@tonic-gate#
340Sstevel@tonic-gate$(ROOTLIBDIR)/$(DYNLIB) :=	FILEMODE= 755
350Sstevel@tonic-gate$(ROOTLIBDIR)/$(DYNLIBCCC) :=	FILEMODE= 755
360Sstevel@tonic-gate
370Sstevel@tonic-gate$(ROOTFS_LIBDIR)/$(DYNLIB) :=	FILEMODE= 755
380Sstevel@tonic-gate$(ROOTFS_LIBDIR)/$(DYNLIBCCC) :=	FILEMODE= 755
390Sstevel@tonic-gate
400Sstevel@tonic-gate$(ROOTLIBDIR64)/$(DYNLIB) :=	FILEMODE= 755
410Sstevel@tonic-gate$(ROOTLIBDIR64)/$(DYNLIBCCC) :=	FILEMODE= 755
420Sstevel@tonic-gate
430Sstevel@tonic-gate# install rules
440Sstevel@tonic-gate$(ROOTHDRDIR)/%: $(HDRDIR)/%
450Sstevel@tonic-gate	$(INS.file)
460Sstevel@tonic-gate
470Sstevel@tonic-gate$(ROOTLIBDIR)/%: %
480Sstevel@tonic-gate	$(INS.file)
490Sstevel@tonic-gate$(ROOTLIBDIR64)/%: %
500Sstevel@tonic-gate	$(INS.file)
510Sstevel@tonic-gate$(ROOTFS_LIBDIR)/%: %
520Sstevel@tonic-gate	$(INS.file)
530Sstevel@tonic-gate$(ROOTFS_LIBDIR64)/%: %
540Sstevel@tonic-gate	$(INS.file)
550Sstevel@tonic-gate
560Sstevel@tonic-gate$(ROOTLIBDIR)/$(LIBLINKS): $(ROOTLIBDIR)/$(LIBLINKS)$(VERS)
570Sstevel@tonic-gate	$(INS.liblink)
580Sstevel@tonic-gate$(ROOTLIBDIR64)/$(LIBLINKS): $(ROOTLIBDIR64)/$(LIBLINKS)$(VERS)
590Sstevel@tonic-gate	$(INS.liblink64)
600Sstevel@tonic-gate
610Sstevel@tonic-gate$(ROOTLIBDIR)/$(LIBLINKSCCC): $(ROOTLIBDIR)/$(LIBLINKSCCC)$(VERS)
620Sstevel@tonic-gate	$(INS.liblinkccc)
630Sstevel@tonic-gate$(ROOTLIBDIR64)/$(LIBLINKSCCC): $(ROOTLIBDIR64)/$(LIBLINKSCCC)$(VERS)
640Sstevel@tonic-gate	$(INS.liblinkccc64)
650Sstevel@tonic-gate
660Sstevel@tonic-gate$(ROOTLINTDIR)/%: $(SRCDIR)/%
670Sstevel@tonic-gate	$(INS.file)
680Sstevel@tonic-gate$(ROOTFS_LINTDIR)/%: $(SRCDIR)/%
690Sstevel@tonic-gate	$(INS.file)
700Sstevel@tonic-gate
714887Schin$(ROOTDEMODIRS):
724887Schin	$(INS.dir)
734887Schin$(ROOTDEMODIRBASE)/%: $(DEMOFILESRCDIR)/%
744887Schin	$(INS.file)
754887Schin
760Sstevel@tonic-gateobjs/%.o pics/%.o: $(SRCDIR)/%.c
770Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
780Sstevel@tonic-gate	$(POST_PROCESS_O)
790Sstevel@tonic-gate
800Sstevel@tonic-gateobjs/%.o pics/%.o: $(SRCDIR)/%.cc
810Sstevel@tonic-gate	$(COMPILE.cc) -o $@ $<
820Sstevel@tonic-gate	$(POST_PROCESS_O)
830Sstevel@tonic-gate
840Sstevel@tonic-gateobjs pics:
850Sstevel@tonic-gate	-@mkdir -p $@
860Sstevel@tonic-gate
870Sstevel@tonic-gate$(LIBRARY): objs .WAIT $$(OBJS)
880Sstevel@tonic-gate	$(BUILD.AR)
890Sstevel@tonic-gate	$(POST_PROCESS_A)
900Sstevel@tonic-gate
912522Sraf$(DYNLIB): $$(MAPFILES)
920Sstevel@tonic-gate
93*12719SRod.Evans@Sun.COM$(DYNLIB): pics .WAIT $$(PICS) $$(ALTPICS) $$(EXTPICS)
940Sstevel@tonic-gate	$(BUILD.SO)
950Sstevel@tonic-gate	$(POST_PROCESS_SO)
960Sstevel@tonic-gate
97*12719SRod.Evans@Sun.COM$(DYNLIBCCC): pics .WAIT $$(PICS) $$(ALTPICS) $$(EXTPICS)
980Sstevel@tonic-gate	$(BUILDCCC.SO)
990Sstevel@tonic-gate	$(POST_PROCESS_SO)
1000Sstevel@tonic-gate
1010Sstevel@tonic-gate$(LINTLIB): $$(SRCS)
1020Sstevel@tonic-gate	$(LINT.c) -o $(LIBNAME) $(SRCS) > $(LINTOUT) 2>&1
1030Sstevel@tonic-gate
1040Sstevel@tonic-gatelintcheck: $$(SRCS)
1050Sstevel@tonic-gate	$(LINT.c) $(LINTCHECKFLAGS) $(SRCS) $(LDLIBS)
1060Sstevel@tonic-gate
1070Sstevel@tonic-gateclobber: clean
1080Sstevel@tonic-gate	-$(RM) $(CLOBBERTARGFILES)
1090Sstevel@tonic-gate
1100Sstevel@tonic-gateclean:
1110Sstevel@tonic-gate	-$(RM) $(OBJS)
1120Sstevel@tonic-gate	-$(RM) $(PICS) $(DUPLICATE_SRC) $(LINTOUT) $(LINTLIB) $(CLEANFILES)
113