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 (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
  23 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
  24 #
  25 
  26 objs/%.o \
  27 pics/%.o:       %.c
  28                 $(COMPILE.c) -o $@ $<
  29                 $(POST_PROCESS_O)
  30 
  31 objs/%64.o \
  32 pics/%64.o:     ../common/%.c
  33                 $(COMPILE.c) -D_ELF64 -o $@ $<
  34                 $(POST_PROCESS_O)
  35 
  36 objs/%.o \
  37 pics/%.o:       ../misc/%.c
  38                 $(COMPILE.c) -DELF -o $@ $<
  39                 $(POST_PROCESS_O)
  40 
  41 objs/%.o \
  42 pics/%.o:       ../common/%.c
  43                 $(COMPILE.c) -o $@ $<
  44                 $(POST_PROCESS_O)
  45 
  46 all:            $(BLTSRCS) .WAIT $(LIBS) $(LIBLINKS)
  47 
  48 delete:
  49                 $(RM) $(DYNLIB)
  50 
  51 $(LIBLINKS):
  52                 $(RM) $(LIBLINKS)
  53                 $(SYMLINK) $(DYNLIB) $(LIBLINKS)
  54 
  55 CLOBBERFILES += $(LIBLINKS)
  56 
  57 # include common library targets
  58 #
  59 include         $(SRC)/lib/Makefile.targ
  60 include         $(SRC)/cmd/sgs/Makefile.targ
  61 
  62 xlate.c:        ../common/xlate.m4
  63                 $(M4) < ../common/xlate.m4 > xlate.c
  64 
  65 xlate64.c:      ../common/xlate64.m4
  66                 $(M4) < ../common/xlate64.m4 > xlate64.c
  67 
  68 objs/msg.o \
  69 pics/msg.o:     msg.c
  70 
  71 objs/error.o \
  72 pics/error.o:   msg.h
  73 
  74 objs/ar.o \
  75 pics/ar.o:      msg.h
  76 
  77 objs/xlate.o \
  78 pics/xlate.o:   xlate.c
  79 
  80 
  81 # Derived source and header files (messaging).  Make sure that the sgsmsg
  82 # command is constructed - libelf might not be built with the whole sgs.
  83 
  84 catalog:        $(BLTMESG)
  85 
  86 chkmsg:         $(LIBSRCS)
  87                 sh $(CHKMSG) $(CHKMSGFLAGS) $(LIBSRCS)
  88 
  89 $(BLTDEFS) + \
  90 $(BLTDATA):     $(SGSMSGTARG)
  91                 $(SGSMSG) $(SGSMSGFLAGS2) $(SGSMSGTARG)
  92 
  93 $(BLTMESG):     $(SGSMSGALL) xlate.c xlate64.c
  94                 $(SGSMSG) $(SGSMSGFLAGS1) $(SGSMSGALL)
  95 
  96 #
  97 # 64-bit overrides
  98 #
  99 include ../../Makefile.sub.64
 100 
 101 FRC: