Makefile.mdb revision 8ad60789b9913d5b2118fe76d8cd7a661d8ae8b6
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
.KEEP_STATE:
.SUFFIXES:
SRCS += mdb.c \
mdb_io.c \
mdb_nm.c \
mdb_nv.c \
$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
CPPFLAGS += -D_MDB -I. -I../.. -I../../../common
LDLIBS += -ltermcap -lkvm -lproc -lrtld_db -lctf -lumem \
$(ZLAZYLOAD) -lscf $(ZNOLAZYLOAD)
LINTFLAGS += -n -errtags=yes
LINTFILES = $(SRCS:%.c=%.ln)
PROG = mdb
OBJS = $(SRCS:%.c=%.o) mdb_lex.o mdb_grammar.o
LINK = adb
ROOTLINK = $(ROOTBIN)/$(LINK)
ROOTLINK32 = $(LINK:%=$(ROOTBIN32)/%)
ROOTLINK64 = $(LINK:%=$(ROOTBIN64)/%)
.NO_PARALLEL:
.PARALLEL: $(OBJS) $(LINTFILES)
all: $(PROG)
$(PROG): $(OBJS)
$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
$(CTFMERGE) -L VERSION -o $@ $(OBJS)
$(POST_PROCESS)
$(ROOTLINK32): $(ROOTPROG32)
$(RM) $@
$(LN) $(ROOTPROG32) $@
$(ROOTLINK64): $(ROOTPROG64)
$(RM) $@
$(LN) $(ROOTPROG64) $@
$(LEX) $(LFLAGS) ../../../common/mdb/mdb_lex.l > $@
$(YACC) $(YFLAGS) ../../../common/mdb/mdb_grammar.y
@$(MV) y.tab.h mdb_grammar.h
@$(MV) y.tab.c mdb_grammar.c
mdb_lex.o mdb_grammar.o := CCVERBOSE =
mdb_conf.o := CPPFLAGS += -DMDB_VERSION='$(MDB_VERSION)'
inet_ntop.o := CPPFLAGS += -Dsnprintf=mdb_snprintf
%.o: ../../../common/mdb/%.c
$(COMPILE.c) $<
$(CTFCONVERT_O)
%.o: ../../mdb/%.c
$(COMPILE.c) $<
$(CTFCONVERT_O)
%.o: %.c
$(COMPILE.c) $<
$(CTFCONVERT_O)
%.o: $(SRC)/common/net/util/%.c
$(COMPILE.c) $<
$(CTFCONVERT_O)
$(RM) $(LINTFILES)
clean:
$(RM) $(OBJS)
clobber: clean clean.lint
$(RM) $(PROG)
%.ln: ../../../common/mdb/%.c
$(LINT.c) -c $<
%.ln: ../../mdb/%.c
$(LINT.c) -c $<
%.ln: %.c
$(LINT.c) -c $<
%.ln: $(SRC)/common/net/util/%.c
$(LINT.c) -c $<
lint: $(LINTFILES)
$(LINT) $(LINTFLAGS) $(LINTFILES)
dmods: