xref: /titanic_50/usr/src/cmd/boot/installboot/Makefile (revision abc79d9dd51e98eafb6fc25b4a0b4f66bef40b00)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
22#
23
24PROG= installboot
25
26EINFO_SRC= ./../common/bblk_einfo.c
27UTILS_SRC =./../common/boot_utils.c
28EXTRA_SRC =./../common/mboot_extra.c
29
30OBJS= installboot.o bblk_einfo.o  boot_utils.o mboot_extra.o
31SRCS= installboot.c $(UTILS_SRC) $(EINFO_SRC) $(EXTRA_SRC)
32
33include ../Makefile.com
34
35CPPFLAGS += -I$(SRC)/uts/common
36
37LDLIBS += -lmd5
38
39C99MODE=	-xc99=%all
40C99LMODE=	-Xc99=%all
41
42LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN
43CERRWARN += -_gcc=-Wno-uninitialized
44
45.KEEP_STATE:
46
47all: $(PROG)
48
49$(PROG): $(OBJS)
50	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
51	$(POST_PROCESS)
52
53boot_utils.o:	$(UTILS_SRC)
54		$(COMPILE.c) -o $@ $(UTILS_SRC)
55
56mboot_extra.o:	$(EXTRA_SRC)
57		$(COMPILE.c) -o $@ $(EXTRA_SRC)
58
59bblk_einfo.o:	$(EINFO_SRC)
60		$(COMPILE.c) -o $@ $(EINFO_SRC)
61
62install: all $(ROOTUSRSBINPROG)
63
64clean:
65	$(RM) $(OBJS)
66
67lint:	lint_SRCS
68
69include ../Makefile.targ
70