diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/apm_init/Makefile | 16 | ||||
-rw-r--r-- | sys/arch/i386/apm_init/Makefile.inc | 12 |
2 files changed, 11 insertions, 17 deletions
diff --git a/sys/arch/i386/apm_init/Makefile b/sys/arch/i386/apm_init/Makefile index 44e521eba13..321e997863a 100644 --- a/sys/arch/i386/apm_init/Makefile +++ b/sys/arch/i386/apm_init/Makefile @@ -15,17 +15,15 @@ # Dec., 1995 NetBSD 1.1 kernel build retrofit, jtk@netbsd.org # -DIR=${APMREL}${APMDIR} - -.if exists (${DIR}/arch/${MACHINE_ARCH}/Makefile.inc) -.PATH: ${DIR}/arch/${MACHINE_ARCH} -.include "${DIR}/arch/${MACHINE_ARCH}/Makefile.inc" +.if exists (${APMDIR}/arch/${MACHINE_ARCH}/Makefile.inc) +.PATH: ${APMDIR}/arch/${MACHINE_ARCH} +.include "${APMDIR}/arch/${MACHINE_ARCH}/Makefile.inc" .endif -.PATH: ${DIR} +.PATH: ${APMDIR} CC = ${APMCC} -CFLAGS += -DINITIALIZER -I${DIR} -DKERNEL \ +CFLAGS += -DINITIALIZER -I${APMDIR} -DKERNEL \ ${APMCFLAGS:S@-I.@-I${KERNREL}.@g} OBJS = apm_init.o real_prot.o table.o @@ -39,13 +37,13 @@ OBJS = apm_init.o real_prot.o table.o $(CC) $(CFLAGS) $(INC) -c $< apm_init.inc: apm_init - sh ${DIR}/bin2asm.sh apm_init > apm_init.inc + sh ${APMDIR}/bin2asm.sh apm_init > apm_init.inc apm_init: $(OBJS) $(LD) -Bstatic -N -T 0 -o apm_init $(OBJS) cp apm_init apm_init.sym @strip apm_init - @sh ${DIR}/rmaouthdr apm_init apm_init.tmp + @sh ${APMDIR}/rmaouthdr apm_init apm_init.tmp @mv -f apm_init.tmp apm_init #allclean: clean diff --git a/sys/arch/i386/apm_init/Makefile.inc b/sys/arch/i386/apm_init/Makefile.inc index 715da6093c5..334e0aa608f 100644 --- a/sys/arch/i386/apm_init/Makefile.inc +++ b/sys/arch/i386/apm_init/Makefile.inc @@ -2,10 +2,8 @@ # # NOTE: $S must correspond to the top of the 'sys' tree -APMDIR= ${I386}/apm_init - -APMDST= lib/apm_init -APMREL?= ../../ +APMDIR!= cd ${I386}/apm_init; pwd +APMDST= lib/apm_init APMINC?= ${APMDST}/apm_init.inc APMDEPS= \ @@ -21,18 +19,16 @@ APMDEPS= \ ${APMINC}: ${APMDEPS} ${APMDST} @echo making sure the apm grappling hook is up to date... - @(cd ${APMDST} && ${MAKE} -f ${APMREL}${APMDIR}/Makefile \ + @(cd ${APMDST} && ${MAKE} -f ${APMDIR}/Makefile \ APMCC="${CC}" \ APMCFLAGS="${CFLAGS}" \ - APMREL="${APMREL}" \ APMDIR="${APMDIR}" apm_init.inc) clean:: .NOTMAIN __always_make_apmlib @echo cleaning the apm grappling hook objects - @(cd ${APMDST} && ${MAKE} -f ${APMREL}${APMDIR}/Makefile \ + @(cd ${APMDST} && ${MAKE} -f ${APMDIR}/Makefile \ APMCC="${CC}" \ APMCFLAGS="${CFLAGS}" \ - APMREL="${APMREL}" \ APMDIR="${APMDIR}" clean) ${APMDST} __always_make_apmlib: .NOTMAIN |