Makefile.libstandctf revision 7c478bd95313f5f23a4c958a745db2134aa03244
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync#
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync# CDDL HEADER START
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync#
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync# The contents of this file are subject to the terms of the
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync# Common Development and Distribution License, Version 1.0 only
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync# (the "License"). You may not use this file except in compliance
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync# with the License.
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync#
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync# or http://www.opensolaris.org/os/licensing.
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync# See the License for the specific language governing permissions
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync# and limitations under the License.
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync#
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync# When distributing Covered Code, include this CDDL HEADER in each
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync# If applicable, add the following below this CDDL HEADER, with the
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync# fields enclosed by brackets "[]" replaced with your own identifying
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync#
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync# CDDL HEADER END
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync#
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync#
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync# Use is subject to license terms.
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync#
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync# ident "%Z%%M% %I% %E% SMI"
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync.KEEP_STATE:
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsyncCTF_COMMON_SRCS = \
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync ctf_create.c \
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync ctf_decl.c \
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync ctf_error.c \
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync ctf_hash.c \
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync ctf_labels.c \
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync ctf_lookup.c \
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync ctf_open.c \
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync ctf_types.c \
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync ctf_util.c
e433ea25f22e39143efa35e99b05182b4a6f7dcevboxsync
CTF_STUB_SRCS = \
ctf_subr.c
MAPFILE = ../../../common/libstandctf/mapfile
$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
CPPFLAGS += -I$(SRC)/common/ctf -I../../../common -DCTF_OLD_VERSIONS -D_MDB \
-Dvsnprintf=ctf_vsnprintf
#
# kmdb is a kernel module, so we'll use the kernel's build flags.
CFLAGS += $(STAND_FLAGS_32)
CFLAGS64 += $(STAND_FLAGS_64)
LDFLAGS = -znoversion -Breduce -M $(MAPFILE) -dy -r
LIB = libstandctf.so
OBJS = $(CTF_COMMON_SRCS:%.c=%.o) $(CTF_STUB_SRCS:%.c=%.o)
LINTFILES = $(OBJS:%.o=%.ln)
LINTFLAGS += -n -errtags=yes
.NO_PARALLEL:
.PARALLEL: $(OBJS)
install all: $(LIB)
$(LIB): $(OBJS) $(MAPFILE)
$(LD) $(LDFLAGS) -o $@ $(OBJS)
clobber clean:
$(RM) $(LIB) $(OBJS) $(LINTFILES)
lint: $(LINTFILES)
$(LINT) $(LINTFLAGS) $(LINTFILES)
#
# Dynamic rules for object construction
#
%.o: ../../../common/libstandctf/%.c
$(COMPILE.c) $<
$(CTFCONVERT_O)
%.o: $(SRC)/common/ctf/%.c
$(COMPILE.c) $<
$(CTFCONVERT_O)
#
# Lint
#
%.ln: ../../../common/libstandctf/%.c
$(LINT.c) -c $<
%.ln: $(SRC)/common/ctf/%.c
$(LINT.c) -c $<