1*2449e17fSsherrym# 2*2449e17fSsherrym# CDDL HEADER START 3*2449e17fSsherrym# 4*2449e17fSsherrym# The contents of this file are subject to the terms of the 5*2449e17fSsherrym# Common Development and Distribution License (the "License"). 6*2449e17fSsherrym# You may not use this file except in compliance with the License. 7*2449e17fSsherrym# 8*2449e17fSsherrym# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*2449e17fSsherrym# or http://www.opensolaris.org/os/licensing. 10*2449e17fSsherrym# See the License for the specific language governing permissions 11*2449e17fSsherrym# and limitations under the License. 12*2449e17fSsherrym# 13*2449e17fSsherrym# When distributing Covered Code, include this CDDL HEADER in each 14*2449e17fSsherrym# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*2449e17fSsherrym# If applicable, add the following below this CDDL HEADER, with the 16*2449e17fSsherrym# fields enclosed by brackets "[]" replaced with your own identifying 17*2449e17fSsherrym# information: Portions Copyright [yyyy] [name of copyright owner] 18*2449e17fSsherrym# 19*2449e17fSsherrym# CDDL HEADER END 20*2449e17fSsherrym# 21*2449e17fSsherrym# 22*2449e17fSsherrym# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23*2449e17fSsherrym# Use is subject to license terms. 24*2449e17fSsherrym# 25*2449e17fSsherrym# ident "%Z%%M% %I% %E% SMI" 26*2449e17fSsherrym# 27*2449e17fSsherrym 28*2449e17fSsherrymPROG = ucodeadm 29*2449e17fSsherrym 30*2449e17fSsherrymPROG_OBJS = ucodeadm.o ucode_errno.o 31*2449e17fSsherrymCOMMON_OBJS = ucode_utils.o 32*2449e17fSsherrymOBJS = $(PROG_OBJS) $(COMMON_OBJS) 33*2449e17fSsherrymCOMMON_SRCDIR = ../../common/ucode 34*2449e17fSsherrymERROR_HEADER = $(COMMON_SRCDIR)/ucode_errno.h 35*2449e17fSsherrymSRCS = $(PROG_OBJS:%.o=%.c) $(COMMON_OBJS:%.o=$(COMMON_SRCDIR)/%.c) 36*2449e17fSsherrym 37*2449e17fSsherryminclude ../Makefile.cmd 38*2449e17fSsherrym 39*2449e17fSsherrymPOFILE = ucodeadm_all.po 40*2449e17fSsherrymPOFILES = $(PROG_OBJS:%.o=%.po) 41*2449e17fSsherrym 42*2449e17fSsherrymINTEL_UCODE_FILE = intel-ucode.txt 43*2449e17fSsherrymAMD_UCODE_FILE = amd-ucode.txt 44*2449e17fSsherrym 45*2449e17fSsherrymROOTUCODEPATH = $(ROOT)/platform/i86pc/ucode 46*2449e17fSsherrymROOTINTELUCODE = $(INTEL_UCODE_FILE:%=$(ROOTUCODEPATH)/%) 47*2449e17fSsherrym 48*2449e17fSsherrymCPPFLAGS = -I../../common -I../../uts/common 49*2449e17fSsherrymCFLAGS += -v 50*2449e17fSsherrymLINTFLAGS += -errtags -erroff=E_NAME_DEF_NOT_USED2 51*2449e17fSsherrymLINTFLAGS += -erroff=E_INCONS_ARG_DECL2,E_INCONS_VAL_TYPE_DECL2 52*2449e17fSsherrymLDLIBS = -lgen 53*2449e17fSsherrym 54*2449e17fSsherrymDIRMODE = 0755 55*2449e17fSsherrymFILEMODE = 0555 56*2449e17fSsherrymOWNER = root 57*2449e17fSsherrymGROUP = sys 58*2449e17fSsherrym 59*2449e17fSsherrym$(ROOTINTELUCODE) := FILEMODE = 0444 60*2449e17fSsherrym 61*2449e17fSsherryminstall := TARGET = install 62*2449e17fSsherrymclobber := TARGET = clobber 63*2449e17fSsherrym 64*2449e17fSsherrymCLEANFILES += $(PROG) $(OBJS) ucode_errno.c $(POFILES) $(POFILE) 65*2449e17fSsherrym 66*2449e17fSsherrym.KEEP_STATE: 67*2449e17fSsherrym 68*2449e17fSsherrymall: $(PROG) 69*2449e17fSsherrym 70*2449e17fSsherryminstall: all $(ROOTUSRSBINPROG) $(ROOTUCODEPATH) $(ROOTINTELUCODE) 71*2449e17fSsherrym 72*2449e17fSsherrym_msg: ucodeadm_all.po 73*2449e17fSsherrym 74*2449e17fSsherrym%.o: $(COMMON_SRCDIR)/%.c 75*2449e17fSsherrym $(COMPILE.c) -o $@ $< 76*2449e17fSsherrym $(POST_PROCESS_O) 77*2449e17fSsherrym 78*2449e17fSsherrym$(PROG): $(OBJS) ucode_errno.c 79*2449e17fSsherrym $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS) 80*2449e17fSsherrym $(POST_PROCESS) 81*2449e17fSsherrym 82*2449e17fSsherrym$(ROOTUCODEPATH): 83*2449e17fSsherrym $(INS.dir) 84*2449e17fSsherrym 85*2449e17fSsherrym$(ROOTUCODEPATH)/%: % 86*2449e17fSsherrym $(INS.file) 87*2449e17fSsherrym 88*2449e17fSsherrymclean: 89*2449e17fSsherrym -$(RM) $(CLEANFILES) 90*2449e17fSsherrym 91*2449e17fSsherrymlint: lint_SRCS 92*2449e17fSsherrym 93*2449e17fSsherrym 94*2449e17fSsherryminclude ../Makefile.targ 95*2449e17fSsherrym 96*2449e17fSsherrymucode_errno.c: $(COMMON_SRCDIR)/mkerrno.sh $(ERROR_HEADER) 97*2449e17fSsherrym sh $(COMMON_SRCDIR)/mkerrno.sh $(ERROR_HEADER) > $@ 98*2449e17fSsherrym 99*2449e17fSsherrymucode_errno.po := XGETFLAGS += -a 100*2449e17fSsherrym 101*2449e17fSsherrym$(POFILE): $(POFILES) 102*2449e17fSsherrym $(RM) $@ 103*2449e17fSsherrym $(CAT) $(POFILES) > $@ 104*2449e17fSsherrym 105*2449e17fSsherrymFRC: 106