Annotation of src/usr.bin/strip/Makefile, Revision 1.7
1.7 ! niklas 1: # $OpenBSD: Makefile,v 1.6 1997/04/27 20:56:54 millert Exp $
! 2:
! 3: TARGET_MACHINE_ARCH?= ${MACHINE_ARCH}
1.1 deraadt 4:
5: PROG= strip
1.7 ! niklas 6:
! 7: .if ${TARGET_MACHINE_ARCH} != ${MACHINE_ARCH}
! 8: # XXX should make this automatic
! 9: .if ${TARGET_MACHINE_ARCH} == "i386"
! 10: CFLAGS+= -DMID_MACHINE_OVERRIDE=MID_I386
! 11: .elif ${TARGET_MACHINE_ARCH} == "m68k"
! 12: CFLAGS+= -DMID_MACHINE_OVERRIDE=MID_M68K
! 13: .elif ${TARGET_MACHINE_ARCH} == "ns32k"
! 14: CFLAGS+= -DMID_MACHINE_OVERRIDE=MID_NS32K
! 15: .elif ${TARGET_MACHINE_ARCH} == "sparc"
! 16: CFLAGS+= -DMID_MACHINE_OVERRIDE=MID_SPARC
! 17: .elif ${TARGET_MACHINE_ARCH} == "vax"
! 18: CFLAGS+= -DMID_MACHINE_OVERRIDE=MID_VAX
! 19: .endif
! 20: STRIP= /usr/bin/strip
! 21:
! 22: .elif ${HOSTCC} != ${CC}
1.4 deraadt 23: STRIP=./hoststrip
24:
1.5 deraadt 25: realinstall: hoststrip
1.4 deraadt 26:
27: hoststrip: strip.c
1.5 deraadt 28: ${HOSTCC} ${.CURDIR}/strip.c -o hoststrip
1.4 deraadt 29: .else
30: STRIP=./strip
31: .endif
1.1 deraadt 32:
33: realinstall:
1.6 millert 34: ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 600 strip \
1.1 deraadt 35: ${DESTDIR}${BINDIR}
1.4 deraadt 36: ${STRIP} ${DESTDIR}${BINDIR}/strip
1.1 deraadt 37: chmod ${BINMODE} ${DESTDIR}${BINDIR}/strip
1.6 millert 38: -if [ "${INSTALL_COPY}" = "" ]; then rm -f ${STRIP}; fi
1.1 deraadt 39:
40: .include <bsd.prog.mk>