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. 2602dc24bdSAndrew Stormont# 272449e17fSsherrym 282449e17fSsherrymPROG = ucodeadm 292449e17fSsherrym 302449e17fSsherrymPROG_OBJS = ucodeadm.o ucode_errno.o 312449e17fSsherrymCOMMON_OBJS = ucode_utils.o 322449e17fSsherrymOBJS = $(PROG_OBJS) $(COMMON_OBJS) 332449e17fSsherrymCOMMON_SRCDIR = ../../common/ucode 342449e17fSsherrymERROR_HEADER = $(COMMON_SRCDIR)/ucode_errno.h 352449e17fSsherrymSRCS = $(PROG_OBJS:%.o=%.c) $(COMMON_OBJS:%.o=$(COMMON_SRCDIR)/%.c) 362449e17fSsherrym 372449e17fSsherryminclude ../Makefile.cmd 382449e17fSsherrym 392449e17fSsherrymPOFILE = ucodeadm_all.po 402449e17fSsherrymPOFILES = $(PROG_OBJS:%.o=%.po) 412449e17fSsherrym 422449e17fSsherrymCPPFLAGS = -I../../common -I../../uts/common 437014882cSRichard LoweCFLAGS += $(CCVERBOSE) 44d3b5f563SJohn LevonCERRWARN += $(CNOWARN_UNINIT) 457014882cSRichard LoweCERRWARN += -_gcc=-Wno-type-limits 462449e17fSsherrymLINTFLAGS += -errtags -erroff=E_NAME_DEF_NOT_USED2 472449e17fSsherrymLINTFLAGS += -erroff=E_INCONS_ARG_DECL2,E_INCONS_VAL_TYPE_DECL2 4802dc24bdSAndrew StormontLDLIBS += -lgen 492449e17fSsherrym 502449e17fSsherrymDIRMODE = 0755 512449e17fSsherrymFILEMODE = 0555 522449e17fSsherrym 532449e17fSsherryminstall := TARGET = install 542449e17fSsherrymclobber := TARGET = clobber 552449e17fSsherrym 562449e17fSsherrymCLEANFILES += $(PROG) $(OBJS) ucode_errno.c $(POFILES) $(POFILE) 572449e17fSsherrym 582449e17fSsherrym.KEEP_STATE: 592449e17fSsherrym 602449e17fSsherrymall: $(PROG) 612449e17fSsherrym 62*55908bd7SJohn Levoninstall: all $(ROOTUSRSBINPROG) 632449e17fSsherrym 642449e17fSsherrym_msg: ucodeadm_all.po 652449e17fSsherrym 662449e17fSsherrym%.o: $(COMMON_SRCDIR)/%.c 672449e17fSsherrym $(COMPILE.c) -o $@ $< 682449e17fSsherrym $(POST_PROCESS_O) 692449e17fSsherrym 702449e17fSsherrym$(PROG): $(OBJS) ucode_errno.c 712449e17fSsherrym $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS) 722449e17fSsherrym $(POST_PROCESS) 732449e17fSsherrym 742449e17fSsherrymclean: 752449e17fSsherrym -$(RM) $(CLEANFILES) 762449e17fSsherrym 772449e17fSsherrymlint: lint_SRCS 782449e17fSsherrym 792449e17fSsherrym 802449e17fSsherryminclude ../Makefile.targ 812449e17fSsherrym 822449e17fSsherrymucode_errno.c: $(COMMON_SRCDIR)/mkerrno.sh $(ERROR_HEADER) 832449e17fSsherrym sh $(COMMON_SRCDIR)/mkerrno.sh $(ERROR_HEADER) > $@ 842449e17fSsherrym 852449e17fSsherrymucode_errno.po := XGETFLAGS += -a 862449e17fSsherrym 872449e17fSsherrym$(POFILE): $(POFILES) 882449e17fSsherrym $(RM) $@ 892449e17fSsherrym $(CAT) $(POFILES) > $@ 902449e17fSsherrym 912449e17fSsherrymFRC: 92