summaryrefslogtreecommitdiff
path: root/distrib/sun3/common/Make.crunch
blob: c212efe3748bed821829a41664097f1af7aa0ba9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#	$OpenBSD: Make.crunch,v 1.3 2000/03/01 22:10:09 todd Exp $
#	$NetBSD: Make.crunch,v 1.3 1995/11/21 21:18:48 gwr Exp $
#
# This is included by subdirectories building a crunched binary.
# Assume the following are already defined:  TOP, CBIN

CBIN?=		xxx-crunched
CRUNCHCONF=	${TOP}/common/${CBIN}.conf

CLEANFILES+= ${CBIN} ${CBIN}.c ${CBIN}.cache ${CBIN}.mk ${CBIN}.syms
CLEANFILES+= *.lo *_stub.o *_stub.c

# Keep a copy that is not stripped so I can debug...
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
	make -f ${CBIN}.mk all STRIP=true
	cp -p ${CBIN} ${CBIN}.syms
	strip ${CBIN}

${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
	crunchgen -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib ${CRUNCHCONF}