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