Home | History | Annotate | Download | only in lib
      1 #
      2 #
      3 # CDDL HEADER START
      4 #
      5 # The contents of this file are subject to the terms of the
      6 # Common Development and Distribution License (the "License").
      7 # You may not use this file except in compliance 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 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
     23 # Use is subject to license terms.
     24 # 
     25 #ident	"@(#)Makefile.targ	1.5	09/05/07 SMI"
     26 #
     27 # lib/Makefile.targ
     28 #
     29 # included to define local library targets
     30 #
     31 
     32 # conditional assignment of default permissions for the installed
     33 # DYNLIB/DYNLIBCCC.  Set here and in Makefile.mach, instead of Makefile.lib,
     34 # because ROOTLIBDIR may be changed in the including makefile after it has
     35 # included Makefile.lib.
     36 #
     37 $(ROOTLIBDIR)/$(DYNLIB) :=	FILEMODE= 755
     38 $(ROOTSFWLIBDIR)/$(DYNLIB) :=	FILEMODE= 755
     39 $(ROOTLIBDIR)/$(DYNLIBCCC) :=	FILEMODE= 755
     40 
     41 $(ROOTLIBDIR64)/$(DYNLIB) :=	FILEMODE= 755
     42 $(ROOTLIBDIR64)/$(DYNLIBCCC) :=	FILEMODE= 755
     43 
     44 # install rules
     45 $(ROOTLIBDIR)/%: %
     46 	$(INS.file)
     47 $(ROOTSFWLIBDIR)/%: %
     48 	$(INS.file)
     49 $(ROOTLIBDIR64)/%: %
     50 	$(INS.file)	
     51 
     52 $(ROOTLIBDIR)/$(LIBLINKS): $(ROOTLIBDIR)/$(LIBLINKS)$(VERS)
     53 	$(INS.liblink)
     54 $(ROOTSFWLIBDIR)/$(LIBLINKS): $(ROOTSFWLIBDIR)/$(LIBLINKS)$(VERS)
     55 	$(INS.liblinksfw)
     56 $(ROOTLIBDIR64)/$(LIBLINKS): $(ROOTLIBDIR64)/$(LIBLINKS)$(VERS)
     57 	$(INS.liblink64)
     58 
     59 $(ROOTLIBDIR)/$(LIBLINKSCCC): $(ROOTLIBDIR)/$(LIBLINKSCCC)$(VERS)
     60 	$(INS.liblinkccc)
     61 $(ROOTLIBDIR64)/$(LIBLINKSCCC): $(ROOTLIBDIR64)/$(LIBLINKSCCC)$(VERS)
     62 	$(INS.liblinkccc64)
     63 
     64 objs pics:
     65 	-@mkdir -p $@
     66 
     67 $(LIBRARY): objs .WAIT $$(OBJS)
     68 	$(BUILD.AR)
     69 	$(POST_PROCESS_A)
     70 
     71 $(DYNLIB): pics .WAIT $$(PICS)
     72 	$(BUILD.SO)
     73 	$(POST_PROCESS_SO)
     74 
     75 $(DYNLIBCCC): pics .WAIT $$(PICS)
     76 	$(BUILDCCC.SO)
     77 	$(POST_PROCESS_SO)
     78 
     79 $(LINTLIB): $$(SRCS)
     80 	$(LINT.c) -o $(LIBNAME) $(SRCS) > $(LINTOUT) 2>&1
     81 
     82 clobber: clean
     83 	-$(RM) $(CLOBBERFILES)
     84 
     85 include $(SRC)/Makefile.targ
     86