0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome#
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome# This file and its contents are supplied under the terms of the
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome# Common Development and Distribution License ("CDDL"), version 1.0.
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome# You may only use this file in accordance with the terms of version
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome# 1.0 of the CDDL.
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome#
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome# A full copy of the text of the CDDL should have accompanied this
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome# source. A copy of the CDDL is also available via the Internet at
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome# http://www.illumos.org/license/CDDL.
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome#
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome#
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome# Copyright 2016 Toomas Soome <tsoome@me.com>
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome#
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soomeinclude ../Makefile.tools
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome.KEEP_STATE:
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas SoomeCOMMON_SRC= $(SRC)/cmd/boot/common
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas SoomeEINFO_SRC= $(COMMON_SRC)/bblk_einfo.c
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas SoomeUTILS_SRC= $(COMMON_SRC)/boot_utils.c
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas SoomeEXTRA_SRC= $(COMMON_SRC)/mboot_extra.c
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas SoomePROG= btxld
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas SoomeMAN= btxld.8
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas SoomeSRCS= btxld.c elfh.c version.c $(UTILS_SRC) $(EINFO_SRC) $(EXTRA_SRC)
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas SoomeOBJS= btxld.o elfh.o version.o bblk_einfo.o mboot_extra.o boot_utils.o
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas SoomeLDLIBS += -lmd5
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas SoomeC99MODE= $(C99_ENABLE)
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas SoomeCPPFLAGS += -I$(SRC)/uts/common -I$(COMMON_SRC)
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soomeall: $(PROG)
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome$(PROG): $(OBJS)
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome $(POST_PROCESS)
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soomeinstall: all .WAIT $(ROOTONBLDMACHPROG)
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soomeclean:
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome $(RM) $(OBJS)
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome%.o: %.c
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome $(COMPILE.c) -o $@ $<
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome $(POST_PROCESS_O)
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome%.o: $(COMMON_SRC)/%.c
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome $(COMPILE.c) -o $@ $<
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome $(POST_PROCESS_O)
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soome
0cc5983c8a077e6396dc7c492ee928b40bf0fed1Toomas Soomeinclude ../Makefile.targ