diff options
Diffstat (limited to 'sys/arch/i386/stand/cdboot/Makefile')
-rw-r--r-- | sys/arch/i386/stand/cdboot/Makefile | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/sys/arch/i386/stand/cdboot/Makefile b/sys/arch/i386/stand/cdboot/Makefile new file mode 100644 index 00000000000..3adc18677f7 --- /dev/null +++ b/sys/arch/i386/stand/cdboot/Makefile @@ -0,0 +1,46 @@ +# $OpenBSD: Makefile,v 1.1 2004/06/23 00:21:49 tom Exp $ + +.include "${.CURDIR}/../Makefile.inc" + +MAN= cdboot.8 + +.if ${MACHINE} == "i386" +PROG= cdboot +LD?= ld +SIZE?= size +LDFLAGS+=-nostdlib -Bstatic +INSTALL_STRIP= + +LDFLAGS+=-Ttext $(LINKADDR) -N -x -noinhibit-exec +CLEANFILES+= crt0.o +SRCS= srt0.S + +SRCS+= boot.c cmd.c vars.c bootarg.c conf.c +S =${.CURDIR}/../../../.. +SADIR= ${.CURDIR}/.. + +LDADD= ${LIBSA} ${LIBZ} +DPADD= ${LIBSA} ${LIBZ} + +.PATH: ${S}/stand/boot + +${PROG}: $(OBJS) $(DPADD) + $(LD) $(LDFLAGS) -o ${PROG} $(OBJS) $(LDADD) + @$(SIZE) ${PROG} + @if [ -x ${.OBJDIR}/${PROG} ]; then \ + objcopy -O binary ${PROG} ${.OBJDIR}/.tmp;\ + mv -f ${.OBJDIR}/.tmp ${.OBJDIR}/${PROG}; \ + ls -l ${.OBJDIR}/${PROG}; \ + fi + +.else +NOPROG= +.endif + +.include <bsd.prog.mk> + +CPPFLAGS+=-DBOOTMAGIC=$(BOOTMAGIC) ${DEBUGFLAGS} +CPPFLAGS+=-DLINKADDR=${LINKADDR} +CFLAGS+=${SACFLAGS} -D__INTERNAL_LIBSA_CREAD +#AFLAGS+=-Wa,-R +# AFLAGS+=-Wa,-a |