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. 26*ada023d2SAndy Fiddaman# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. 2702dc24bdSAndrew Stormont# 282449e17fSsherrym 292449e17fSsherrymPROG = ucodeadm 302449e17fSsherrym 312449e17fSsherrymPROG_OBJS = ucodeadm.o ucode_errno.o 322449e17fSsherrymCOMMON_OBJS = ucode_utils.o 332449e17fSsherrymOBJS = $(PROG_OBJS) $(COMMON_OBJS) 342449e17fSsherrymCOMMON_SRCDIR = ../../common/ucode 352449e17fSsherrymERROR_HEADER = $(COMMON_SRCDIR)/ucode_errno.h 362449e17fSsherrymSRCS = $(PROG_OBJS:%.o=%.c) $(COMMON_OBJS:%.o=$(COMMON_SRCDIR)/%.c) 372449e17fSsherrym 382449e17fSsherryminclude ../Makefile.cmd 39*ada023d2SAndy Fiddamaninclude ../Makefile.ctf 402449e17fSsherrym 412449e17fSsherrymPOFILE = ucodeadm_all.po 422449e17fSsherrymPOFILES = $(PROG_OBJS:%.o=%.po) 432449e17fSsherrym 442449e17fSsherrymCPPFLAGS = -I../../common -I../../uts/common 457014882cSRichard LoweCFLAGS += $(CCVERBOSE) 46d3b5f563SJohn LevonCERRWARN += $(CNOWARN_UNINIT) 477014882cSRichard LoweCERRWARN += -_gcc=-Wno-type-limits 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 6255908bd7SJohn 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 772449e17fSsherryminclude ../Makefile.targ 782449e17fSsherrym 792449e17fSsherrymucode_errno.c: $(COMMON_SRCDIR)/mkerrno.sh $(ERROR_HEADER) 802449e17fSsherrym sh $(COMMON_SRCDIR)/mkerrno.sh $(ERROR_HEADER) > $@ 812449e17fSsherrym 822449e17fSsherrymucode_errno.po := XGETFLAGS += -a 832449e17fSsherrym 842449e17fSsherrym$(POFILE): $(POFILES) 852449e17fSsherrym $(RM) $@ 862449e17fSsherrym $(CAT) $(POFILES) > $@ 872449e17fSsherrym 882449e17fSsherrymFRC: 89