xref: /titanic_50/usr/src/grub/grub-0.97/util/Makefile.solaris (revision 1b8adde7ba7d5e04395c141c5400dc2cffd7d809)
1*1b8adde7SWilliam Kucharski#
2*1b8adde7SWilliam Kucharski# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3*1b8adde7SWilliam Kucharski# Use is subject to license terms.
4*1b8adde7SWilliam Kucharski#
5*1b8adde7SWilliam Kucharski# ident	"%Z%%M%	%I%	%E% SMI"
6*1b8adde7SWilliam Kucharski#
7*1b8adde7SWilliam Kucharskiinclude ../../Makefile.grub
8*1b8adde7SWilliam Kucharskiinclude ../Makefile.solaris.defs
9*1b8adde7SWilliam Kucharski
10*1b8adde7SWilliam Kucharski
11*1b8adde7SWilliam KucharskiINCLUDES	= -I. -I.. -I../lib -I../docs
12*1b8adde7SWilliam KucharskiLIBCOMMON	= ../lib/libcommon.a
13*1b8adde7SWilliam Kucharski
14*1b8adde7SWilliam Kucharski# Build these only if the OPTION_UTILS on is on (blank).
15*1b8adde7SWilliam Kucharski$(OPTION_UTILS)PROGRAMS = mbchk
16*1b8adde7SWilliam Kucharski
17*1b8adde7SWilliam Kucharski
18*1b8adde7SWilliam Kucharski# Build these only if the OPTION_UTILS on is on (blank).
19*1b8adde7SWilliam Kucharski# Will be installed.
20*1b8adde7SWilliam Kucharski$(OPTION_UTILS)INSTALL_SCRIPTS = grub-install		\
21*1b8adde7SWilliam Kucharski				 grub-md5-crypt		\
22*1b8adde7SWilliam Kucharski				 grub-set-default	\
23*1b8adde7SWilliam Kucharski				 grub-terminfo
24*1b8adde7SWilliam Kucharski# Won't be installed.
25*1b8adde7SWilliam Kucharski$(OPTION_UTILS)NOINSTALL_SCRIPTS = grub-image
26*1b8adde7SWilliam Kucharski
27*1b8adde7SWilliam KucharskiSCRIPTS		= $(INSTALL_SCRIPTS) $(NOINSTALL_SCRIPTS)
28*1b8adde7SWilliam Kucharski
29*1b8adde7SWilliam Kucharski
30*1b8adde7SWilliam KucharskiINSTALL_BINDIR	= $(ROOT_PLAT_GRUB)/bin
31*1b8adde7SWilliam KucharskiINSTALL_SBINDIR	= $(ROOT_PLAT_GRUB)/sbin
32*1b8adde7SWilliam Kucharski
33*1b8adde7SWilliam KucharskiINSTALL_TARGETS	= $(PROGRAMS:%=$(INSTALL_BINDIR)/%) \
34*1b8adde7SWilliam Kucharski		  $(INSTALL_SCRIPTS:%=$(INSTALL_SBINDIR)/%)
35*1b8adde7SWilliam Kucharski
36*1b8adde7SWilliam Kucharski$(INSTALL_BINDIR)/%  := FILEMODE = 0555
37*1b8adde7SWilliam Kucharski$(INSTALL_SBINDIR)/% := FILEMODE = 0555
38*1b8adde7SWilliam Kucharski
39*1b8adde7SWilliam Kucharski#
40*1b8adde7SWilliam Kucharski# Source files to be installed in $(SRC_DIR).
41*1b8adde7SWilliam Kucharski#
42*1b8adde7SWilliam KucharskiSRC_DIR		= $(ROOT_SRC)/util
43*1b8adde7SWilliam KucharskiSRC_FILES	= Makefile.am Makefile.in grub-image.in grub-install.in \
44*1b8adde7SWilliam Kucharski		  grub-md5-crypt.in grub-set-default.in grub-terminfo.in \
45*1b8adde7SWilliam Kucharski		  mbchk.c mkbimage
46*1b8adde7SWilliam Kucharski
47*1b8adde7SWilliam KucharskiINSTALL_TARGETS	+= $(SRC_FILES:%=$(SRC_DIR)/%)
48*1b8adde7SWilliam Kucharski
49*1b8adde7SWilliam Kucharski
50*1b8adde7SWilliam Kucharskiall: $(PROGRAMS) $(SCRIPTS)
51*1b8adde7SWilliam Kucharski
52*1b8adde7SWilliam Kucharski$(PROGRAMS): $$@.o
53*1b8adde7SWilliam Kucharski	$(RM) $@
54*1b8adde7SWilliam Kucharski	$(LINK) -o $@ $@.o $(LIBCOMMON)
55*1b8adde7SWilliam Kucharski
56*1b8adde7SWilliam Kucharski$(SCRIPTS): $$@.in ../config.status.solaris
57*1b8adde7SWilliam Kucharski	cd .. && ./config.status.solaris util/$@
58*1b8adde7SWilliam Kucharski
59*1b8adde7SWilliam Kucharski
60*1b8adde7SWilliam Kucharskiinstall: all $(INSTALL_TARGETS)
61*1b8adde7SWilliam Kucharski
62*1b8adde7SWilliam Kucharski$(INSTALL_BINDIR)/%: $(INSTALL_BINDIR) %
63*1b8adde7SWilliam Kucharski	$(INS.file)
64*1b8adde7SWilliam Kucharski
65*1b8adde7SWilliam Kucharski$(INSTALL_SBINDIR)/%: $(INSTALL_SBINDIR) %
66*1b8adde7SWilliam Kucharski	$(INS.file)
67*1b8adde7SWilliam Kucharski
68*1b8adde7SWilliam Kucharski$(SRC_DIR)/%: $(SRC_DIR) %
69*1b8adde7SWilliam Kucharski	$(INS.file)
70*1b8adde7SWilliam Kucharski
71*1b8adde7SWilliam Kucharski$(INSTALL_BINDIR) $(INSTALL_SBINDIR) $(SRC_DIR):
72*1b8adde7SWilliam Kucharski	$(INS.dir)
73*1b8adde7SWilliam Kucharski
74*1b8adde7SWilliam Kucharski
75*1b8adde7SWilliam Kucharskiclean: _FORCE
76*1b8adde7SWilliam Kucharski	$(RM) *.o $(NOINSTALL_SCRIPTS)
77*1b8adde7SWilliam Kucharski
78*1b8adde7SWilliam Kucharskiclobber: clean
79*1b8adde7SWilliam Kucharski	$(RM) $(PROGRAMS) $(INSTALL_SCRIPTS)
80*1b8adde7SWilliam Kucharski
81*1b8adde7SWilliam Kucharski_FORCE:
82