Makefile revision 0ba6f73dcd1c9160a44b2872ed0e0d81b51d168f
2N/A#
2N/A# CDDL HEADER START
2N/A#
2N/A# The contents of this file are subject to the terms of the
2N/A# Common Development and Distribution License (the "License").
2N/A# You may not use this file except in compliance with the License.
2N/A#
2N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A# or http://www.opensolaris.org/os/licensing.
2N/A# See the License for the specific language governing permissions
2N/A# and limitations under the License.
2N/A#
2N/A# When distributing Covered Code, include this CDDL HEADER in each
2N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A# If applicable, add the following below this CDDL HEADER, with the
2N/A# fields enclosed by brackets "[]" replaced with your own identifying
2N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2N/A#
2N/A# CDDL HEADER END
2N/A#
2N/A#
2N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
2N/A# Use is subject to license terms.
2N/A#
2N/A
2N/APROG = ucodeadm
2N/A
2N/APROG_OBJS = ucodeadm.o ucode_errno.o
2N/ACOMMON_OBJS = ucode_utils.o
2N/AOBJS = $(PROG_OBJS) $(COMMON_OBJS)
2N/ACOMMON_SRCDIR = ../../common/ucode
2N/AERROR_HEADER = $(COMMON_SRCDIR)/ucode_errno.h
2N/ASRCS = $(PROG_OBJS:%.o=%.c) $(COMMON_OBJS:%.o=$(COMMON_SRCDIR)/%.c)
2N/A
2N/Ainclude ../Makefile.cmd
2N/A
2N/APOFILE = ucodeadm_all.po
2N/APOFILES = $(PROG_OBJS:%.o=%.po)
2N/A
2N/AINTEL_UCODE_FILE = intel-ucode.txt
2N/AAMD_UCODE_FILE = amd-ucode.bin
2N/A
2N/AROOTUCODEPATH = $(ROOT)/platform/i86pc/ucode
2N/AROOTINTELUCODE = $(INTEL_UCODE_FILE:%=$(ROOTUCODEPATH)/%)
2N/AROOTAMDUCODE = $(AMD_UCODE_FILE:%=$(ROOTUCODEPATH)/%)
2N/A
2N/ACPPFLAGS = -I../../common -I../../uts/common
2N/ACFLAGS += -v
2N/ALINTFLAGS += -errtags -erroff=E_NAME_DEF_NOT_USED2
2N/ALINTFLAGS += -erroff=E_INCONS_ARG_DECL2,E_INCONS_VAL_TYPE_DECL2
2N/ALDLIBS = -lgen
2N/A
2N/ADIRMODE = 0755
2N/AFILEMODE = 0555
2N/AOWNER = root
2N/AGROUP = sys
2N/A
2N/A$(ROOTINTELUCODE) := FILEMODE = 0444
2N/A$(ROOTAMDUCODE) := FILEMODE = 0444
2N/A
2N/Ainstall := TARGET = install
2N/Aclobber := TARGET = clobber
2N/A
2N/ACLEANFILES += $(PROG) $(OBJS) ucode_errno.c $(POFILES) $(POFILE)
2N/A
2N/A.KEEP_STATE:
2N/A
2N/Aall: $(PROG)
2N/A
2N/Ainstall: all $(ROOTUSRSBINPROG) $(ROOTUCODEPATH) $(ROOTINTELUCODE) $(ROOTAMDUCODE)
_msg: ucodeadm_all.po
%.o: $(COMMON_SRCDIR)/%.c
$(COMPILE.c) -o $@ $<
$(POST_PROCESS_O)
$(PROG): $(OBJS) ucode_errno.c
$(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
$(POST_PROCESS)
$(ROOTUCODEPATH):
$(INS.dir)
$(ROOTUCODEPATH)/%: %
$(INS.file)
clean:
-$(RM) $(CLEANFILES)
lint: lint_SRCS
include ../Makefile.targ
ucode_errno.c: $(COMMON_SRCDIR)/mkerrno.sh $(ERROR_HEADER)
sh $(COMMON_SRCDIR)/mkerrno.sh $(ERROR_HEADER) > $@
ucode_errno.po := XGETFLAGS += -a
$(POFILE): $(POFILES)
$(RM) $@
$(CAT) $(POFILES) > $@
FRC: