[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / src / usr.bin / strip

File: [local] / src / usr.bin / strip / Attic / Makefile (download)

Revision 1.12, Fri Mar 15 06:01:42 2013 UTC (11 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.11: +6 -1 lines

Enter more directories, and put the conditional down below.  This is
for obj dirs...

#	$OpenBSD: Makefile,v 1.12 2013/03/15 06:01:42 deraadt Exp $

.include <bsd.own.mk>
.if (${ELF_TOOLCHAIN:L} == "no")

TARGET_MACHINE_ARCH?=	${MACHINE_ARCH}

PROG=	strip

CFLAGS+=-I${.CURDIR}/../nm
.if ${TARGET_MACHINE_ARCH} != ${MACHINE_ARCH}
# XXX should make this automatic
.if ${TARGET_MACHINE_ARCH} == "i386"
CFLAGS+=	-DMID_MACHINE_OVERRIDE=MID_I386
.elif ${TARGET_MACHINE_ARCH} == "m68k"
CFLAGS+=	-DMID_MACHINE_OVERRIDE=MID_M68K
CPPFLAGS+=-I.
beforedepend:
	ln -sf ${.CURDIR}/../../sys/arch/m68k/include m68k
.elif ${TARGET_MACHINE_ARCH} == "m88k"
CFLAGS+=	-DMID_MACHINE_OVERRIDE=MID_M88K
CPPFLAGS+=-I.
beforedepend:
	ln -sf ${.CURDIR}/../../sys/arch/m88k/include m88k
.elif ${TARGET_MACHINE_ARCH} == "ns32k"
CFLAGS+=	-DMID_MACHINE_OVERRIDE=MID_NS32K
.elif ${TARGET_MACHINE_ARCH} == "sparc"
CFLAGS+=	-DMID_MACHINE_OVERRIDE=MID_SPARC
.elif ${TARGET_MACHINE_ARCH} == "vax"
CFLAGS+=	-DMID_MACHINE_OVERRIDE=MID_VAX
.endif
STRIP=	/usr/bin/strip

.elif ${HOSTCC} != ${CC}
STRIP=./hoststrip

realinstall strip: hoststrip

hoststrip: strip.c
	${HOSTCC} -I${.CURDIR}/../nm ${.CURDIR}/strip.c -o hoststrip
.else
STRIP=./strip
.endif

realinstall:
	${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 600 strip \
	    ${DESTDIR}${BINDIR}
	${STRIP} ${DESTDIR}${BINDIR}/strip
	chmod ${BINMODE} ${DESTDIR}${BINDIR}/strip
	-if [ "${INSTALL_COPY}" = "" ]; then rm -f ${STRIP}; fi

.endif

.include <bsd.prog.mk>