f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson#
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# CDDL HEADER START
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence#
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# The contents of this file are subject to the terms of the
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# Common Development and Distribution License (the "License").
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# You may not use this file except in compliance with the License.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence#
15a44745412679c30a6d022733925af70a38b715David Lawrence# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15a44745412679c30a6d022733925af70a38b715David Lawrence# or http://www.opensolaris.org/os/licensing.
15a44745412679c30a6d022733925af70a38b715David Lawrence# See the License for the specific language governing permissions
15a44745412679c30a6d022733925af70a38b715David Lawrence# and limitations under the License.
15a44745412679c30a6d022733925af70a38b715David Lawrence#
15a44745412679c30a6d022733925af70a38b715David Lawrence# When distributing Covered Code, include this CDDL HEADER in each
15a44745412679c30a6d022733925af70a38b715David Lawrence# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15a44745412679c30a6d022733925af70a38b715David Lawrence# If applicable, add the following below this CDDL HEADER, with the
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# fields enclosed by brackets "[]" replaced with your own identifying
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# information: Portions Copyright [yyyy] [name of copyright owner]
7dde2780aeae0da4e965d823578a604d8ce1215fAndreas Gustafsson#
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence# CDDL HEADER END
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson#
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson#
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence# Use is subject to license terms.
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence#
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson#
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence# Build and link kmdb
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson#
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafssonall: $(PROG) kmdb_modlinktest.o
7dde2780aeae0da4e965d823578a604d8ce1215fAndreas Gustafsson
7dde2780aeae0da4e965d823578a604d8ce1215fAndreas Gustafsson%.o: ../../kmdb/%.c
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson $(COMPILE.c) $<
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson $(CTFCONVERT_O)
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson%.o: ../../mdb/%.c
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson $(COMPILE.c) $<
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson $(CTFCONVERT_O)
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson%.o: $(SRC)/common/dis/i386/%.c
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson $(COMPILE.c) $<
fb01226bcd598c36b5edc566489c890c39f03ed3Brian Wellington $(CTFCONVERT_O)
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson%.ln: ../../kmdb/%.c
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson $(LINT.c) -c $<
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson
7a184cd4e5a54a4e530f9bff8a4e46be392d0b52Brian Wellington%.ln: ../../mdb/%.c
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson $(LINT.c) -c $<
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson
9df7d74e421cf715c6e3cbbad2aba6d33a5d1c9bBrian Wellington%.ln: $(SRC)/common/dis/i386/%.c
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson $(LINT.c) -c $<
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas GustafssonROOT_MISC_DIR = $(ROOT)/kernel/misc
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceROOT_MISC_DIR_64 = $(ROOT_MISC_DIR)/$(SUBDIR64)
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceROOTMISC = $(ROOT_MISC_DIR)/$(PROG)
6e49e91bd08778d7eae45a2229dcf41ed97cc636David LawrenceROOTMISC64 = $(ROOT_MISC_DIR_64)/$(PROG)
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson
6e49e91bd08778d7eae45a2229dcf41ed97cc636David Lawrenceinclude ../../../../Makefile.cmd
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafssoninclude ../../../../Makefile.cmd.64
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafssoninclude ../../Makefile.amd64
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafssoninclude ../../../Makefile.kmdb
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceSTANDLIBS += $(ROOT)/usr/lib/amd64/libstanddisasm.so
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceSTANDLIBS += $(ROOT)/usr/lib/amd64/libstandsaveargs.so
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas GustafssonINCDIRS += $(SRC)/uts/i86pc $(SRC)/common/dis/i386
7a184cd4e5a54a4e530f9bff8a4e46be392d0b52Brian Wellington
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas GustafssonCPPFLAGS += -DDIS_TEXT
7a184cd4e5a54a4e530f9bff8a4e46be392d0b52Brian Wellington
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafssoninstall: all $(ROOTMISC64)
6e49e91bd08778d7eae45a2229dcf41ed97cc636David Lawrence
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson#
6e49e91bd08778d7eae45a2229dcf41ed97cc636David Lawrence# lint rules
7a184cd4e5a54a4e530f9bff8a4e46be392d0b52Brian Wellington#
7a184cd4e5a54a4e530f9bff8a4e46be392d0b52Brian Wellington
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson.PARALLEL: lintkmdb lintprom lintkctl
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafssonlint: lintkmdb lintprom lintkctl
7a184cd4e5a54a4e530f9bff8a4e46be392d0b52Brian Wellington $(LINT) $(ALLLINTFLAGS) $(KMDBOBJS:%.o=%.ln) $(PROMOBJS:%.o=%.ln)
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafssonlintkmdb: $(KMDBOBJS:%.o=%.ln)
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson $(LINT) $(LINTFLAGS) $(KMDBOBJS:%.o=%.ln)
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafssonlintprom: $(PROMOBJS:%.o=%.ln)
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson $(LINT) $(LINTFLAGS) $(PROMOBJS:%.o=%.ln)
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafssonlintkctl: $(KCTLOBJS:%.o=%.ln)
6e49e91bd08778d7eae45a2229dcf41ed97cc636David Lawrence $(LINT) $(ALLLINTFLAGS) $(KCTLOBJS:%.o=%.ln)
9df7d74e421cf715c6e3cbbad2aba6d33a5d1c9bBrian Wellington
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafssonkmdb_context_off.h: ../../kmdb/kmdb_context_off.in
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson $(OFFSETS_CREATE) <../../kmdb/kmdb_context_off.in >$@
6e49e91bd08778d7eae45a2229dcf41ed97cc636David Lawrence
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson#
fb01226bcd598c36b5edc566489c890c39f03ed3Brian Wellington# Installation targets
7a184cd4e5a54a4e530f9bff8a4e46be392d0b52Brian Wellington#
fb01226bcd598c36b5edc566489c890c39f03ed3Brian Wellington
fb01226bcd598c36b5edc566489c890c39f03ed3Brian Wellington$(ROOT_MISC_DIR) $(ROOT_MISC_DIR_64):
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson -$(INS.dir)
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson$(ROOT_MISC_DIR)/%: % $(ROOT_MISC_DIR)
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson $(INS.file)
7dde2780aeae0da4e965d823578a604d8ce1215fAndreas Gustafsson
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson$(ROOT_MISC_DIR_64)/%: % $(ROOT_MISC_DIR_64)
7dde2780aeae0da4e965d823578a604d8ce1215fAndreas Gustafsson $(INS.file)
7dde2780aeae0da4e965d823578a604d8ce1215fAndreas Gustafsson