summaryrefslogtreecommitdiff
path: root/sys/arch/i386/apm_init/Makefile.inc
blob: 334e0aa608f3ba7703bfd073c512e189f5769d65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#	$NetBSD: Makefile.inc,v 1.12 1995/10/07 09:56:55 mycroft Exp $
#
#	NOTE: $S must correspond to the top of the 'sys' tree

APMDIR!=	cd ${I386}/apm_init; pwd
APMDST=		lib/apm_init
APMINC?=	${APMDST}/apm_init.inc

APMDEPS= \
	${APMDIR}/Makefile \
	${APMDIR}/apm_bios.h \
	${APMDIR}/apm_init.S \
	${APMDIR}/apm_segments.h \
	${APMDIR}/bin2asm.sh \
	${APMDIR}/real_prot.S \
	${APMDIR}/real_prot.h \
	${APMDIR}/rmaouthdr \
	${APMDIR}/table.c

${APMINC}:	${APMDEPS} ${APMDST}
	@echo making sure the apm grappling hook is up to date...
	@(cd ${APMDST} && ${MAKE} -f ${APMDIR}/Makefile \
	  APMCC="${CC}" \
	  APMCFLAGS="${CFLAGS}" \
	  APMDIR="${APMDIR}" apm_init.inc)

clean:: 		.NOTMAIN __always_make_apmlib
	@echo cleaning the apm grappling hook objects
	@(cd ${APMDST} && ${MAKE} -f ${APMDIR}/Makefile \
	  APMCC="${CC}" \
	  APMCFLAGS="${CFLAGS}" \
	  APMDIR="${APMDIR}" clean)

${APMDST} __always_make_apmlib:	.NOTMAIN
	@([ -d ${APMDST} ] || mkdir -p ${APMDST})