Hook the aic7xxx modules up. This requires some extra care since aicasm

is a compiler tool and needs to be compiled by the host compiler.  I've
tested this in i386->sparc cross-build, 4.7->current upgrade, normal
buildkernel target, and normal /sys/i386/compile/GENERIC configurations.

Submitted by:	ru
This commit is contained in:
scottl 2002-11-03 23:48:14 +00:00
parent a743b5e38f
commit 974996d4b9
6 changed files with 33 additions and 36 deletions

View File

@ -492,12 +492,21 @@ buildkernel:
cd ${KRNLOBJDIR}/${_kernel}; \
MAKESRCPATH=${KRNLSRCDIR}/dev/aic7xxx/aicasm \
${MAKE} -DNO_CPU_CFLAGS -f ${KRNLSRCDIR}/dev/aic7xxx/aicasm/Makefile
.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KRNLSRCDIR}/modules)
cd ${KRNLOBJDIR}/${_kernel}; \
${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} modules-obj
cd ${.CURDIR}/sys/modules/aic7xxx/aicasm; \
MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \
${MAKE} -DNO_CPU_CFLAGS depend; \
MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \
${MAKE} -DNO_CPU_CFLAGS all
.endif
.if !defined(NO_KERNELDEPEND)
cd ${KRNLOBJDIR}/${_kernel}; \
${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} depend
${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} depend -DNO_MODULES_OBJ
.endif
cd ${KRNLOBJDIR}/${_kernel}; \
${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} all
${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} all -DNO_MODULES_OBJ
@echo "--------------------------------------------------------------"
@echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`"
@echo "--------------------------------------------------------------"
@ -608,6 +617,10 @@ bootstrap-tools:
#
# build-tools: Build special purpose build tools
#
.if defined(MODULES_WITH_WORLD) && exists(${KRNLSRCDIR}/modules)
_aicasm= sys/modules/aic7xxx/aicasm
.endif
.if exists(${.CURDIR}/share) && !defined(NOSHARE)
_share= share/syscons/scrnmaps
.endif
@ -630,7 +643,7 @@ _libkrb5= kerberos5/lib/libroken kerberos5/lib/libvers \
build-tools:
.for _tool in bin/csh bin/sh gnu/usr.bin/cc/cc_tools ${_fortran} \
${_libroken4} ${_libkrb5} lib/libncurses ${_share} \
usr.bin/awk usr.bin/file usr.sbin/sysinstall
${_aicasm} usr.bin/awk usr.bin/file usr.sbin/sysinstall
${ECHODIR} "===> ${_tool}"; \
cd ${.CURDIR}/${_tool}; ${MAKE} DIRPRFX=${_tool}/ build-tools
.endfor

View File

@ -187,9 +187,7 @@ tags: modules-tags
.endif
modules:
@mkdir -p ${.OBJDIR}/modules
cd $S/modules ; ${MKMODULESENV} ${MAKE} obj ; \
${MKMODULESENV} ${MAKE} all
cd $S/modules ; ${MKMODULESENV} ${MAKE} all
modules-clean:
cd $S/modules ; ${MKMODULESENV} ${MAKE} clean
@ -204,9 +202,15 @@ modules-clobber: modules-clean
rm -rf ${MKMODULESENV}
modules-depend:
cd $S/modules ; ${MKMODULESENV} ${MAKE} depend
modules-obj:
@mkdir -p ${.OBJDIR}/modules
cd $S/modules ; ${MKMODULESENV} ${MAKE} obj ; \
${MKMODULESENV} ${MAKE} depend
cd $S/modules ; ${MKMODULESENV} ${MAKE} obj
.if !defined(NO_MODULES_OBJ)
modules modules-depend: modules-obj
.endif
modules-tags:
cd $S/modules ; ${MKMODULESENV} ${MAKE} tags

View File

@ -17,6 +17,7 @@ SUBDIR= 3dfx \
accf_http \
agp \
aha \
aic7xxx \
aio \
amr \
an \

View File

@ -13,7 +13,7 @@ BEFORE_DEPEND= aic7xxx_{seq,reg}.h
aic7xxx_{seq.h,reg.h,reg_print.c}: \
${.CURDIR}/../../../dev/aic7xxx/aic7xxx.{reg,seq} \
${.CURDIR}/../../../cam/scsi/scsi_message.h ../aicasm/aicasm
${.OBJDIR}/../aicasm/aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi \
../aicasm/aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi \
-I${.CURDIR}/../../../dev/aic7xxx \
-o aic7xxx_seq.h -r aic7xxx_reg.h \
-p aic7xxx_reg_print.c \

View File

@ -12,7 +12,7 @@ BEFORE_DEPEND= aic79xx_{seq,reg}.h
aic79xx_{seq.h,reg.h,reg_print.c}: \
${.CURDIR}/../../../dev/aic7xxx/aic79xx.{reg,seq} \
${.CURDIR}/../../../cam/scsi/scsi_message.h ../aicasm/aicasm
${.OBJDIR}/../aicasm/aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi \
../aicasm/aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi \
-I${.CURDIR}/../../../dev/aic7xxx \
-o aic79xx_seq.h -r aic79xx_reg.h \
-p aic79xx_reg_print.c \

View File

@ -1,30 +1,9 @@
# $FreeBSD$
all: aicasm
aicasm: ${.CURDIR}/../../../dev/aic7xxx/aicasm/*.[chyl]
${MAKE} -f ${.CURDIR}/../../../dev/aic7xxx/aicasm/Makefile \
MAKESRCPATH=${.CURDIR}/../../../dev/aic7xxx/aicasm
depend:
${MAKE} -f ${.CURDIR}/../../../dev/aic7xxx/aicasm/Makefile \
MAKESRCPATH=${.CURDIR}/../../../dev/aic7xxx/aicasm depend
obj:
${MAKE} -f ${.CURDIR}/../../../dev/aic7xxx/aicasm/Makefile \
MAKESRCPATH=${.CURDIR}/../../../dev/aic7xxx/aicasm obj
clean:
${MAKE} -f ${.CURDIR}/../../../dev/aic7xxx/aicasm/Makefile \
MAKESRCPATH=${.CURDIR}/../../../dev/aic7xxx/aicasm clean
cleandir:
${MAKE} -f ${.CURDIR}/../../../dev/aic7xxx/aicasm/Makefile \
MAKESRCPATH=${.CURDIR}/../../../dev/aic7xxx/aicasm cleandir
cleandepend:
${MAKE} -f ${.CURDIR}/../../../dev/aic7xxx/aicasm/Makefile \
MAKESRCPATH=${.CURDIR}/../../../dev/aic7xxx/aicasm cleandepend
MAKESRCPATH= ${.CURDIR}/../../../dev/aic7xxx/aicasm
install:
.include "${.CURDIR}/../../../dev/aic7xxx/aicasm/Makefile"
build-tools: ${PROG}