Makefile.com revision d5ace9454616652a717c9831d949dffa319381f9
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur# CDDL HEADER START
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur#
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur# The contents of this file are subject to the terms of the
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur# Common Development and Distribution License (the "License").
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur# You may not use this file except in compliance with the License.
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur#
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur# or http://www.opensolaris.org/os/licensing.
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur# See the License for the specific language governing permissions
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur# and limitations under the License.
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur#
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur# When distributing Covered Code, include this CDDL HEADER in each
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur# If applicable, add the following below this CDDL HEADER, with the
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur# fields enclosed by brackets "[]" replaced with your own identifying
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur# information: Portions Copyright [yyyy] [name of copyright owner]
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur#
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur# CDDL HEADER END
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur#
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur# Use is subject to license terms.
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur#
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur
d5ace9454616652a717c9831d949dffa319381f9Erwin T TsaurPROG = pcitool
d5ace9454616652a717c9831d949dffa319381f9Erwin T TsaurOBJS = pcitool.o pcitool_ui.o pcitool_usage.o
d5ace9454616652a717c9831d949dffa319381f9Erwin T TsaurSRCS = $(OBJS:%.o=../%.c)
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur#
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur# Manpage is in the directory above platform-specific directory
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur# from which this makefile is called.
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur#
d5ace9454616652a717c9831d949dffa319381f9Erwin T TsaurMAN1MFILES = pcitool.1m
d5ace9454616652a717c9831d949dffa319381f9Erwin T TsaurMANFILE_SRC_PATH = ../$(MAN1MFILES)
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaurinclude $(SRC)/cmd/Makefile.cmd
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur
d5ace9454616652a717c9831d949dffa319381f9Erwin T TsaurUTSBASE = ../../../../src/uts
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur
d5ace9454616652a717c9831d949dffa319381f9Erwin T TsaurLDLIBS += -ldevinfo
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur
d5ace9454616652a717c9831d949dffa319381f9Erwin T TsaurCFLAGS += -D$(MACH) -I$(UTSBASE)/common
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur
d5ace9454616652a717c9831d949dffa319381f9Erwin T TsaurLINTFLAGS += -I$(UTSBASE)/common
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur.KEEP_STATE:
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaurall: $(PROG) $(MANFILE_SRC_PATH)
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur$(SUBDIRS): FRC
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur @cd $@; pwd; $(MAKE) $(TARGET)
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur$(PROG): $(OBJS)
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur $(POST_PROCESS)
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur$(ROOTMAN1M):
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur mkdir -p $(ROOTMAN1M)
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur$(ROOTMAN1MFILES): $(MANFILE_SRC_PATH) $(ROOTMAN1M)
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur $(INS.file) $(MANFILE_SRC_PATH)
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaurinstall: all $(PROG) $(MANFILE_SRC_PATH)
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaurclean:
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur $(RM) $(OBJS) $(PROG)
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaurlint:
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur $(LINT.c) $(SRCS) $(LDLIBS)
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur%.o: ../%.c
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur $(COMPILE.c) -o $@ $<
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaur
d5ace9454616652a717c9831d949dffa319381f9Erwin T Tsaurinclude $(SRC)/cmd/Makefile.targ