1*7fd79137SRobert Mustacchi# 2*7fd79137SRobert Mustacchi# CDDL HEADER START 3*7fd79137SRobert Mustacchi# 4*7fd79137SRobert Mustacchi# The contents of this file are subject to the terms of the 5*7fd79137SRobert Mustacchi# Common Development and Distribution License (the "License"). 6*7fd79137SRobert Mustacchi# You may not use this file except in compliance with the License. 7*7fd79137SRobert Mustacchi# 8*7fd79137SRobert Mustacchi# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*7fd79137SRobert Mustacchi# or http://www.opensolaris.org/os/licensing. 10*7fd79137SRobert Mustacchi# See the License for the specific language governing permissions 11*7fd79137SRobert Mustacchi# and limitations under the License. 12*7fd79137SRobert Mustacchi# 13*7fd79137SRobert Mustacchi# When distributing Covered Code, include this CDDL HEADER in each 14*7fd79137SRobert Mustacchi# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*7fd79137SRobert Mustacchi# If applicable, add the following below this CDDL HEADER, with the 16*7fd79137SRobert Mustacchi# fields enclosed by brackets "[]" replaced with your own identifying 17*7fd79137SRobert Mustacchi# information: Portions Copyright [yyyy] [name of copyright owner] 18*7fd79137SRobert Mustacchi# 19*7fd79137SRobert Mustacchi# CDDL HEADER END 20*7fd79137SRobert Mustacchi# 21*7fd79137SRobert Mustacchi# 22*7fd79137SRobert Mustacchi# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 23*7fd79137SRobert Mustacchi# Use is subject to license terms. 24*7fd79137SRobert Mustacchi# 25*7fd79137SRobert Mustacchi# Copyright 2018 Joyent, Inc. 26*7fd79137SRobert Mustacchi# 27*7fd79137SRobert Mustacchi 28*7fd79137SRobert Mustacchi# 29*7fd79137SRobert Mustacchi# This Makefile is shared between the libctf native build in tools and 30*7fd79137SRobert Mustacchi# the libctf build here for the system. 31*7fd79137SRobert Mustacchi# 32*7fd79137SRobert MustacchiLIBRARY = libctf.a 33*7fd79137SRobert MustacchiVERS = .1 34*7fd79137SRobert Mustacchi 35*7fd79137SRobert MustacchiCOMMON_OBJS = \ 36*7fd79137SRobert Mustacchi ctf_create.o \ 37*7fd79137SRobert Mustacchi ctf_decl.o \ 38*7fd79137SRobert Mustacchi ctf_dwarf.o \ 39*7fd79137SRobert Mustacchi ctf_error.o \ 40*7fd79137SRobert Mustacchi ctf_hash.o \ 41*7fd79137SRobert Mustacchi ctf_labels.o \ 42*7fd79137SRobert Mustacchi ctf_lookup.o \ 43*7fd79137SRobert Mustacchi ctf_open.o \ 44*7fd79137SRobert Mustacchi ctf_types.o \ 45*7fd79137SRobert Mustacchi ctf_util.o 46*7fd79137SRobert Mustacchi 47*7fd79137SRobert MustacchiMERGEQ_OBJS = \ 48*7fd79137SRobert Mustacchi mergeq.o \ 49*7fd79137SRobert Mustacchi workq.o 50*7fd79137SRobert Mustacchi 51*7fd79137SRobert MustacchiLIST_OBJS = \ 52*7fd79137SRobert Mustacchi list.o 53*7fd79137SRobert Mustacchi 54*7fd79137SRobert MustacchiLIB_OBJS = \ 55*7fd79137SRobert Mustacchi ctf_convert.o \ 56*7fd79137SRobert Mustacchi ctf_elfwrite.o \ 57*7fd79137SRobert Mustacchi ctf_diff.o \ 58*7fd79137SRobert Mustacchi ctf_lib.o \ 59*7fd79137SRobert Mustacchi ctf_merge.o \ 60*7fd79137SRobert Mustacchi ctf_subr.o 61*7fd79137SRobert Mustacchi 62*7fd79137SRobert MustacchiOBJECTS = $(COMMON_OBJS) $(LIB_OBJS) $(LIST_OBJS) $(MERGEQ_OBJS) 63*7fd79137SRobert MustacchiMAPFILEDIR = $(SRC)/lib/libctf 64*7fd79137SRobert Mustacchi 65*7fd79137SRobert Mustacchiinclude $(SRC)/lib/Makefile.lib 66*7fd79137SRobert Mustacchi 67*7fd79137SRobert MustacchiSRCS = \ 68*7fd79137SRobert Mustacchi $(COMMON_OBJS:%.o=$(SRC)/common/ctf/%.c) \ 69*7fd79137SRobert Mustacchi $(LIB_OBJS:%.o=$(SRC)/lib/libctf/common/%.c) \ 70*7fd79137SRobert Mustacchi $(LIST_OBJS:%.o=$(SRC)/common/list/%.c) \ 71*7fd79137SRobert Mustacchi $(MERGEQ_OBJS:%.o=$(SRC)/lib/mergeq/%.c) 72*7fd79137SRobert Mustacchi 73*7fd79137SRobert MustacchiLIBS = $(DYNLIB) $(LINTLIB) 74*7fd79137SRobert MustacchiLDLIBS += -lc -lelf -ldwarf -lavl 75*7fd79137SRobert Mustacchi 76*7fd79137SRobert MustacchiCSTD = $(CSTD_GNU99) 77*7fd79137SRobert MustacchiC99LMODE = -Xc99=%all 78*7fd79137SRobert Mustacchi 79*7fd79137SRobert MustacchiSRCDIR = $(SRC)/lib/libctf/common 80*7fd79137SRobert Mustacchi 81*7fd79137SRobert MustacchiCPPFLAGS += -I$(SRC)/lib/libctf/common \ 82*7fd79137SRobert Mustacchi -I$(SRC)/common/ctf \ 83*7fd79137SRobert Mustacchi -I$(SRC)/lib/libdwarf/common \ 84*7fd79137SRobert Mustacchi -I$(SRC)/lib/mergeq \ 85*7fd79137SRobert Mustacchi -DCTF_OLD_VERSIONS 86*7fd79137SRobert MustacchiCFLAGS += $(CCVERBOSE) 87*7fd79137SRobert Mustacchi 88*7fd79137SRobert MustacchiCERRWARN += -_gcc=-Wno-uninitialized 89*7fd79137SRobert Mustacchi 90*7fd79137SRobert Mustacchi$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC) 91