1eb00b1c8SRobert Mustacchi# 2eb00b1c8SRobert Mustacchi# This file and its contents are supplied under the terms of the 3eb00b1c8SRobert Mustacchi# Common Development and Distribution License ("CDDL"), version 1.0. 4eb00b1c8SRobert Mustacchi# You may only use this file in accordance with the terms of version 5eb00b1c8SRobert Mustacchi# 1.0 of the CDDL. 6eb00b1c8SRobert Mustacchi# 7eb00b1c8SRobert Mustacchi# A full copy of the text of the CDDL should have accompanied this 8eb00b1c8SRobert Mustacchi# source. A copy of the CDDL is also available via the Internet at 9eb00b1c8SRobert Mustacchi# http://www.illumos.org/license/CDDL. 10eb00b1c8SRobert Mustacchi# 11eb00b1c8SRobert Mustacchi 12eb00b1c8SRobert Mustacchi# 13eb00b1c8SRobert Mustacchi# Copyright 2019 Joyent, Inc. 14*dd23d762SRobert Mustacchi# Copyright 2023 Oxide Computer Company 15eb00b1c8SRobert Mustacchi# 16eb00b1c8SRobert Mustacchi 17eb00b1c8SRobert Mustacchiinclude ../../Makefile.cmd 18eb00b1c8SRobert Mustacchiinclude ../../Makefile.ctf 19eb00b1c8SRobert Mustacchi 2071815ce7SRobert MustacchiSRCS += mcdecode.c imc_decode.c imc_dump.c 2171815ce7SRobert MustacchiSRCS += zen_fabric_utils.c zen_umc_decode.c zen_umc_dump.c bitext.o 22eb00b1c8SRobert MustacchiOBJS = $(SRCS:%.c=%.o) 23eb00b1c8SRobert Mustacchi 24eb00b1c8SRobert MustacchiPROG = mcdecode 25eb00b1c8SRobert Mustacchi 26eb00b1c8SRobert MustacchiROOTLIBFM = $(ROOT)/usr/lib/fm 27eb00b1c8SRobert MustacchiROOTLIBFMD = $(ROOT)/usr/lib/fm/fmd 28eb00b1c8SRobert MustacchiROOTPROG = $(ROOTLIBFMD)/$(PROG) 29eb00b1c8SRobert Mustacchi 30eb00b1c8SRobert Mustacchi$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG 3174079a53SRobert MustacchiCPPFLAGS += -I$(SRC)/uts/intel/io/imc 3271815ce7SRobert MustacchiCPPFLAGS += -I$(SRC)/uts/intel/io/amdzen -I$(SRC)/uts/intel 33eb00b1c8SRobert MustacchiLDLIBS += -lnvpair 34eb00b1c8SRobert Mustacchi 35eb00b1c8SRobert MustacchiCSTD = $(CSTD_GNU99) 36eb00b1c8SRobert Mustacchi 37eb00b1c8SRobert Mustacchiall: $(PROG) 38eb00b1c8SRobert Mustacchi 39eb00b1c8SRobert Mustacchi$(PROG): $(OBJS) 40eb00b1c8SRobert Mustacchi $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 41eb00b1c8SRobert Mustacchi $(POST_PROCESS) 42eb00b1c8SRobert Mustacchi 43eb00b1c8SRobert Mustacchi%.o: %.c 44eb00b1c8SRobert Mustacchi $(COMPILE.c) $< 45eb00b1c8SRobert Mustacchi $(POST_PROCESS_O) 46eb00b1c8SRobert Mustacchi 4771815ce7SRobert Mustacchi%.o: $(SRC)/common/bitext/%.c 4871815ce7SRobert Mustacchi $(COMPILE.c) $< 4971815ce7SRobert Mustacchi $(POST_PROCESS_O) 5071815ce7SRobert Mustacchi 51eb00b1c8SRobert Mustacchi%.o: $(SRC)/common/mc/imc/%.c 52eb00b1c8SRobert Mustacchi $(COMPILE.c) $< 53eb00b1c8SRobert Mustacchi $(POST_PROCESS_O) 54eb00b1c8SRobert Mustacchi 5571815ce7SRobert Mustacchi%.o: $(SRC)/common/mc/zen_umc/%.c 5671815ce7SRobert Mustacchi $(COMPILE.c) $< 5771815ce7SRobert Mustacchi $(POST_PROCESS_O) 5871815ce7SRobert Mustacchi 59*dd23d762SRobert Mustacchi%.o: $(SRC)/common/amdzen/%.c 60*dd23d762SRobert Mustacchi $(COMPILE.c) $< 61*dd23d762SRobert Mustacchi $(POST_PROCESS_O) 62*dd23d762SRobert Mustacchi 63eb00b1c8SRobert Mustacchiclean: 64eb00b1c8SRobert Mustacchi $(RM) $(OBJS) $(LINTFILES) 65eb00b1c8SRobert Mustacchi 66eb00b1c8SRobert Mustacchiclobber: clean 67eb00b1c8SRobert Mustacchi $(RM) $(PROG) 68eb00b1c8SRobert Mustacchi 69eb00b1c8SRobert Mustacchi$(ROOTLIBFMD)/%: % 70eb00b1c8SRobert Mustacchi $(INS.file) 71eb00b1c8SRobert Mustacchi 72eb00b1c8SRobert Mustacchiinstall_h: 73eb00b1c8SRobert Mustacchi 74eb00b1c8SRobert Mustacchiinstall: all $(ROOTPROG) 75