1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00
freebsd/usr.bin/mkimg/Makefile
Marcel Moolenaar 2c83b36f45 Add mkimg_chs() for those schemes that need the LBA broken down into
cylinder, head and track numbers. Return ~0U for these values when
mkimg wasn't given both -T and -H (i.e. no geometry) or the cylinder
would be larger than the provided maximum.

Use mkimgs_chs() for the EBR, MBR and PC98 schemes to fill in the
appropriate fields. Make sure to use a "rounded" size so that the
partition is always a multiple of the track size. We reserved the
room for it in the metadata callback so that's a valid thing to
do.

Bump the mkimg version number.
While doing that again: have mkimg.o depend on the Makefile so that
a version change triggers a rebuild as needed.
2014-10-03 20:48:11 +00:00

44 lines
520 B
Makefile

# $FreeBSD$
.include <src.opts.mk>
PROG= mkimg
SRCS= format.c image.c mkimg.c scheme.c
MAN= mkimg.1
MKIMG_VERSION=20141003
mkimg.o: Makefile
CFLAGS+=-DMKIMG_VERSION=${MKIMG_VERSION}
CFLAGS+=-DSPARSE_WRITE
# List of formats to support
SRCS+= \
qcow.c \
raw.c \
vhd.c \
vmdk.c
# List of schemes to support
SRCS+= \
apm.c \
bsd.c \
ebr.c \
gpt.c \
mbr.c \
pc98.c \
vtoc8.c
BINDIR?=/usr/bin
DPADD= ${LIBUTIL}
LDADD= -lutil
WARNS?= 6
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
.include <bsd.prog.mk>