# $OpenBSD: Makefile,v 1.6 2012/09/25 09:01:03 pascal Exp $ # PROG= cdbr SRCS= cdbr.S AFLAGS+=-m32 AFLAGS+=-I${.CURDIR} -I${.CURDIR}/../../.. #-Wa,-a AFLAGS+=-DOSREV=\"${OSREV}\" AFLAGS+=-DMACH=\"${MACHINE}\" -DMACH_U=\"${MACHINE:U}\" AFLAGS+=-fno-pie LD=ld ORG= 0x0000 LDFLAGS=-nostdlib -Ttext ${ORG} -x -N -s -Bstatic -e start -nopie LDFLAGS+=-melf_i386 -L/usr/libdata NOMAN= #MAN+= cdbr.8 INSTALL_STRIP= SADIR=${.CURDIR}/.. S= ${.CURDIR}/../../../.. ${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 .include