[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / i386 / bioscall

File: [cvs.NetBSD.org] / src / sys / arch / i386 / bioscall / Makefile (download)

Revision 1.21, Mon Aug 10 10:59:33 2020 UTC (21 months, 2 weeks ago) by rin
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, HEAD
Changes since 1.20: +2 -2 lines

Clean up _LKM --> _MODULE leftovers.

Note that _KERNEL is always defined for modules.

#	$NetBSD: Makefile,v 1.21 2020/08/10 10:59:33 rin Exp $

CPPFLAGS=	${APMCPPFLAGS}
KSRC=${.CURDIR}/../../..
ARCHSRC=${.CURDIR}/../..
I386=${KSRC}/arch/i386
X86=${KSRC}/arch/x86
CPPFLAGS+=-I${ARCHSRC} -I${KSRC} -I${.CURDIR} -I${.OBJDIR} -D_MODULE -D_KERNEL

SRCS=	biostramp.S
OBJS=	biostramp.o
DEPS=	${APMDEPS}
STRIP?=	strip
TRAMP=	${.CURDIR}/biostramp.inc

all: ${TRAMP}

${TRAMP}: biostramp.bin Makefile
	@([ -f ${TRAMP} ] && mv -f ${TRAMP} ${TRAMP}.bak; exit 0)
	${HOST_SH} ${.CURDIR}/bin2asm.sh biostramp.bin > ${.TARGET}

machine:
	@rm -f machine && ln -s ${I386}/include machine

x86:
	@rm -f x86 && ln -s ${X86}/include x86

.include <bsd.own.mk>

biostramp.bin: biostramp.obj
	${OBJCOPY} --output-target=binary $? $@

biostramp.obj: ${OBJS} ${DEPS}
	${LD} -Bstatic -N -Ttext 0 -e do_bios_call -o $@ $(OBJS)

assym.h: machine x86 genassym.cf
	${TOOL_GENASSYM} -- ${CC} ${CFLAGS:N-Wa,*} ${CPPFLAGS} ${PROF} \
	    ${GENASSYM_CPPFLAGS} < ${.CURDIR}/genassym.cf > assym.h.tmp && \
	mv -f assym.h.tmp assym.h

biostramp.S: assym.h

biostramp.o: biostramp.S
	${CC} ${CPPFLAGS} -DASM -D_LOCORE -c ${.IMPSRC}

clean:
	rm -f *.o biostramp.obj biostramp.bin biostramp.sym ${TRAMP} \
	    assym.h ${TRAMP}.bak machine

.include <bsd.dep.mk>
.include <bsd.subdir.mk>
.include <bsd.obj.mk>