10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 55648Ssetje# Common Development and Distribution License (the "License"). 65648Ssetje# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 21*12947SEnrico.Perla@Sun.COM# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 220Sstevel@tonic-gate# 230Sstevel@tonic-gate 240Sstevel@tonic-gatePROG= installgrub 250Sstevel@tonic-gate 260Sstevel@tonic-gatePCFS_SRC= $(SRC)/common/fs/pcfs.c 27*12947SEnrico.Perla@Sun.COMEINFO_SRC= ./../common/bblk_einfo.c 28*12947SEnrico.Perla@Sun.COMUTILS_SRC =./../common/boot_utils.c 29*12947SEnrico.Perla@Sun.COMEXTRA_SRC =./../common/mboot_extra.c 300Sstevel@tonic-gate 31*12947SEnrico.Perla@Sun.COMOBJS= installgrub.o pcfs_glue.o pcfs.o bblk_einfo.o boot_utils.o mboot_extra.o 32*12947SEnrico.Perla@Sun.COMSRCS= installgrub.c pcfs_glue.c $(PCFS_SRC) $(UTILS_SRC) $(EINFO_SRC) \ 33*12947SEnrico.Perla@Sun.COM $(EXTRA_SRC) 340Sstevel@tonic-gateSBINLINKS= $(PROG) 350Sstevel@tonic-gate 360Sstevel@tonic-gateinclude ../Makefile.com 370Sstevel@tonic-gate 380Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/uts/i86pc -I$(SRC)/uts/intel -I$(SRC)/uts/common 390Sstevel@tonic-gate 408434SEnrico.Perla@Sun.COMLDLIBS += -lmd5 418434SEnrico.Perla@Sun.COM 4210021SSheshadri.Vasudevan@Sun.COMi386_CFLAGS += -D_LARGEFILE64_SOURCE 4310021SSheshadri.Vasudevan@Sun.COMi386_CFLAGS += -D_FILE_OFFSET_BITS=64 4410021SSheshadri.Vasudevan@Sun.COM 4510021SSheshadri.Vasudevan@Sun.COMLDLIBS += -lfdisk 4610021SSheshadri.Vasudevan@Sun.COM 470Sstevel@tonic-gateLINTFLAGS += \ 480Sstevel@tonic-gate -erroff=E_BAD_PTR_CAST_ALIGN \ 490Sstevel@tonic-gate -erroff=E_STATIC_UNUSED \ 500Sstevel@tonic-gate -erroff=E_FUNC_RET_MAYBE_IGNORED \ 5110021SSheshadri.Vasudevan@Sun.COM -erroff=E_FUNC_RET_MAYBE_IGNORED2 \ 5210021SSheshadri.Vasudevan@Sun.COM -xerroff=E_NAME_DEF_NOT_USED2 530Sstevel@tonic-gate 54*12947SEnrico.Perla@Sun.COMC99MODE= -xc99=%all 55*12947SEnrico.Perla@Sun.COMC99LMODE= -Xc99=%all 56*12947SEnrico.Perla@Sun.COM 570Sstevel@tonic-gate.KEEP_STATE: 580Sstevel@tonic-gate 590Sstevel@tonic-gateall: $(PROG) 600Sstevel@tonic-gate 610Sstevel@tonic-gate$(PROG): $(OBJS) 620Sstevel@tonic-gate $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 630Sstevel@tonic-gate $(POST_PROCESS) 640Sstevel@tonic-gate 650Sstevel@tonic-gate 660Sstevel@tonic-gate# pick pcfs from usr/src/common/fs 670Sstevel@tonic-gatepcfs.o: $(PCFS_SRC) 680Sstevel@tonic-gate $(COMPILE.c) -o $@ $(PCFS_SRC) 690Sstevel@tonic-gate 70*12947SEnrico.Perla@Sun.COMboot_utils.o: $(UTILS_SRC) 71*12947SEnrico.Perla@Sun.COM $(COMPILE.c) -o $@ $(UTILS_SRC) 72*12947SEnrico.Perla@Sun.COM 73*12947SEnrico.Perla@Sun.COMmboot_extra.o: $(EXTRA_SRC) 74*12947SEnrico.Perla@Sun.COM $(COMPILE.c) -o $@ $(EXTRA_SRC) 75*12947SEnrico.Perla@Sun.COM 76*12947SEnrico.Perla@Sun.COMbblk_einfo.o: $(EINFO_SRC) 77*12947SEnrico.Perla@Sun.COM $(COMPILE.c) -o $@ $(EINFO_SRC) 78*12947SEnrico.Perla@Sun.COM 790Sstevel@tonic-gateinstall: all $(ROOTSBINPROG) .WAIT $(ROOTUSRSBINLINKS) 800Sstevel@tonic-gate 810Sstevel@tonic-gateclean: 820Sstevel@tonic-gate $(RM) $(OBJS) 830Sstevel@tonic-gate 840Sstevel@tonic-gatelint: lint_SRCS 850Sstevel@tonic-gate 860Sstevel@tonic-gateinclude ../Makefile.targ 87