Home | History | Annotate | Download | only in tools
      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 2009 Sun Microsystems, Inc.  All rights reserved.
     23 # Use is subject to license terms.
     24 #
     25 # Definitions common to tool source.
     26 #
     27 include $(SRC)/Makefile.master
     28 
     29 FILEMODE=	0555
     30 
     31 CLOBBERFILES += $(PYOBJS)
     32 
     33 TOOLS=			$(SRC)/tools
     34 TOOLS_PROTO=		$(TOOLS)/proto
     35 ROOTOPT=		$(TOOLS_PROTO)/opt
     36 ROOTONBLD=		$(ROOTOPT)/onbld
     37 ROOTONBLDBIN=		$(ROOTONBLD)/bin
     38 ROOTONBLDBINMACH=	$(ROOTONBLD)/bin/$(MACH)
     39 ROOTONBLDETC=		$(ROOTONBLD)/etc
     40 ROOTONBLDLIB=		$(ROOTONBLD)/lib
     41 ROOTONBLDLIBMACH=	$(ROOTONBLD)/lib/$(MACH)
     42 ROOTONBLDLIBPERL=	$(ROOTONBLD)/lib/perl
     43 ROOTONBLDLIBPY=		$(ROOTONBLD)/lib/python
     44 ROOTONBLDENV=		$(ROOTONBLD)/env
     45 ROOTONBLDGK=		$(ROOTONBLD)/gk
     46 ROOTONBLDMAN=		$(ROOTONBLD)/man
     47 ROOTONBLDMAN1=		$(ROOTONBLD)/man/man1
     48 ROOTONBLDSMAN1=		$(ROOTONBLD)/man/sman1
     49 ROOTONBLDETCABI=	$(ROOTONBLD)/etc/abi
     50 ROOTONBLDETCEXCEPT=	$(ROOTONBLD)/etc/exception_lists
     51 
     52 CPPFLAGS=		-D_TS_ERRNO
     53 ELFSIGN_O=		$(TRUE)
     54 LDLIBS=
     55 LDFLAGS=		$(MAPFILE.NES:%=-M%) $(MAPFILE.NED:%=-M%) \
     56 			    $(MAPFILE.PGA:%=-M%)
     57 
     58 ROOTONBLDPROG=		$(PROG:%=$(ROOTONBLDBIN)/%)
     59 ROOTONBLDMACHPROG=	$(PROG:%=$(ROOTONBLDBINMACH)/%)
     60 ROOTONBLDSHFILES=	$(SHFILES:%=$(ROOTONBLDBIN)/%)
     61 ROOTONBLDMAKEFILES=	$(MAKEFILES:%=$(ROOTONBLDBIN)/%)
     62 ROOTONBLDMACHSHFILES=	$(SHFILES:%=$(ROOTONBLDBINMACH)/%)
     63 ROOTONBLDMACHBINARIES=	$(BINARIES:%=$(ROOTONBLDBINMACH)/%)
     64 ROOTONBLDETCFILES=	$(ETCFILES:%=$(ROOTONBLDETC)/%)
     65 ROOTONBLDENVFILES=	$(ENVFILES:%=$(ROOTONBLDENV)/%)
     66 ROOTONBLDGKFILES=	$(GKFILES:%=$(ROOTONBLDGK)/.%)
     67 ROOTONBLDGKSHFILES=	$(SHFILES:%=$(ROOTONBLDGK)/%)
     68 ROOTONBLDPERLFILES=	$(PERLFILES:%=$(ROOTONBLDBIN)/%)
     69 ROOTONBLDPERLMODULES=	$(PERLMODULES:%=$(ROOTONBLDLIBPERL)/%)
     70 ROOTONBLDPYFILES=	$(PYFILES:%=$(ROOTONBLDBIN)/%)
     71 ROOTONBLDMAN1FILES=	$(MAN1FILES:%=$(ROOTONBLDMAN1)/%)
     72 ROOTONBLDSMAN1FILES=	$(SMAN1FILES:%=$(ROOTONBLDSMAN1)/%)
     73 ROOTONBLDABIAUDITFILES=	$(ABI_AUDITFILES:%=$(ROOTONBLDETCABI)/%)
     74 ROOTONBLDEXCEPTFILES=	$(EXCEPTFILES:%=$(ROOTONBLDETCEXCEPT)/%)
     75 
     76 # Break a chicken-and-egg dependency cycle for the tools build
     77 SCCSCHECK=@echo would sccscheck
     78 
     79 $(ROOTONBLDETCABI)/%: %
     80 	$(INS.file)
     81 
     82 $(ROOTONBLDETCEXCEPT)/%: $(CODEMGR_WS)/exception_lists/%
     83 	$(INS.file)
     84 
     85 $(ROOTONBLDBIN)/%: %
     86 	$(INS.file)
     87 
     88 $(ROOTONBLDBINMACH)/%: %
     89 	$(INS.file)
     90 
     91 $(ROOTONBLDETC)/%: %
     92 	$(INS.file)
     93 
     94 $(ROOTONBLDLIBPERL)/%: %
     95 	$(INS.file)
     96 
     97 $(ROOTONBLDMAN1)/%: %
     98 	$(INS.file)
     99 
    100 $(ROOTONBLDSMAN1)/%: %
    101 	$(INS.file)
    102 
    103 $(ROOTONBLDENV)/%: %
    104 	$(INS.file)
    105 
    106 $(ROOTONBLDGK)/.%: %
    107 	$(INS.rename)
    108 
    109 $(ROOTONBLDGK)/%: %
    110 	$(INS.file)
    111