Print this page
11461 should use a native link-editor during the build
11463 SUNWonld has passed its use-by date
11464 cmd/sgs/tools should contain tools, not common code
11465 sgsmsg should be built with the rest of the build tools


   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 2008 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 # Copyright 2016 RackTop Systems.
  26 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
  27 #
  28 
  29 pics/%.o:       ../common/%.c
  30                 $(COMPILE.c) -o $@ $<
  31                 $(POST_PROCESS_O)
  32 
  33 pics/%32.o:     ../common/%.c
  34                 $(COMPILE.c) -o $@ $<
  35                 $(POST_PROCESS_O)
  36 
  37 pics/%64.o:     ../common/%.c
  38                 $(COMPILE.c) -o $@ -D_ELF64 $<
  39                 $(POST_PROCESS_O)
  40 
  41 pics/%32.o:     %.c
  42                 $(COMPILE.c) -o $@ $<
  43                 $(POST_PROCESS_O)
  44 
  45 pics/%64.o:     %.c
  46                 $(COMPILE.c) -o $@ -D_ELF64 $<
  47                 $(POST_PROCESS_O)
  48 
  49 pics/%.o:       $(SGSTOOLS)/common/%.c
  50                 $(COMPILE.c) -o $@ $<
  51                 $(POST_PROCESS_O)
  52 
  53 pics/%.o:       $(VAR_AVLDIR)/%.c
  54                 $(COMPILE.c) -o $@ $<
  55                 $(POST_PROCESS_O)
  56 
  57 #
  58 # We use the shared elfcap code under usr/src/common/elfcap
  59 #
  60 pics/elfcap.o:  $(ELFCAP)/elfcap.c
  61                 $(COMPILE.c) -o  $@ $(ELFCAP)/elfcap.c
  62                 $(POST_PROCESS_O)
  63 
  64 # Rules for compiling the shared relocation engines (doreloc.c) maintained
  65 # under usr/src/uts. To support cross linking, We compile and link
  66 # all of these into every copy of libld. Each one requires a separate rule:
  67 #       - The source files are in different subtrees under usr/src/uts
  68 #       - The output file needs to include the platform name to
  69 #               keep the object files from colliding


  77 pics/%_x86_64.o: $(KRTLD_AMD64)/%.c
  78                 $(COMPILE.c) -o $@ -D_ELF64 -DDO_RELOC_LIBLD $<
  79                 $(POST_PROCESS_O)
  80 
  81 pics/%_sparc_32.o: $(KRTLD_SPARC)/%.c
  82                 $(COMPILE.c) -o $@ -DDO_RELOC_LIBLD $<
  83                 $(POST_PROCESS_O)
  84 
  85 pics/%_sparc_64.o: \
  86                 $(KRTLD_SPARC)/%.c
  87                 $(COMPILE.c) -o $@ -D_ELF64 -DDO_RELOC_LIBLD $<
  88                 $(POST_PROCESS_O)
  89 
  90 
  91 $(LIBLINKS):
  92                 $(RM) $@; $(SYMLINK) $(DYNLIB) $@
  93 
  94 delete:
  95                 $(RM) $(DYNLIB)
  96 
  97 # Special target for native builds (ie. when we need to build a version of ld
  98 # to build a version of ld :-).
  99 
 100 native:         $(SGSLIBDIR)/$(LIBLINKS)
 101 
 102 $(PICS):        pics
 103 
 104 $(SGSLIBDIR)/$(DYNLIB): $(PICS) $(SGSLIBDIR)
 105                 $(BUILD.SO)
 106                 $(POST_PROCESS_SO)
 107 
 108 $(SGSLIBDIR)/$(LIBLINKS): $(SGSLIBDIR)/$(DYNLIB)
 109                 @$(RM) $(SGSLIBDIR)/$(LIBLINKS)
 110                 $(SYMLINK) $(DYNLIB) $(SGSLIBDIR)/$(LIBLINKS)
 111 
 112 include         $(SRC)/lib/Makefile.targ
 113 include         $(SRC)/cmd/sgs/Makefile.targ
 114 
 115 # Derived source and header files (messaging).
 116 
 117 catalog:        $(BLTMESG)
 118 
 119 chkmsg:         $(LIBSRCS) $(CHKSRCS)
 120                 sh $(CHKMSG) $(CHKMSGFLAGS) $(LIBSRCS) $(CHKSRCS)
 121 
 122 $(BLTDEFS) + \
 123 $(BLTDATA):     $(SGSMSGTARG)
 124                 $(SGSMSG) $(SGSMSGFLAGS2) $(SGSMSGTARG)
 125 
 126 $(BLTMESG):     $(SGSMSGALL)
 127                 $(SGSMSG) $(SGSMSGFLAGS1) $(SGSMSGALL)


   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 2008 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 # Copyright 2016 RackTop Systems.
  26 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
  27 #
  28 
  29 pics/%.o:       $(SRCDIR)/common/%.c
  30                 $(COMPILE.c) -o $@ $<
  31                 $(POST_PROCESS_O)
  32 
  33 pics/%32.o:     $(SRCDIR)/common/%.c
  34                 $(COMPILE.c) -o $@ $<
  35                 $(POST_PROCESS_O)
  36 
  37 pics/%64.o:     $(SRCDIR)/common/%.c
  38                 $(COMPILE.c) -o $@ -D_ELF64 $<
  39                 $(POST_PROCESS_O)
  40 
  41 pics/%32.o:     %.c
  42                 $(COMPILE.c) -o $@ $<
  43                 $(POST_PROCESS_O)
  44 
  45 pics/%64.o:     %.c
  46                 $(COMPILE.c) -o $@ -D_ELF64 $<
  47                 $(POST_PROCESS_O)
  48 
  49 pics/%.o:       $(SGSCOMMON)/%.c
  50                 $(COMPILE.c) -o $@ $<
  51                 $(POST_PROCESS_O)
  52 
  53 pics/%.o:       $(VAR_AVLDIR)/%.c
  54                 $(COMPILE.c) -o $@ $<
  55                 $(POST_PROCESS_O)
  56 
  57 #
  58 # We use the shared elfcap code under usr/src/common/elfcap
  59 #
  60 pics/elfcap.o:  $(ELFCAP)/elfcap.c
  61                 $(COMPILE.c) -o  $@ $(ELFCAP)/elfcap.c
  62                 $(POST_PROCESS_O)
  63 
  64 # Rules for compiling the shared relocation engines (doreloc.c) maintained
  65 # under usr/src/uts. To support cross linking, We compile and link
  66 # all of these into every copy of libld. Each one requires a separate rule:
  67 #       - The source files are in different subtrees under usr/src/uts
  68 #       - The output file needs to include the platform name to
  69 #               keep the object files from colliding


  77 pics/%_x86_64.o: $(KRTLD_AMD64)/%.c
  78                 $(COMPILE.c) -o $@ -D_ELF64 -DDO_RELOC_LIBLD $<
  79                 $(POST_PROCESS_O)
  80 
  81 pics/%_sparc_32.o: $(KRTLD_SPARC)/%.c
  82                 $(COMPILE.c) -o $@ -DDO_RELOC_LIBLD $<
  83                 $(POST_PROCESS_O)
  84 
  85 pics/%_sparc_64.o: \
  86                 $(KRTLD_SPARC)/%.c
  87                 $(COMPILE.c) -o $@ -D_ELF64 -DDO_RELOC_LIBLD $<
  88                 $(POST_PROCESS_O)
  89 
  90 
  91 $(LIBLINKS):
  92                 $(RM) $@; $(SYMLINK) $(DYNLIB) $@
  93 
  94 delete:
  95                 $(RM) $(DYNLIB)
  96 





  97 $(PICS):        pics








  98 
  99 include         $(SRC)/lib/Makefile.targ
 100 include         $(SRC)/cmd/sgs/Makefile.targ
 101 
 102 # Derived source and header files (messaging).
 103 
 104 catalog:        $(BLTMESG)
 105 
 106 chkmsg:         $(LIBSRCS) $(CHKSRCS)
 107                 sh $(CHKMSG) $(CHKMSGFLAGS) $(LIBSRCS) $(CHKSRCS)
 108 
 109 $(BLTDEFS) + \
 110 $(BLTDATA):     $(SGSMSGTARG)
 111                 $(SGSMSG) $(SGSMSGFLAGS2) $(SGSMSGTARG)
 112 
 113 $(BLTMESG):     $(SGSMSGALL)
 114                 $(SGSMSG) $(SGSMSGFLAGS1) $(SGSMSGALL)