xref: /illumos-gate/usr/src/cmd/fm/fmtopo/Makefile.com (revision d17be682)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
57c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
67c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
77c478bd9Sstevel@tonic-gate# with the License.
87c478bd9Sstevel@tonic-gate#
97c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
117c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
127c478bd9Sstevel@tonic-gate# and limitations under the License.
137c478bd9Sstevel@tonic-gate#
147c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
157c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
177c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
187c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
197c478bd9Sstevel@tonic-gate#
207c478bd9Sstevel@tonic-gate# CDDL HEADER END
217c478bd9Sstevel@tonic-gate#
227aec1d6eScindi
237aec1d6eScindi#
247aec1d6eScindi# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
257c478bd9Sstevel@tonic-gate# Use is subject to license terms.
267c478bd9Sstevel@tonic-gate#
275661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gate.KEEP_STATE:
307aec1d6eScindi.SUFFIXES:
317c478bd9Sstevel@tonic-gate
327aec1d6eScindiSRCS += fmtopo.c
337aec1d6eScindiOBJS = $(SRCS:%.c=%.o)
347aec1d6eScindiLINTFILES = $(SRCS:%.c=%.ln)
357c478bd9Sstevel@tonic-gate
367aec1d6eScindiPROG = fmtopo
377aec1d6eScindiROOTLIBFM = $(ROOT)/usr/lib/fm
387aec1d6eScindiROOTLIBFMD = $(ROOT)/usr/lib/fm/fmd
397aec1d6eScindiROOTPROG = $(ROOTLIBFMD)/$(PROG)
407c478bd9Sstevel@tonic-gate
417aec1d6eScindi$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
427aec1d6eScindiCPPFLAGS += -I. -I../common
43*d17be682SRichard LoweCFLAGS += $(CTF_FLAGS) $(CCVERBOSE)
447aec1d6eScindiLDLIBS += -L$(ROOT)/usr/lib/fm -ltopo -lnvpair
457c478bd9Sstevel@tonic-gateLDFLAGS += -R/usr/lib/fm
467aec1d6eScindiLINTFLAGS += -mnu
477c478bd9Sstevel@tonic-gate
485661bb76SJohn Levon# not linted
495661bb76SJohn LevonSMATCH=off
505661bb76SJohn Levon
517aec1d6eScindi.NO_PARALLEL:
527aec1d6eScindi.PARALLEL: $(OBJS) $(LINTFILES)
537c478bd9Sstevel@tonic-gate
547aec1d6eScindiall: $(PROG)
557c478bd9Sstevel@tonic-gate
567c478bd9Sstevel@tonic-gate$(PROG): $(OBJS)
577aec1d6eScindi	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
5818fdaaefStimh	$(CTFMERGE) -L VERSION -o $@ $(OBJS)
597c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
607c478bd9Sstevel@tonic-gate
617aec1d6eScindi%.o: ../common/%.c
627aec1d6eScindi	$(COMPILE.c) $<
637aec1d6eScindi	$(CTFCONVERT_O)
647aec1d6eScindi
657aec1d6eScindi%.o: %.c
667aec1d6eScindi	$(COMPILE.c) $<
677aec1d6eScindi	$(CTFCONVERT_O)
687aec1d6eScindi
697c478bd9Sstevel@tonic-gateclean:
707aec1d6eScindi	$(RM) $(OBJS) $(LINTFILES)
717c478bd9Sstevel@tonic-gate
727c478bd9Sstevel@tonic-gateclobber: clean
737c478bd9Sstevel@tonic-gate	$(RM) $(PROG)
747c478bd9Sstevel@tonic-gate
757aec1d6eScindi%.ln: ../common/%.c
767aec1d6eScindi	$(LINT.c) -c $<
777aec1d6eScindi
787aec1d6eScindi%.ln: %.c
797aec1d6eScindi	$(LINT.c) -c $<
807c478bd9Sstevel@tonic-gate
817aec1d6eScindilint: $(LINTFILES)
827aec1d6eScindi	$(LINT) $(LINTFLAGS) $(LINTFILES)
837c478bd9Sstevel@tonic-gate
847aec1d6eScindi$(ROOTLIBFMD)/%: %
857c478bd9Sstevel@tonic-gate	$(INS.file)
867c478bd9Sstevel@tonic-gate
877aec1d6eScindiinstall_h:
887aec1d6eScindi
897aec1d6eScindiinstall: all $(ROOTPROG)
90