2c83b36f45
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.
44 lines
520 B
Makefile
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>
|