minix/drivers/memory/Makefile
Antoine Leca ab0a67f7af Use objcopy to build ramdisk object
. during build, uses much less memory,
	  disk space, and time
	. lets us throw out bintoc
2012-02-17 12:56:38 +00:00

32 lines
703 B
Makefile

# Makefile for memory driver (MEMORY)
PROG= memory
SRCS= memory.c imgrd.mfs
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
DPADD+= ${LIBBLOCKDRIVER} ${LIBCHARDRIVER} ${LIBSYS}
LDADD+= -lblockdriver -lchardriver -lsys
MAN=
BINDIR?= /usr/sbin
CPPFLAGS.memory.c+= -I${MINIXSRCDIR}
imgrd.d: touch-genfiles
touch-genfiles:
[ -e ../ramdisk/image ] || touch -t 197001020000.00 ../ramdisk/image
.SUFFIXES: .mfs .c .o
# 'elf32-${ARCH}-minix' below should really be ${MACHINE_GNU_PLATFORM}
# but bsd.own.mk has to be upgraded for that.
.mfs.o:
${_MKTARGET_CREATE}
${OBJCOPY} -Ibinary -B${ARCH} -Oelf32-${ARCH}-minix $< $@
imgrd.mfs:
ln -s ../ramdisk/image $@
CLEANFILES+= imgrd.mfs
.include <minix.bootprog.mk>