1N/A# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
1N/A# Use is subject to license terms.
1N/A# ident "%Z%%M% %I% %E% SMI"
1N/AINCLUDES = -I. -I.. -I../lib -I../docs
1N/A# Build these only if the OPTION_UTILS on is on (blank).
1N/A$(OPTION_UTILS)PROGRAMS = mbchk
1N/A# Build these only if the OPTION_UTILS on is on (blank).
1N/A$(OPTION_UTILS)INSTALL_SCRIPTS = grub-install \
1N/A# Won't be installed.
1N/A$(OPTION_UTILS)NOINSTALL_SCRIPTS = grub-image
1N/ASCRIPTS = $(INSTALL_SCRIPTS) $(NOINSTALL_SCRIPTS)
1N/AINSTALL_BINDIR = $(ROOT_PLAT_GRUB)/bin
1N/AINSTALL_SBINDIR = $(ROOT_PLAT_GRUB)/sbin
1N/AINSTALL_TARGETS = $(PROGRAMS:%=$(INSTALL_BINDIR)/%) \
1N/A $(INSTALL_SCRIPTS:%=$(INSTALL_SBINDIR)/%)
1N/A$(INSTALL_BINDIR)/% := FILEMODE = 0555
1N/A$(INSTALL_SBINDIR)/% := FILEMODE = 0555
1N/A# Source files to be installed in $(SRC_DIR).
1N/ASRC_DIR = $(ROOT_SRC)/util
1N/AINSTALL_TARGETS += $(SRC_FILES:%=$(SRC_DIR)/%)
1N/Aall: $(PROGRAMS) $(SCRIPTS)
1N/A $(LINK) -o $@ $@.o $(LIBCOMMON)
1N/Ainstall: all $(INSTALL_TARGETS)
1N/A$(INSTALL_BINDIR)/%: $(INSTALL_BINDIR) %
1N/A$(INSTALL_SBINDIR)/%: $(INSTALL_SBINDIR) %
1N/A$(SRC_DIR)/%: $(SRC_DIR) %
1N/A$(INSTALL_BINDIR) $(INSTALL_SBINDIR) $(SRC_DIR):
1N/A $(RM) *.o $(NOINSTALL_SCRIPTS)
1N/A $(RM) $(PROGRAMS) $(INSTALL_SCRIPTS)