xref: /illumos-gate/usr/src/cmd/fm/mcdecode/Makefile (revision eb00b1c8a31c2253a353644606388dff5b0e0275)
1*eb00b1c8SRobert Mustacchi#
2*eb00b1c8SRobert Mustacchi# This file and its contents are supplied under the terms of the
3*eb00b1c8SRobert Mustacchi# Common Development and Distribution License ("CDDL"), version 1.0.
4*eb00b1c8SRobert Mustacchi# You may only use this file in accordance with the terms of version
5*eb00b1c8SRobert Mustacchi# 1.0 of the CDDL.
6*eb00b1c8SRobert Mustacchi#
7*eb00b1c8SRobert Mustacchi# A full copy of the text of the CDDL should have accompanied this
8*eb00b1c8SRobert Mustacchi# source.  A copy of the CDDL is also available via the Internet at
9*eb00b1c8SRobert Mustacchi# http://www.illumos.org/license/CDDL.
10*eb00b1c8SRobert Mustacchi#
11*eb00b1c8SRobert Mustacchi
12*eb00b1c8SRobert Mustacchi#
13*eb00b1c8SRobert Mustacchi# Copyright 2019 Joyent, Inc.
14*eb00b1c8SRobert Mustacchi#
15*eb00b1c8SRobert Mustacchi
16*eb00b1c8SRobert Mustacchiinclude ../../Makefile.cmd
17*eb00b1c8SRobert Mustacchiinclude ../../Makefile.ctf
18*eb00b1c8SRobert Mustacchi
19*eb00b1c8SRobert MustacchiSRCS += mcdecode.c imc_decode.o imc_dump.o
20*eb00b1c8SRobert MustacchiOBJS = $(SRCS:%.c=%.o)
21*eb00b1c8SRobert Mustacchi
22*eb00b1c8SRobert MustacchiPROG = mcdecode
23*eb00b1c8SRobert Mustacchi
24*eb00b1c8SRobert MustacchiROOTLIBFM = $(ROOT)/usr/lib/fm
25*eb00b1c8SRobert MustacchiROOTLIBFMD = $(ROOT)/usr/lib/fm/fmd
26*eb00b1c8SRobert MustacchiROOTPROG = $(ROOTLIBFMD)/$(PROG)
27*eb00b1c8SRobert Mustacchi
28*eb00b1c8SRobert Mustacchi$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
29*eb00b1c8SRobert MustacchiCPPFLAGS += -I$(SRC)/uts/i86pc/io/imc
30*eb00b1c8SRobert MustacchiLDLIBS += -lnvpair
31*eb00b1c8SRobert Mustacchi
32*eb00b1c8SRobert MustacchiCSTD = $(CSTD_GNU99)
33*eb00b1c8SRobert Mustacchi
34*eb00b1c8SRobert Mustacchiall: $(PROG)
35*eb00b1c8SRobert Mustacchi
36*eb00b1c8SRobert Mustacchi$(PROG): $(OBJS)
37*eb00b1c8SRobert Mustacchi	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
38*eb00b1c8SRobert Mustacchi	$(POST_PROCESS)
39*eb00b1c8SRobert Mustacchi
40*eb00b1c8SRobert Mustacchi%.o: %.c
41*eb00b1c8SRobert Mustacchi	$(COMPILE.c) $<
42*eb00b1c8SRobert Mustacchi	$(POST_PROCESS_O)
43*eb00b1c8SRobert Mustacchi
44*eb00b1c8SRobert Mustacchi%.o: $(SRC)/common/mc/imc/%.c
45*eb00b1c8SRobert Mustacchi	$(COMPILE.c) $<
46*eb00b1c8SRobert Mustacchi	$(POST_PROCESS_O)
47*eb00b1c8SRobert Mustacchi
48*eb00b1c8SRobert Mustacchiclean:
49*eb00b1c8SRobert Mustacchi	$(RM) $(OBJS) $(LINTFILES)
50*eb00b1c8SRobert Mustacchi
51*eb00b1c8SRobert Mustacchiclobber: clean
52*eb00b1c8SRobert Mustacchi	$(RM) $(PROG)
53*eb00b1c8SRobert Mustacchi
54*eb00b1c8SRobert Mustacchi$(ROOTLIBFMD)/%: %
55*eb00b1c8SRobert Mustacchi	$(INS.file)
56*eb00b1c8SRobert Mustacchi
57*eb00b1c8SRobert Mustacchiinstall_h:
58*eb00b1c8SRobert Mustacchi
59*eb00b1c8SRobert Mustacchiinstall: all $(ROOTPROG)
60