Annotation of src/usr.bin/strip/Makefile, Revision 1.11
1.11 ! miod 1: # $OpenBSD: Makefile,v 1.10 2004/03/31 21:22:06 mickey Exp $
1.7 niklas 2:
3: TARGET_MACHINE_ARCH?= ${MACHINE_ARCH}
1.1 deraadt 4:
5: PROG= strip
1.7 niklas 6:
1.8 espie 7: CFLAGS+=-I${.CURDIR}/../nm
1.7 niklas 8: .if ${TARGET_MACHINE_ARCH} != ${MACHINE_ARCH}
9: # XXX should make this automatic
10: .if ${TARGET_MACHINE_ARCH} == "i386"
11: CFLAGS+= -DMID_MACHINE_OVERRIDE=MID_I386
12: .elif ${TARGET_MACHINE_ARCH} == "m68k"
13: CFLAGS+= -DMID_MACHINE_OVERRIDE=MID_M68K
1.10 mickey 14: CPPFLAGS+=-I.
15: beforedepend:
16: ln -sf ${.CURDIR}/../../sys/arch/m68k/include m68k
1.11 ! miod 17: .elif ${TARGET_MACHINE_ARCH} == "m88k"
! 18: CFLAGS+= -DMID_MACHINE_OVERRIDE=MID_M88K
! 19: CPPFLAGS+=-I.
! 20: beforedepend:
! 21: ln -sf ${.CURDIR}/../../sys/arch/m88k/include m88k
1.7 niklas 22: .elif ${TARGET_MACHINE_ARCH} == "ns32k"
23: CFLAGS+= -DMID_MACHINE_OVERRIDE=MID_NS32K
24: .elif ${TARGET_MACHINE_ARCH} == "sparc"
25: CFLAGS+= -DMID_MACHINE_OVERRIDE=MID_SPARC
26: .elif ${TARGET_MACHINE_ARCH} == "vax"
27: CFLAGS+= -DMID_MACHINE_OVERRIDE=MID_VAX
28: .endif
29: STRIP= /usr/bin/strip
30:
31: .elif ${HOSTCC} != ${CC}
1.4 deraadt 32: STRIP=./hoststrip
33:
1.9 niklas 34: realinstall strip: hoststrip
1.4 deraadt 35:
36: hoststrip: strip.c
1.9 niklas 37: ${HOSTCC} -I${.CURDIR}/../nm ${.CURDIR}/strip.c -o hoststrip
1.4 deraadt 38: .else
39: STRIP=./strip
40: .endif
1.1 deraadt 41:
42: realinstall:
1.6 millert 43: ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 600 strip \
1.1 deraadt 44: ${DESTDIR}${BINDIR}
1.4 deraadt 45: ${STRIP} ${DESTDIR}${BINDIR}/strip
1.1 deraadt 46: chmod ${BINMODE} ${DESTDIR}${BINDIR}/strip
1.6 millert 47: -if [ "${INSTALL_COPY}" = "" ]; then rm -f ${STRIP}; fi
1.1 deraadt 48:
49: .include <bsd.prog.mk>