14581Ssherrym# 24581Ssherrym# CDDL HEADER START 34581Ssherrym# 44581Ssherrym# The contents of this file are subject to the terms of the 54581Ssherrym# Common Development and Distribution License (the "License"). 64581Ssherrym# You may not use this file except in compliance with the License. 74581Ssherrym# 84581Ssherrym# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 94581Ssherrym# or http://www.opensolaris.org/os/licensing. 104581Ssherrym# See the License for the specific language governing permissions 114581Ssherrym# and limitations under the License. 124581Ssherrym# 134581Ssherrym# When distributing Covered Code, include this CDDL HEADER in each 144581Ssherrym# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 154581Ssherrym# If applicable, add the following below this CDDL HEADER, with the 164581Ssherrym# fields enclosed by brackets "[]" replaced with your own identifying 174581Ssherrym# information: Portions Copyright [yyyy] [name of copyright owner] 184581Ssherrym# 194581Ssherrym# CDDL HEADER END 204581Ssherrym# 214581Ssherrym# 22*8647SMark.Johnson@Sun.COM# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 234581Ssherrym# Use is subject to license terms. 244581Ssherrym# 254581Ssherrym 264581SsherrymPROG = ucodeadm 274581Ssherrym 284581SsherrymPROG_OBJS = ucodeadm.o ucode_errno.o 294581SsherrymCOMMON_OBJS = ucode_utils.o 304581SsherrymOBJS = $(PROG_OBJS) $(COMMON_OBJS) 314581SsherrymCOMMON_SRCDIR = ../../common/ucode 324581SsherrymERROR_HEADER = $(COMMON_SRCDIR)/ucode_errno.h 334581SsherrymSRCS = $(PROG_OBJS:%.o=%.c) $(COMMON_OBJS:%.o=$(COMMON_SRCDIR)/%.c) 344581Ssherrym 354581Ssherryminclude ../Makefile.cmd 364581Ssherrym 374581SsherrymPOFILE = ucodeadm_all.po 384581SsherrymPOFILES = $(PROG_OBJS:%.o=%.po) 394581Ssherrym 404581SsherrymINTEL_UCODE_FILE = intel-ucode.txt 41*8647SMark.Johnson@Sun.COMAMD_UCODE_FILE = amd-ucode.bin 424581Ssherrym 434581SsherrymROOTUCODEPATH = $(ROOT)/platform/i86pc/ucode 444581SsherrymROOTINTELUCODE = $(INTEL_UCODE_FILE:%=$(ROOTUCODEPATH)/%) 45*8647SMark.Johnson@Sun.COMROOTAMDUCODE = $(AMD_UCODE_FILE:%=$(ROOTUCODEPATH)/%) 464581Ssherrym 474581SsherrymCPPFLAGS = -I../../common -I../../uts/common 484581SsherrymCFLAGS += -v 494581SsherrymLINTFLAGS += -errtags -erroff=E_NAME_DEF_NOT_USED2 504581SsherrymLINTFLAGS += -erroff=E_INCONS_ARG_DECL2,E_INCONS_VAL_TYPE_DECL2 514581SsherrymLDLIBS = -lgen 524581Ssherrym 534581SsherrymDIRMODE = 0755 544581SsherrymFILEMODE = 0555 554581Ssherrym 564581Ssherrym$(ROOTINTELUCODE) := FILEMODE = 0444 57*8647SMark.Johnson@Sun.COM$(ROOTAMDUCODE) := FILEMODE = 0444 584581Ssherrym 594581Ssherryminstall := TARGET = install 604581Ssherrymclobber := TARGET = clobber 614581Ssherrym 624581SsherrymCLEANFILES += $(PROG) $(OBJS) ucode_errno.c $(POFILES) $(POFILE) 634581Ssherrym 644581Ssherrym.KEEP_STATE: 654581Ssherrym 664581Ssherrymall: $(PROG) 674581Ssherrym 68*8647SMark.Johnson@Sun.COMinstall: all $(ROOTUSRSBINPROG) $(ROOTUCODEPATH) $(ROOTINTELUCODE) $(ROOTAMDUCODE) 694581Ssherrym 704581Ssherrym_msg: ucodeadm_all.po 714581Ssherrym 724581Ssherrym%.o: $(COMMON_SRCDIR)/%.c 734581Ssherrym $(COMPILE.c) -o $@ $< 744581Ssherrym $(POST_PROCESS_O) 754581Ssherrym 764581Ssherrym$(PROG): $(OBJS) ucode_errno.c 774581Ssherrym $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS) 784581Ssherrym $(POST_PROCESS) 794581Ssherrym 804581Ssherrym$(ROOTUCODEPATH): 814581Ssherrym $(INS.dir) 824581Ssherrym 834581Ssherrym$(ROOTUCODEPATH)/%: % 844581Ssherrym $(INS.file) 854581Ssherrym 864581Ssherrymclean: 874581Ssherrym -$(RM) $(CLEANFILES) 884581Ssherrym 894581Ssherrymlint: lint_SRCS 904581Ssherrym 914581Ssherrym 924581Ssherryminclude ../Makefile.targ 934581Ssherrym 944581Ssherrymucode_errno.c: $(COMMON_SRCDIR)/mkerrno.sh $(ERROR_HEADER) 954581Ssherrym sh $(COMMON_SRCDIR)/mkerrno.sh $(ERROR_HEADER) > $@ 964581Ssherrym 974581Ssherrymucode_errno.po := XGETFLAGS += -a 984581Ssherrym 994581Ssherrym$(POFILE): $(POFILES) 1004581Ssherrym $(RM) $@ 1014581Ssherrym $(CAT) $(POFILES) > $@ 1024581Ssherrym 1034581SsherrymFRC: 104