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 2006 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 
  26 include ../../Makefile.ctf
  27 
  28 .KEEP_STATE:
  29 .PARALLEL:
  30 
  31 PROG=ctfconvert ctfmerge
  32 
  33 GENSRCS= \
  34         alist.c \
  35         altexec.c \
  36         barrier.c \
  37         ctf.c \
  38         fifo.c \
  39         hash.c \
  40         iidesc.c \
  41         input.c \
  42         list.c \
  43         memory.c \
  44         merge.c \
  45         output.c \
  46         stack.c \
  47         strtab.c \
  48         symbol.c \
  49         tdata.c \
  50         traverse.c \
  51         util.c
  52 
  53 CVTSRCS=$(GENSRCS) \
  54         ctfconvert.c \
  55         dwarf.c \
  56         stabs.c \
  57         fixup_tdescs.c \
  58         st_parse.c
  59 CVTOBJS=$(CVTSRCS:%.c=%.o)
  60 CVTLINTFILES = $(CVTSRCS:%.c=%.ln)
  61 
  62 MRGSRCS=$(GENSRCS) \
  63         ctfmerge.c
  64 MRGOBJS=$(MRGSRCS:%.c=%.o)
  65 MRGLINTFILES = $(MRGSRCS:%.c=%.ln)
  66 
  67 SRCS=$(CVTSRCS) $(MRGSRCS) $(CMPSRCS)
  68 OBJS=$(SRCS:%.c=%.o)
  69 LINTFILES=$(SRCS:%.c=%.ln)
  70 
  71 DWARFLDFLAGS    = \
  72         -L$(ROOTONBLDLIBMACH) \
  73         '-R$$ORIGIN/../../lib/$(MACH)' \
  74         -ldwarf
  75 DWARFCPPFLAGS   = -I$(SRC)/lib/libdwarf/common
  76 
  77 LDFLAGS         += -L$(NATIVE_ADJUNCT)/lib
  78 LDLIBS          += -lz -lelf
  79 CPPFLAGS        += -D_REENTRANT
  80 CFLAGS          += $(CTF_FLAGS)
  81 LINTFLAGS       += -mnux
  82 
  83 CERRWARN        += -_gcc=-Wno-unused
  84 CERRWARN        += $(CNOWARN_UNINIT)
  85 CERRWARN        += -_gcc=-Wno-switch
  86 
  87 CSTD            = $(CSTD_GNU99)
  88 
  89 ctfconvert      := LDFLAGS += $(DWARFLDFLAGS)
  90 
  91 dwarf.o dwarf.ln        := CPPFLAGS += $(DWARFCPPFLAGS)