Print this page
lib: move compat links from targetdirs to proper makefiles

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libc/Makefile
          +++ new/usr/src/lib/libc/Makefile
↓ open down ↓ 37 lines elided ↑ open up ↑
  38   38  ROOTLIB=        $(ROOT)/usr/lib
  39   39  ROOTFS_LIB=     $(ROOT)/lib
  40   40  ROOTLIB64=      $(ROOTLIB)/$(MACH64)
  41   41  ROOTFS_LIB64=   $(ROOTFS_LIB)/$(MACH64)
  42   42  
  43   43  ROOTVARIANTDIR= $(ROOTLIB)/libc
  44   44  ROOTVARIANTDIR64=       $(ROOTLIB64)/libc
  45   45  
  46   46  # include common library definitions
  47   47  include ../Makefile.lib
       48 +include ../Makefile.rootfs
  48   49  
  49   50  #
  50   51  # on some architectures, we build multiple libc variants
  51   52  #
  52   53  VAR1 =          hwcap1
  53   54  VAR2 =          hwcap2
  54   55  VAR3 =          hwcap3
  55   56  
  56   57  VARBLD_1=       $(MACH:sparc=sparc)
  57   58  VARBLD=         $(VARBLD_1:i386=)
↓ open down ↓ 27 lines elided ↑ open up ↑
  85   86  VARIANT_SUBDIRS = $(VARIANTS:%=$(MACH)_%/$(VARBLD))
  86   87  
  87   88  VARIANTS64=     $($(MACH64)_VARIANTS)
  88   89  VARIANT_SUBDIRS64       = $(VARIANTS64:%=$(MACH)_%/$(VARBLD64))
  89   90  
  90   91  SUBDIRS=        $(MACH_CAP) $(MACH) $(MACH_ETC) $(VARIANT_SUBDIRS)
  91   92  $(BUILD64)SUBDIRS += $(MACH64) $(VARIANT_SUBDIRS64)
  92   93  
  93   94  LIBS =          $(DYNLIB)
  94   95  
  95      -ROOTLIBS64=     $(ROOTLIBDIR64)/$(DYNLIB)
       96 +ROOTLIBS64=     $(ROOTLIB64)/$(DYNLIB)
  96   97  MACHLIBS64=     $(MACH64)/$(DYNLIB)
  97   98  VARIANTLIBS=    $(VARIANTS:%=$(MACH)_%/$(VARBLD)/$(LIBBASENAME)_%.so.1)
  98   99  VARIANTLIBS64=  $(VARIANTS64:%=$(MACH)_%/$(VARBLD64)/$(LIBBASENAME)_%.so.1)
  99  100  ROOTVARIANTLIBS= $(VARIANTS:%=$(ROOTVARIANTDIR)/$(LIBBASENAME)_%.so.1)
 100  101  ROOTVARIANTLIBS64= $(VARIANTS64:%=$(ROOTVARIANTDIR64)/$(LIBBASENAME)_%.so.1)
 101  102  
 102  103  # definitions for install_h target
 103  104  BASEHDRS=       getxby_door.h
 104  105  CHECKHDRS=      $(BASEHDRS:%.h=port/gen/%.check)
 105  106  HDRS=           $(BASEHDRS)
 106  107  
 107  108  CLOBBERFILES += THIRDPARTYLICENSE extract-copyright
 108  109  
 109  110  # install rules for install_h target
 110  111  $(ROOTHDRDIR)/%: port/gen/%
 111  112          $(INS.file)
 112  113  
 113      -$(ROOTLIBDIR)/$(DYNLIB) :=      FILEMODE = 755
 114      -$(ROOTLIBDIR64)/$(DYNLIB) :=    FILEMODE = 755
      114 +$(ROOTLIB)/$(DYNLIB)    :=      FILEMODE = 755
      115 +$(ROOTLIB64)/$(DYNLIB) :=       FILEMODE = 755
 115  116  $(ROOTFS_LIBDIR)/$(DYNLIB)      :=      FILEMODE = 755
 116  117  $(ROOTFS_LIBDIR64)/$(DYNLIB)    :=      FILEMODE = 755
 117  118  
 118  119  $(ROOTVARIANTDIR)                       := FILEMODE= 755
 119  120  $(ROOTVARIANTDIR)/$(VAR1_DYNLIB)        := FILEMODE= 755
 120  121  $(ROOTVARIANTDIR)/$(VAR2_DYNLIB)        := FILEMODE= 755
 121  122  $(ROOTVARIANTDIR)/$(VAR3_DYNLIB)        := FILEMODE= 755
 122  123  
 123  124  $(ROOTVARIANTDIR64)                     := FILEMODE= 755
 124  125  $(ROOTVARIANTDIR64)/$(VAR1_DYNLIB64)    := FILEMODE= 755
↓ open down ↓ 33 lines elided ↑ open up ↑
 158  159  
 159  160  $($(MACH)_ETC): FRC
 160  161          @cd $(@); pwd; $(MAKE) $(TARGET)
 161  162  
 162  163  $($(MACH)_COMP): FRC
 163  164          @cd $(@); pwd; $(MAKE) $(TARGET)
 164  165  
 165  166  install:        all                     \
 166  167                  etc                     \
 167  168                  inslib32                \
 168      -                $(BUILD64) inslib64
      169 +                $(ROOTCOMPATLINKS)
      170 +
      171 +$(BUILD64)install: inslib64 $(ROOTCOMPATLINKS64)
 169  172  
 170  173  inslib32:       $(ROOTFS_LIBS) $(ROOTFS_LINKS) $(ROOTVARIANTLIBS)
 171  174  
 172  175  inslib64:       $(ROOTFS_LIBS64) $(ROOTFS_LINKS64) $(ROOTVARIANTLIBS64)
 173  176  
 174  177  install_h: all_h $(ROOTHDRS)
 175  178  
 176  179  all_h:  $(MACH)/assym.h $(MACH64)/assym.h
 177  180  
 178  181  check:  $(CHECKHDRS)
 179  182  
 180      -$(ROOTFS_LIB)/%: $(MACH)/%
 181      -        $(INS.file)
 182      -$(ROOTFS_LIBDIR)/$(LIBLINKS): $(ROOTFS_LIBDIR)/$(LIBLINKS)$(VERS)
 183      -        $(INS.liblink)
 184      -$(ROOTFS_LIB64)/%: $(MACH64)/%
 185      -        $(INS.file)
 186      -$(ROOTFS_LIBDIR64)/$(LIBLINKS): $(ROOTFS_LIBDIR64)/$(LIBLINKS)$(VERS)
 187      -        $(INS.liblink)
 188      -
 189  183  $(ROOTVARIANTDIR): $(ROOTLIB)
 190  184          $(INS.dir)
 191  185  $(ROOTVARIANTDIR)/%: $(ROOTVARIANTDIR) $(VAR1_BLDDIR)/%
 192  186          $(INS.file)
 193  187  $(ROOTVARIANTDIR)/%: $(ROOTVARIANTDIR) $(VAR2_BLDDIR)/%
 194  188          $(INS.file)
 195  189  $(ROOTVARIANTDIR)/%: $(ROOTVARIANTDIR) $(VAR3_BLDDIR)/%
 196  190          $(INS.file)
 197  191  
 198  192  $(ROOTVARIANTDIR64): $(ROOTLIB64)
↓ open down ↓ 29 lines elided ↑ open up ↑
 228  222  catalog:
 229  223          sh ./makelibccatalog.sh $(MSGDOMAIN)
 230  224  
 231  225  $(MSGDOMAIN):
 232  226          $(INS.dir)
 233  227  
 234  228  cscope.out tags: FRC
 235  229          $(XREF) -x $@
 236  230  
 237  231  FRC:
      232 +
 238  233  # include MACH-specific library targets
 239  234  include ../Makefile.mach
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX