xref: /illumos-gate/usr/src/cmd/boot/installboot/Makefile.com (revision d17be682a2c70b4505d43c830bbd2603da11918d)
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# Copyright 2016 Toomas Soome <tsoome@me.com>
23#
24
25PROG= installboot
26
27EINFO_SRC =../../common/bblk_einfo.c
28UTILS_SRC =../../common/boot_utils.c
29EXTRA_SRC =../../common/mboot_extra.c
30
31OBJS= installboot.o bblk_einfo.o  boot_utils.o mboot_extra.o
32
33include ../../Makefile.com
34
35CPPFLAGS += -I$(SRC)/uts/common
36
37LDLIBS += -lmd5
38
39CSTD=	$(CSTD_GNU99)
40
41.KEEP_STATE:
42
43all: $(PROG)
44
45$(PROG): $(OBJS)
46	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
47	$(POST_PROCESS)
48
49boot_utils.o:	$(UTILS_SRC)
50		$(COMPILE.c) -o $@ $(UTILS_SRC)
51
52mboot_extra.o:	$(EXTRA_SRC)
53		$(COMPILE.c) -o $@ $(EXTRA_SRC)
54
55bblk_einfo.o:	$(EINFO_SRC)
56		$(COMPILE.c) -o $@ $(EINFO_SRC)
57
58install: all $(ROOTUSRSBINPROG)
59
60clean:
61	$(RM) $(OBJS)
62