Annotation of src/usr.bin/strip/Makefile, Revision 1.10
1.10 ! mickey 1: # $OpenBSD: Makefile,v 1.9 2000/02/05 08:43:17 niklas 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.7 niklas 17: .elif ${TARGET_MACHINE_ARCH} == "ns32k"
18: CFLAGS+= -DMID_MACHINE_OVERRIDE=MID_NS32K
19: .elif ${TARGET_MACHINE_ARCH} == "sparc"
20: CFLAGS+= -DMID_MACHINE_OVERRIDE=MID_SPARC
21: .elif ${TARGET_MACHINE_ARCH} == "vax"
22: CFLAGS+= -DMID_MACHINE_OVERRIDE=MID_VAX
23: .endif
24: STRIP= /usr/bin/strip
25:
26: .elif ${HOSTCC} != ${CC}
1.4 deraadt 27: STRIP=./hoststrip
28:
1.9 niklas 29: realinstall strip: hoststrip
1.4 deraadt 30:
31: hoststrip: strip.c
1.9 niklas 32: ${HOSTCC} -I${.CURDIR}/../nm ${.CURDIR}/strip.c -o hoststrip
1.4 deraadt 33: .else
34: STRIP=./strip
35: .endif
1.1 deraadt 36:
37: realinstall:
1.6 millert 38: ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 600 strip \
1.1 deraadt 39: ${DESTDIR}${BINDIR}
1.4 deraadt 40: ${STRIP} ${DESTDIR}${BINDIR}/strip
1.1 deraadt 41: chmod ${BINMODE} ${DESTDIR}${BINDIR}/strip
1.6 millert 42: -if [ "${INSTALL_COPY}" = "" ]; then rm -f ${STRIP}; fi
1.1 deraadt 43:
44: .include <bsd.prog.mk>