12449e17fSsherrym# 22449e17fSsherrym# CDDL HEADER START 32449e17fSsherrym# 42449e17fSsherrym# The contents of this file are subject to the terms of the 52449e17fSsherrym# Common Development and Distribution License (the "License"). 62449e17fSsherrym# You may not use this file except in compliance with the License. 72449e17fSsherrym# 82449e17fSsherrym# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 92449e17fSsherrym# or http://www.opensolaris.org/os/licensing. 102449e17fSsherrym# See the License for the specific language governing permissions 112449e17fSsherrym# and limitations under the License. 122449e17fSsherrym# 132449e17fSsherrym# When distributing Covered Code, include this CDDL HEADER in each 142449e17fSsherrym# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 152449e17fSsherrym# If applicable, add the following below this CDDL HEADER, with the 162449e17fSsherrym# fields enclosed by brackets "[]" replaced with your own identifying 172449e17fSsherrym# information: Portions Copyright [yyyy] [name of copyright owner] 182449e17fSsherrym# 192449e17fSsherrym# CDDL HEADER END 202449e17fSsherrym# 212449e17fSsherrym# 220ba6f73dSMark Johnson# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 232449e17fSsherrym# Use is subject to license terms. 242449e17fSsherrym# 2502dc24bdSAndrew Stormont# Copyright 2017 RackTop Systems. 26be672c8eSAndy Fiddaman# Copyright 2022 OmniOS Community Edition (OmniOSce) Association. 27*d32f26eeSAndy Fiddaman# Copyright 2023 Oxide Computer Company 2802dc24bdSAndrew Stormont# 292449e17fSsherrym 302449e17fSsherrymPROG = ucodeadm 312449e17fSsherrym 322449e17fSsherrymPROG_OBJS = ucodeadm.o ucode_errno.o 33*d32f26eeSAndy FiddamanCOMMON_OBJS = ucode_utils_intel.o ucode_utils_amd.o 342449e17fSsherrymOBJS = $(PROG_OBJS) $(COMMON_OBJS) 352449e17fSsherrymCOMMON_SRCDIR = ../../common/ucode 362449e17fSsherrymERROR_HEADER = $(COMMON_SRCDIR)/ucode_errno.h 372449e17fSsherrym 382449e17fSsherryminclude ../Makefile.cmd 39ada023d2SAndy Fiddamaninclude ../Makefile.ctf 402449e17fSsherrym 412449e17fSsherrymPOFILE = ucodeadm_all.po 422449e17fSsherrymPOFILES = $(PROG_OBJS:%.o=%.po) 432449e17fSsherrym 44be672c8eSAndy FiddamanCSTD = $(GNU_C99) 45763f1f5fSRichard LoweCPPFLAGS += -I$(SRC)/common 467014882cSRichard LoweCFLAGS += $(CCVERBOSE) 4702dc24bdSAndrew StormontLDLIBS += -lgen 482449e17fSsherrym 492449e17fSsherrymDIRMODE = 0755 502449e17fSsherrymFILEMODE = 0555 512449e17fSsherrym 522449e17fSsherryminstall := TARGET = install 532449e17fSsherrymclobber := TARGET = clobber 542449e17fSsherrym 552449e17fSsherrymCLEANFILES += $(PROG) $(OBJS) ucode_errno.c $(POFILES) $(POFILE) 562449e17fSsherrym 572449e17fSsherrym.KEEP_STATE: 582449e17fSsherrym 592449e17fSsherrymall: $(PROG) 602449e17fSsherrym 6155908bd7SJohn Levoninstall: all $(ROOTUSRSBINPROG) 622449e17fSsherrym 632449e17fSsherrym_msg: ucodeadm_all.po 642449e17fSsherrym 652449e17fSsherrym%.o: $(COMMON_SRCDIR)/%.c 662449e17fSsherrym $(COMPILE.c) -o $@ $< 672449e17fSsherrym $(POST_PROCESS_O) 682449e17fSsherrym 692449e17fSsherrym$(PROG): $(OBJS) ucode_errno.c 702449e17fSsherrym $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS) 712449e17fSsherrym $(POST_PROCESS) 722449e17fSsherrym 732449e17fSsherrymclean: 742449e17fSsherrym -$(RM) $(CLEANFILES) 752449e17fSsherrym 762449e17fSsherryminclude ../Makefile.targ 772449e17fSsherrym 782449e17fSsherrymucode_errno.c: $(COMMON_SRCDIR)/mkerrno.sh $(ERROR_HEADER) 792449e17fSsherrym sh $(COMMON_SRCDIR)/mkerrno.sh $(ERROR_HEADER) > $@ 802449e17fSsherrym 812449e17fSsherrymucode_errno.po := XGETFLAGS += -a 822449e17fSsherrym 832449e17fSsherrym$(POFILE): $(POFILES) 842449e17fSsherrym $(RM) $@ 852449e17fSsherrym $(CAT) $(POFILES) > $@ 862449e17fSsherrym 872449e17fSsherrymFRC: 88