view usr/src/grub/grub-0.95/grub/Makefile.solaris @ 3912:f6891a60bd72

PSARC 2007/083 ZFS bootable datasets 4929890 ZFS Boot support for the x86 platform 6479807 pools need properties 6531774 reserve bits in directory entry for file type
author lling
date Wed, 28 Mar 2007 12:48:13 -0700
parents 528486e4ee43
children dda1ded496b7
line wrap: on
line source

#
# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident	"%Z%%M%	%I%	%E% SMI"
#
include ../../Makefile.grub
include ../Makefile.solaris.defs


GRUB		= grub
GRUB_OBJS	= asmstub.o main.o
$(GRUB)		:= LIBS = ../stage2/libgrub.a ../lib/libcommon.a -lcurses
$(GRUB)		:= LDFLAGS += $(LDLIBS.cmd)
$(GRUB)		:= CCLD = $(CC)

INCLUDES	= -I. -I.. -I../stage1 -I../stage2 -I../lib
CFLAGS		+= -O2
LINKFLAGS	+= -O2
CPPFLAGS	+= -DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \
		   -DFSYS_ISO9660=1 -DFSYS_JFS=1 -DFSYS_MINIX=1 \
		   -DFSYS_REISERFS=1 -DFSYS_ZFS=1 -DFSYS_UFS2=1 -DFSYS_VSTAFS=1 \
		   -DFSYS_XFS=1 -DUSE_MD5_PASSWORDS=1 -DSUPPORT_HERCULES=1 \
		   -DSUPPORT_SERIAL=1 

PROGRAMS	= $(GRUB)

INSTALL_DIR	= $(ROOT_BOOT_GRUB)/bin
INSTALL_TARGETS	= $(PROGRAMS:%=$(INSTALL_DIR)/%)

$(INSTALL_DIR)/% := FILEMODE = 0555

#
# Source files to be installed in $(SRC_DIR).
#
SRC_DIR		= $(ROOT_SRC)/grub
SRC_FILES	= Makefile.am Makefile.in asmstub.c main.c

INSTALL_TARGETS	+= $(SRC_FILES:%=$(SRC_DIR)/%)


all: $(PROGRAMS)

$(GRUB): $(GRUB_OBJS)
	$(LINK) -o $@ $(GRUB_OBJS) $(LIBS)
	$(POST_PROCESS)

$(GRUB_OBJS): $$(@:.o=.c)
	$(CC) $(CFLAGS) -c -o $@ $(@:.o=.c)


install: all $(INSTALL_TARGETS)

$(INSTALL_DIR)/%: $(INSTALL_DIR) %
	$(INS.file)

$(SRC_DIR)/%: $(SRC_DIR) %
	$(INS.file)

$(INSTALL_DIR) $(SRC_DIR):
	$(INS.dir)


clean: _FORCE
	$(RM) *.o

clobber: clean
	$(RM) $(PROGRAMS)

_FORCE: