mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-08 13:28:05 +00:00
Bring the Alpha and x86 Makefiles closer together.
This commit is contained in:
parent
278657c32d
commit
31f723c7bc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=55532
@ -31,7 +31,7 @@ S= ./@
|
|||||||
S= ../..
|
S= ../..
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
ALPHA= ${S}/alpha
|
M= ${MACHINE}
|
||||||
|
|
||||||
SIZE?= size
|
SIZE?= size
|
||||||
|
|
||||||
@ -74,22 +74,25 @@ NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} $<
|
|||||||
NORMAL_S= ${CC} -c ${ASM_CFLAGS} $<
|
NORMAL_S= ${CC} -c ${ASM_CFLAGS} $<
|
||||||
PROFILE_C= ${CC} -c ${CFLAGS} $<
|
PROFILE_C= ${CC} -c ${CFLAGS} $<
|
||||||
|
|
||||||
GEN_CFILES= ${ALPHA}/alpha/genassym.c
|
GEN_CFILES= $S/$M/$M/genassym.c
|
||||||
# setdef0.c and setdef1.c are intentionally
|
# setdef0.c and setdef1.c are intentionally
|
||||||
# omitted from SYSTEM_CFILES. They include setdefs.h, a header which
|
# omitted from SYSTEM_CFILES. They include setdefs.h, a header which
|
||||||
# is generated from all of ${OBJS}. We don't want to have to compile
|
# is generated from all of ${OBJS}. We don't want to have to compile
|
||||||
# everything just to do a make depend.
|
# everything just to do a make depend.
|
||||||
SYSTEM_CFILES= ioconf.c param.c vnode_if.c config.c
|
SYSTEM_CFILES= ioconf.c param.c vnode_if.c config.c
|
||||||
SYSTEM_SFILES= ${ALPHA}/alpha/locore.s
|
SYSTEM_SFILES= $S/$M/$M/locore.s
|
||||||
SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
|
SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
|
||||||
|
|
||||||
|
.if ${KERNFORMAT} == elf
|
||||||
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
|
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
|
||||||
setdef1.o hack.So
|
setdef1.o hack.So
|
||||||
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/alpha/conf/kernel.script \
|
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/$M/conf/kernel.script \
|
||||||
-e locorestart \
|
-e locorestart \
|
||||||
-export-dynamic -dynamic-linker /red/herring \
|
-export-dynamic -dynamic-linker /red/herring \
|
||||||
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
||||||
SYSTEM_LD_TAIL= @${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
SYSTEM_LD_TAIL= @${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
||||||
SYSTEM_DEP+= $S/alpha/conf/kernel.script
|
SYSTEM_DEP+= $S/$M/conf/kernel.script
|
||||||
|
.endif
|
||||||
|
|
||||||
%BEFORE_DEPEND
|
%BEFORE_DEPEND
|
||||||
|
|
||||||
@ -110,7 +113,12 @@ FULLKERNEL= ${KERNEL}
|
|||||||
.else
|
.else
|
||||||
FULLKERNEL= ${KERNEL}.debug
|
FULLKERNEL= ${KERNEL}.debug
|
||||||
${KERNEL}: ${FULLKERNEL}
|
${KERNEL}: ${FULLKERNEL}
|
||||||
|
.if ${KERNFORMAT} == "elf"
|
||||||
objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
|
objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
|
||||||
|
.else
|
||||||
|
cp ${FULLKERNEL} ${KERNEL}
|
||||||
|
strip ${FMT} -d ${KERNEL}
|
||||||
|
.endif
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
||||||
@ -131,20 +139,22 @@ clean:
|
|||||||
|
|
||||||
#lint: /tmp param.c
|
#lint: /tmp param.c
|
||||||
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
|
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
|
||||||
# ${ALPHA}/alpha/Locore.c ${CFILES} ioconf.c param.c | \
|
# $S/$M/$M/Locore.c ${CFILES} ioconf.c param.c | \
|
||||||
# grep -v 'struct/union .* never defined' | \
|
# grep -v 'struct/union .* never defined' | \
|
||||||
# grep -v 'possible pointer alignment problem'
|
# grep -v 'possible pointer alignment problem'
|
||||||
|
|
||||||
locore.o: ${ALPHA}/alpha/locore.s assym.s
|
locore.o: $S/$M/$M/locore.s assym.s
|
||||||
${NORMAL_S}
|
${NORMAL_S}
|
||||||
|
|
||||||
|
.if ${KERNFORMAT} == elf
|
||||||
# This is a hack. BFD "optimizes" away dynamic mode if there are no
|
# This is a hack. BFD "optimizes" away dynamic mode if there are no
|
||||||
# dynamic references. We could probably do a '-Bforcedynamic' mode like
|
# dynamic references. We could probably do a '-Bforcedynamic' mode like
|
||||||
# in the a.out ld. For now, this works.
|
# in the a.out ld. For now, this works.
|
||||||
hack.So: Makefile
|
hack.So: Makefile
|
||||||
touch hack.c
|
touch hack.c
|
||||||
${CC} -shared -nostdlib hack.c -o hack.So
|
${CC} ${FMT} -shared -nostdlib hack.c -o hack.So
|
||||||
rm -f hack.c
|
rm -f hack.c
|
||||||
|
.endif
|
||||||
|
|
||||||
.ORDER: setdefs.h setdef0.c setdef1.c
|
.ORDER: setdefs.h setdef0.c setdef1.c
|
||||||
|
|
||||||
@ -163,8 +173,8 @@ setdef0.c setdef1.c setdefs.h: ${OBJS}
|
|||||||
assym.s: genassym
|
assym.s: genassym
|
||||||
./genassym >assym.s
|
./genassym >assym.s
|
||||||
|
|
||||||
genassym.o: ${ALPHA}/alpha/genassym.c
|
genassym.o: $S/$M/$M/genassym.c
|
||||||
${CC} -c ${GEN_CFLAGS} ${ALPHA}/alpha/genassym.c
|
${CC} -c ${GEN_CFLAGS} $S/$M/$M/genassym.c
|
||||||
|
|
||||||
genassym: genassym.o
|
genassym: genassym.o
|
||||||
${CC} ${GEN_CFLAGS} genassym.o -o ${.TARGET}
|
${CC} ${GEN_CFLAGS} genassym.o -o ${.TARGET}
|
||||||
@ -174,42 +184,42 @@ SYSTEM_OBJS+= __remqu.o __remq.o __remlu.o __reml.o
|
|||||||
CLEAN+= __divqu.S __divq.S __divlu.S __divl.S
|
CLEAN+= __divqu.S __divq.S __divlu.S __divl.S
|
||||||
CLEAN+= __remqu.S __remq.S __remlu.S __reml.S
|
CLEAN+= __remqu.S __remq.S __remlu.S __reml.S
|
||||||
|
|
||||||
__divqu.S: ${S}/alpha/alpha/divrem.m4
|
__divqu.S: $S/$M/$M/divrem.m4
|
||||||
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
||||||
@(echo "define(NAME,\`__divqu')define(OP,\`div')define(S,\`false')"; \
|
@(echo "define(NAME,\`__divqu')define(OP,\`div')define(S,\`false')"; \
|
||||||
echo "define(WORDSIZE,64)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
echo "define(WORDSIZE,64)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
||||||
|
|
||||||
__divq.S: ${S}/alpha/alpha/divrem.m4
|
__divq.S: $S/$M/$M/divrem.m4
|
||||||
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
||||||
@(echo "define(NAME,\`__divq')define(OP,\`div')define(S,\`true')"; \
|
@(echo "define(NAME,\`__divq')define(OP,\`div')define(S,\`true')"; \
|
||||||
echo "define(WORDSIZE,64)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
echo "define(WORDSIZE,64)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
||||||
|
|
||||||
__divlu.S: ${S}/alpha/alpha/divrem.m4
|
__divlu.S: $S/$M/$M/divrem.m4
|
||||||
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
||||||
@(echo "define(NAME,\`__divlu')define(OP,\`div')define(S,\`false')"; \
|
@(echo "define(NAME,\`__divlu')define(OP,\`div')define(S,\`false')"; \
|
||||||
echo "define(WORDSIZE,32)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
echo "define(WORDSIZE,32)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
||||||
|
|
||||||
__divl.S: ${S}/alpha/alpha/divrem.m4
|
__divl.S: $S/$M/$M/divrem.m4
|
||||||
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
||||||
@(echo "define(NAME,\`__divl')define(OP,\`div')define(S,\`true')"; \
|
@(echo "define(NAME,\`__divl')define(OP,\`div')define(S,\`true')"; \
|
||||||
echo "define(WORDSIZE,32)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
echo "define(WORDSIZE,32)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
||||||
|
|
||||||
__remqu.S: ${S}/alpha/alpha/divrem.m4
|
__remqu.S: $S/$M/$M/divrem.m4
|
||||||
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
||||||
@(echo "define(NAME,\`__remqu')define(OP,\`rem')define(S,\`false')"; \
|
@(echo "define(NAME,\`__remqu')define(OP,\`rem')define(S,\`false')"; \
|
||||||
echo "define(WORDSIZE,64)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
echo "define(WORDSIZE,64)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
||||||
|
|
||||||
__remq.S: ${S}/alpha/alpha/divrem.m4
|
__remq.S: $S/$M/$M/divrem.m4
|
||||||
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
||||||
@(echo "define(NAME,\`__remq')define(OP,\`rem')define(S,\`true')"; \
|
@(echo "define(NAME,\`__remq')define(OP,\`rem')define(S,\`true')"; \
|
||||||
echo "define(WORDSIZE,64)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
echo "define(WORDSIZE,64)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
||||||
|
|
||||||
__remlu.S: ${S}/alpha/alpha/divrem.m4
|
__remlu.S: $S/$M/$M/divrem.m4
|
||||||
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
||||||
@(echo "define(NAME,\`__remlu')define(OP,\`rem')define(S,\`false')"; \
|
@(echo "define(NAME,\`__remlu')define(OP,\`rem')define(S,\`false')"; \
|
||||||
echo "define(WORDSIZE,32)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
echo "define(WORDSIZE,32)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
||||||
|
|
||||||
__reml.S: ${S}/alpha/alpha/divrem.m4
|
__reml.S: $S/$M/$M/divrem.m4
|
||||||
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
||||||
@(echo "define(NAME,\`__reml')define(OP,\`rem')define(S,\`true')"; \
|
@(echo "define(NAME,\`__reml')define(OP,\`rem')define(S,\`true')"; \
|
||||||
echo "define(WORDSIZE,32)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
echo "define(WORDSIZE,32)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
||||||
|
@ -31,7 +31,7 @@ S= ./@
|
|||||||
S= ../..
|
S= ../..
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
ALPHA= ${S}/alpha
|
M= ${MACHINE}
|
||||||
|
|
||||||
SIZE?= size
|
SIZE?= size
|
||||||
|
|
||||||
@ -74,22 +74,25 @@ NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} $<
|
|||||||
NORMAL_S= ${CC} -c ${ASM_CFLAGS} $<
|
NORMAL_S= ${CC} -c ${ASM_CFLAGS} $<
|
||||||
PROFILE_C= ${CC} -c ${CFLAGS} $<
|
PROFILE_C= ${CC} -c ${CFLAGS} $<
|
||||||
|
|
||||||
GEN_CFILES= ${ALPHA}/alpha/genassym.c
|
GEN_CFILES= $S/$M/$M/genassym.c
|
||||||
# setdef0.c and setdef1.c are intentionally
|
# setdef0.c and setdef1.c are intentionally
|
||||||
# omitted from SYSTEM_CFILES. They include setdefs.h, a header which
|
# omitted from SYSTEM_CFILES. They include setdefs.h, a header which
|
||||||
# is generated from all of ${OBJS}. We don't want to have to compile
|
# is generated from all of ${OBJS}. We don't want to have to compile
|
||||||
# everything just to do a make depend.
|
# everything just to do a make depend.
|
||||||
SYSTEM_CFILES= ioconf.c param.c vnode_if.c config.c
|
SYSTEM_CFILES= ioconf.c param.c vnode_if.c config.c
|
||||||
SYSTEM_SFILES= ${ALPHA}/alpha/locore.s
|
SYSTEM_SFILES= $S/$M/$M/locore.s
|
||||||
SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
|
SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
|
||||||
|
|
||||||
|
.if ${KERNFORMAT} == elf
|
||||||
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
|
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
|
||||||
setdef1.o hack.So
|
setdef1.o hack.So
|
||||||
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/alpha/conf/kernel.script \
|
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/$M/conf/kernel.script \
|
||||||
-e locorestart \
|
-e locorestart \
|
||||||
-export-dynamic -dynamic-linker /red/herring \
|
-export-dynamic -dynamic-linker /red/herring \
|
||||||
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
||||||
SYSTEM_LD_TAIL= @${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
SYSTEM_LD_TAIL= @${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
||||||
SYSTEM_DEP+= $S/alpha/conf/kernel.script
|
SYSTEM_DEP+= $S/$M/conf/kernel.script
|
||||||
|
.endif
|
||||||
|
|
||||||
%BEFORE_DEPEND
|
%BEFORE_DEPEND
|
||||||
|
|
||||||
@ -110,7 +113,12 @@ FULLKERNEL= ${KERNEL}
|
|||||||
.else
|
.else
|
||||||
FULLKERNEL= ${KERNEL}.debug
|
FULLKERNEL= ${KERNEL}.debug
|
||||||
${KERNEL}: ${FULLKERNEL}
|
${KERNEL}: ${FULLKERNEL}
|
||||||
|
.if ${KERNFORMAT} == "elf"
|
||||||
objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
|
objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
|
||||||
|
.else
|
||||||
|
cp ${FULLKERNEL} ${KERNEL}
|
||||||
|
strip ${FMT} -d ${KERNEL}
|
||||||
|
.endif
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
||||||
@ -131,20 +139,22 @@ clean:
|
|||||||
|
|
||||||
#lint: /tmp param.c
|
#lint: /tmp param.c
|
||||||
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
|
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
|
||||||
# ${ALPHA}/alpha/Locore.c ${CFILES} ioconf.c param.c | \
|
# $S/$M/$M/Locore.c ${CFILES} ioconf.c param.c | \
|
||||||
# grep -v 'struct/union .* never defined' | \
|
# grep -v 'struct/union .* never defined' | \
|
||||||
# grep -v 'possible pointer alignment problem'
|
# grep -v 'possible pointer alignment problem'
|
||||||
|
|
||||||
locore.o: ${ALPHA}/alpha/locore.s assym.s
|
locore.o: $S/$M/$M/locore.s assym.s
|
||||||
${NORMAL_S}
|
${NORMAL_S}
|
||||||
|
|
||||||
|
.if ${KERNFORMAT} == elf
|
||||||
# This is a hack. BFD "optimizes" away dynamic mode if there are no
|
# This is a hack. BFD "optimizes" away dynamic mode if there are no
|
||||||
# dynamic references. We could probably do a '-Bforcedynamic' mode like
|
# dynamic references. We could probably do a '-Bforcedynamic' mode like
|
||||||
# in the a.out ld. For now, this works.
|
# in the a.out ld. For now, this works.
|
||||||
hack.So: Makefile
|
hack.So: Makefile
|
||||||
touch hack.c
|
touch hack.c
|
||||||
${CC} -shared -nostdlib hack.c -o hack.So
|
${CC} ${FMT} -shared -nostdlib hack.c -o hack.So
|
||||||
rm -f hack.c
|
rm -f hack.c
|
||||||
|
.endif
|
||||||
|
|
||||||
.ORDER: setdefs.h setdef0.c setdef1.c
|
.ORDER: setdefs.h setdef0.c setdef1.c
|
||||||
|
|
||||||
@ -163,8 +173,8 @@ setdef0.c setdef1.c setdefs.h: ${OBJS}
|
|||||||
assym.s: genassym
|
assym.s: genassym
|
||||||
./genassym >assym.s
|
./genassym >assym.s
|
||||||
|
|
||||||
genassym.o: ${ALPHA}/alpha/genassym.c
|
genassym.o: $S/$M/$M/genassym.c
|
||||||
${CC} -c ${GEN_CFLAGS} ${ALPHA}/alpha/genassym.c
|
${CC} -c ${GEN_CFLAGS} $S/$M/$M/genassym.c
|
||||||
|
|
||||||
genassym: genassym.o
|
genassym: genassym.o
|
||||||
${CC} ${GEN_CFLAGS} genassym.o -o ${.TARGET}
|
${CC} ${GEN_CFLAGS} genassym.o -o ${.TARGET}
|
||||||
@ -174,42 +184,42 @@ SYSTEM_OBJS+= __remqu.o __remq.o __remlu.o __reml.o
|
|||||||
CLEAN+= __divqu.S __divq.S __divlu.S __divl.S
|
CLEAN+= __divqu.S __divq.S __divlu.S __divl.S
|
||||||
CLEAN+= __remqu.S __remq.S __remlu.S __reml.S
|
CLEAN+= __remqu.S __remq.S __remlu.S __reml.S
|
||||||
|
|
||||||
__divqu.S: ${S}/alpha/alpha/divrem.m4
|
__divqu.S: $S/$M/$M/divrem.m4
|
||||||
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
||||||
@(echo "define(NAME,\`__divqu')define(OP,\`div')define(S,\`false')"; \
|
@(echo "define(NAME,\`__divqu')define(OP,\`div')define(S,\`false')"; \
|
||||||
echo "define(WORDSIZE,64)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
echo "define(WORDSIZE,64)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
||||||
|
|
||||||
__divq.S: ${S}/alpha/alpha/divrem.m4
|
__divq.S: $S/$M/$M/divrem.m4
|
||||||
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
||||||
@(echo "define(NAME,\`__divq')define(OP,\`div')define(S,\`true')"; \
|
@(echo "define(NAME,\`__divq')define(OP,\`div')define(S,\`true')"; \
|
||||||
echo "define(WORDSIZE,64)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
echo "define(WORDSIZE,64)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
||||||
|
|
||||||
__divlu.S: ${S}/alpha/alpha/divrem.m4
|
__divlu.S: $S/$M/$M/divrem.m4
|
||||||
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
||||||
@(echo "define(NAME,\`__divlu')define(OP,\`div')define(S,\`false')"; \
|
@(echo "define(NAME,\`__divlu')define(OP,\`div')define(S,\`false')"; \
|
||||||
echo "define(WORDSIZE,32)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
echo "define(WORDSIZE,32)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
||||||
|
|
||||||
__divl.S: ${S}/alpha/alpha/divrem.m4
|
__divl.S: $S/$M/$M/divrem.m4
|
||||||
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
||||||
@(echo "define(NAME,\`__divl')define(OP,\`div')define(S,\`true')"; \
|
@(echo "define(NAME,\`__divl')define(OP,\`div')define(S,\`true')"; \
|
||||||
echo "define(WORDSIZE,32)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
echo "define(WORDSIZE,32)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
||||||
|
|
||||||
__remqu.S: ${S}/alpha/alpha/divrem.m4
|
__remqu.S: $S/$M/$M/divrem.m4
|
||||||
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
||||||
@(echo "define(NAME,\`__remqu')define(OP,\`rem')define(S,\`false')"; \
|
@(echo "define(NAME,\`__remqu')define(OP,\`rem')define(S,\`false')"; \
|
||||||
echo "define(WORDSIZE,64)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
echo "define(WORDSIZE,64)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
||||||
|
|
||||||
__remq.S: ${S}/alpha/alpha/divrem.m4
|
__remq.S: $S/$M/$M/divrem.m4
|
||||||
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
||||||
@(echo "define(NAME,\`__remq')define(OP,\`rem')define(S,\`true')"; \
|
@(echo "define(NAME,\`__remq')define(OP,\`rem')define(S,\`true')"; \
|
||||||
echo "define(WORDSIZE,64)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
echo "define(WORDSIZE,64)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
||||||
|
|
||||||
__remlu.S: ${S}/alpha/alpha/divrem.m4
|
__remlu.S: $S/$M/$M/divrem.m4
|
||||||
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
||||||
@(echo "define(NAME,\`__remlu')define(OP,\`rem')define(S,\`false')"; \
|
@(echo "define(NAME,\`__remlu')define(OP,\`rem')define(S,\`false')"; \
|
||||||
echo "define(WORDSIZE,32)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
echo "define(WORDSIZE,32)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
||||||
|
|
||||||
__reml.S: ${S}/alpha/alpha/divrem.m4
|
__reml.S: $S/$M/$M/divrem.m4
|
||||||
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
@echo 'building ${.TARGET} from ${.ALLSRC}'
|
||||||
@(echo "define(NAME,\`__reml')define(OP,\`rem')define(S,\`true')"; \
|
@(echo "define(NAME,\`__reml')define(OP,\`rem')define(S,\`true')"; \
|
||||||
echo "define(WORDSIZE,32)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
echo "define(WORDSIZE,32)"; cat ${.ALLSRC}) | m4 > ${.TARGET}
|
||||||
|
@ -31,7 +31,7 @@ S= ./@
|
|||||||
S= ../..
|
S= ../..
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
I386= ${S}/i386
|
M= ${MACHINE}
|
||||||
|
|
||||||
SIZE?= size
|
SIZE?= size
|
||||||
|
|
||||||
@ -81,13 +81,13 @@ NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} $<
|
|||||||
NORMAL_S= ${CC} -c ${ASM_CFLAGS} $<
|
NORMAL_S= ${CC} -c ${ASM_CFLAGS} $<
|
||||||
PROFILE_C= ${CC} -c ${CFLAGS} $<
|
PROFILE_C= ${CC} -c ${CFLAGS} $<
|
||||||
|
|
||||||
GEN_CFILES= ${I386}/i386/genassym.c
|
GEN_CFILES= $S/$M/$M/genassym.c
|
||||||
# setdef0.c and setdef1.c are intentionally
|
# setdef0.c and setdef1.c are intentionally
|
||||||
# omitted from SYSTEM_CFILES. They include setdefs.h, a header which
|
# omitted from SYSTEM_CFILES. They include setdefs.h, a header which
|
||||||
# is generated from all of ${OBJS}. We don't want to have to compile
|
# is generated from all of ${OBJS}. We don't want to have to compile
|
||||||
# everything just to do a make depend.
|
# everything just to do a make depend.
|
||||||
SYSTEM_CFILES= ioconf.c param.c vnode_if.c config.c
|
SYSTEM_CFILES= ioconf.c param.c vnode_if.c config.c
|
||||||
SYSTEM_SFILES= ${I386}/i386/locore.s
|
SYSTEM_SFILES= $S/$M/$M/locore.s
|
||||||
SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
|
SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
|
||||||
|
|
||||||
.if ${KERNFORMAT} == aout || ${KERNFORMAT} == aoutkld
|
.if ${KERNFORMAT} == aout || ${KERNFORMAT} == aoutkld
|
||||||
@ -99,11 +99,11 @@ SYSTEM_LD_TAIL= @${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
|||||||
.if ${KERNFORMAT} == elf
|
.if ${KERNFORMAT} == elf
|
||||||
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
|
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
|
||||||
setdef1.o hack.So
|
setdef1.o hack.So
|
||||||
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/i386/conf/kernel.script \
|
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/$M/conf/kernel.script \
|
||||||
-export-dynamic -dynamic-linker /red/herring \
|
-export-dynamic -dynamic-linker /red/herring \
|
||||||
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
||||||
SYSTEM_LD_TAIL= @${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
SYSTEM_LD_TAIL= @${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
||||||
SYSTEM_DEP+= $S/i386/conf/kernel.script
|
SYSTEM_DEP+= $S/$M/conf/kernel.script
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
%BEFORE_DEPEND
|
%BEFORE_DEPEND
|
||||||
@ -129,7 +129,7 @@ ${KERNEL}: ${FULLKERNEL}
|
|||||||
objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
|
objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
|
||||||
.else
|
.else
|
||||||
cp ${FULLKERNEL} ${KERNEL}
|
cp ${FULLKERNEL} ${KERNEL}
|
||||||
strip -aout -d ${KERNEL}
|
strip ${FMT} -d ${KERNEL}
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
@ -151,11 +151,11 @@ clean:
|
|||||||
|
|
||||||
#lint: /tmp param.c
|
#lint: /tmp param.c
|
||||||
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
|
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
|
||||||
# ${I386}/i386/Locore.c ${CFILES} ioconf.c param.c | \
|
# $S/$M/$M/Locore.c ${CFILES} ioconf.c param.c | \
|
||||||
# grep -v 'struct/union .* never defined' | \
|
# grep -v 'struct/union .* never defined' | \
|
||||||
# grep -v 'possible pointer alignment problem'
|
# grep -v 'possible pointer alignment problem'
|
||||||
|
|
||||||
locore.o: ${I386}/i386/locore.s assym.s
|
locore.o: $S/$M/$M/locore.s assym.s
|
||||||
${NORMAL_S}
|
${NORMAL_S}
|
||||||
|
|
||||||
.if ${KERNFORMAT} == elf
|
.if ${KERNFORMAT} == elf
|
||||||
@ -185,8 +185,8 @@ setdef0.c setdef1.c setdefs.h: ${OBJS}
|
|||||||
assym.s: genassym
|
assym.s: genassym
|
||||||
./genassym >assym.s
|
./genassym >assym.s
|
||||||
|
|
||||||
genassym.o: ${I386}/i386/genassym.c
|
genassym.o: $S/$M/$M/genassym.c
|
||||||
${CC} -c ${GEN_CFLAGS} ${I386}/i386/genassym.c
|
${CC} -c ${GEN_CFLAGS} $S/$M/$M/genassym.c
|
||||||
|
|
||||||
genassym: genassym.o
|
genassym: genassym.o
|
||||||
${CC} ${GEN_CFLAGS} genassym.o -o ${.TARGET}
|
${CC} ${GEN_CFLAGS} genassym.o -o ${.TARGET}
|
||||||
|
@ -31,7 +31,7 @@ S= ./@
|
|||||||
S= ../..
|
S= ../..
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
I386= ${S}/i386
|
M= ${MACHINE}
|
||||||
|
|
||||||
SIZE?= size
|
SIZE?= size
|
||||||
|
|
||||||
@ -81,13 +81,13 @@ NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} $<
|
|||||||
NORMAL_S= ${CC} -c ${ASM_CFLAGS} $<
|
NORMAL_S= ${CC} -c ${ASM_CFLAGS} $<
|
||||||
PROFILE_C= ${CC} -c ${CFLAGS} $<
|
PROFILE_C= ${CC} -c ${CFLAGS} $<
|
||||||
|
|
||||||
GEN_CFILES= ${I386}/i386/genassym.c
|
GEN_CFILES= $S/$M/$M/genassym.c
|
||||||
# setdef0.c and setdef1.c are intentionally
|
# setdef0.c and setdef1.c are intentionally
|
||||||
# omitted from SYSTEM_CFILES. They include setdefs.h, a header which
|
# omitted from SYSTEM_CFILES. They include setdefs.h, a header which
|
||||||
# is generated from all of ${OBJS}. We don't want to have to compile
|
# is generated from all of ${OBJS}. We don't want to have to compile
|
||||||
# everything just to do a make depend.
|
# everything just to do a make depend.
|
||||||
SYSTEM_CFILES= ioconf.c param.c vnode_if.c config.c
|
SYSTEM_CFILES= ioconf.c param.c vnode_if.c config.c
|
||||||
SYSTEM_SFILES= ${I386}/i386/locore.s
|
SYSTEM_SFILES= $S/$M/$M/locore.s
|
||||||
SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
|
SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
|
||||||
|
|
||||||
.if ${KERNFORMAT} == aout || ${KERNFORMAT} == aoutkld
|
.if ${KERNFORMAT} == aout || ${KERNFORMAT} == aoutkld
|
||||||
@ -99,11 +99,11 @@ SYSTEM_LD_TAIL= @${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
|||||||
.if ${KERNFORMAT} == elf
|
.if ${KERNFORMAT} == elf
|
||||||
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
|
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
|
||||||
setdef1.o hack.So
|
setdef1.o hack.So
|
||||||
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/i386/conf/kernel.script \
|
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/$M/conf/kernel.script \
|
||||||
-export-dynamic -dynamic-linker /red/herring \
|
-export-dynamic -dynamic-linker /red/herring \
|
||||||
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
||||||
SYSTEM_LD_TAIL= @${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
SYSTEM_LD_TAIL= @${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
||||||
SYSTEM_DEP+= $S/i386/conf/kernel.script
|
SYSTEM_DEP+= $S/$M/conf/kernel.script
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
%BEFORE_DEPEND
|
%BEFORE_DEPEND
|
||||||
@ -129,7 +129,7 @@ ${KERNEL}: ${FULLKERNEL}
|
|||||||
objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
|
objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
|
||||||
.else
|
.else
|
||||||
cp ${FULLKERNEL} ${KERNEL}
|
cp ${FULLKERNEL} ${KERNEL}
|
||||||
strip -aout -d ${KERNEL}
|
strip ${FMT} -d ${KERNEL}
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
@ -151,11 +151,11 @@ clean:
|
|||||||
|
|
||||||
#lint: /tmp param.c
|
#lint: /tmp param.c
|
||||||
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
|
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
|
||||||
# ${I386}/i386/Locore.c ${CFILES} ioconf.c param.c | \
|
# $S/$M/$M/Locore.c ${CFILES} ioconf.c param.c | \
|
||||||
# grep -v 'struct/union .* never defined' | \
|
# grep -v 'struct/union .* never defined' | \
|
||||||
# grep -v 'possible pointer alignment problem'
|
# grep -v 'possible pointer alignment problem'
|
||||||
|
|
||||||
locore.o: ${I386}/i386/locore.s assym.s
|
locore.o: $S/$M/$M/locore.s assym.s
|
||||||
${NORMAL_S}
|
${NORMAL_S}
|
||||||
|
|
||||||
.if ${KERNFORMAT} == elf
|
.if ${KERNFORMAT} == elf
|
||||||
@ -185,8 +185,8 @@ setdef0.c setdef1.c setdefs.h: ${OBJS}
|
|||||||
assym.s: genassym
|
assym.s: genassym
|
||||||
./genassym >assym.s
|
./genassym >assym.s
|
||||||
|
|
||||||
genassym.o: ${I386}/i386/genassym.c
|
genassym.o: $S/$M/$M/genassym.c
|
||||||
${CC} -c ${GEN_CFLAGS} ${I386}/i386/genassym.c
|
${CC} -c ${GEN_CFLAGS} $S/$M/$M/genassym.c
|
||||||
|
|
||||||
genassym: genassym.o
|
genassym: genassym.o
|
||||||
${CC} ${GEN_CFLAGS} genassym.o -o ${.TARGET}
|
${CC} ${GEN_CFLAGS} genassym.o -o ${.TARGET}
|
||||||
|
@ -31,7 +31,7 @@ S= ./@
|
|||||||
S= ../..
|
S= ../..
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
I386= ${S}/i386
|
M= ${MACHINE}
|
||||||
|
|
||||||
SIZE?= size
|
SIZE?= size
|
||||||
|
|
||||||
@ -81,13 +81,13 @@ NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} $<
|
|||||||
NORMAL_S= ${CC} -c ${ASM_CFLAGS} $<
|
NORMAL_S= ${CC} -c ${ASM_CFLAGS} $<
|
||||||
PROFILE_C= ${CC} -c ${CFLAGS} $<
|
PROFILE_C= ${CC} -c ${CFLAGS} $<
|
||||||
|
|
||||||
GEN_CFILES= ${I386}/i386/genassym.c
|
GEN_CFILES= $S/$M/$M/genassym.c
|
||||||
# setdef0.c and setdef1.c are intentionally
|
# setdef0.c and setdef1.c are intentionally
|
||||||
# omitted from SYSTEM_CFILES. They include setdefs.h, a header which
|
# omitted from SYSTEM_CFILES. They include setdefs.h, a header which
|
||||||
# is generated from all of ${OBJS}. We don't want to have to compile
|
# is generated from all of ${OBJS}. We don't want to have to compile
|
||||||
# everything just to do a make depend.
|
# everything just to do a make depend.
|
||||||
SYSTEM_CFILES= ioconf.c param.c vnode_if.c config.c
|
SYSTEM_CFILES= ioconf.c param.c vnode_if.c config.c
|
||||||
SYSTEM_SFILES= ${I386}/i386/locore.s
|
SYSTEM_SFILES= $S/$M/$M/locore.s
|
||||||
SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
|
SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
|
||||||
|
|
||||||
.if ${KERNFORMAT} == aout || ${KERNFORMAT} == aoutkld
|
.if ${KERNFORMAT} == aout || ${KERNFORMAT} == aoutkld
|
||||||
@ -99,11 +99,11 @@ SYSTEM_LD_TAIL= @${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
|||||||
.if ${KERNFORMAT} == elf
|
.if ${KERNFORMAT} == elf
|
||||||
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
|
SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o config.o \
|
||||||
setdef1.o hack.So
|
setdef1.o hack.So
|
||||||
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/i386/conf/kernel.script \
|
SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/$M/conf/kernel.script \
|
||||||
-export-dynamic -dynamic-linker /red/herring \
|
-export-dynamic -dynamic-linker /red/herring \
|
||||||
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
|
||||||
SYSTEM_LD_TAIL= @${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
SYSTEM_LD_TAIL= @${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET}
|
||||||
SYSTEM_DEP+= $S/i386/conf/kernel.script
|
SYSTEM_DEP+= $S/$M/conf/kernel.script
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
%BEFORE_DEPEND
|
%BEFORE_DEPEND
|
||||||
@ -129,7 +129,7 @@ ${KERNEL}: ${FULLKERNEL}
|
|||||||
objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
|
objcopy --strip-debug ${FULLKERNEL} ${KERNEL}
|
||||||
.else
|
.else
|
||||||
cp ${FULLKERNEL} ${KERNEL}
|
cp ${FULLKERNEL} ${KERNEL}
|
||||||
strip -aout -d ${KERNEL}
|
strip ${FMT} -d ${KERNEL}
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
@ -151,11 +151,11 @@ clean:
|
|||||||
|
|
||||||
#lint: /tmp param.c
|
#lint: /tmp param.c
|
||||||
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
|
# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \
|
||||||
# ${I386}/i386/Locore.c ${CFILES} ioconf.c param.c | \
|
# $S/$M/$M/Locore.c ${CFILES} ioconf.c param.c | \
|
||||||
# grep -v 'struct/union .* never defined' | \
|
# grep -v 'struct/union .* never defined' | \
|
||||||
# grep -v 'possible pointer alignment problem'
|
# grep -v 'possible pointer alignment problem'
|
||||||
|
|
||||||
locore.o: ${I386}/i386/locore.s assym.s
|
locore.o: $S/$M/$M/locore.s assym.s
|
||||||
${NORMAL_S}
|
${NORMAL_S}
|
||||||
|
|
||||||
.if ${KERNFORMAT} == elf
|
.if ${KERNFORMAT} == elf
|
||||||
@ -185,8 +185,8 @@ setdef0.c setdef1.c setdefs.h: ${OBJS}
|
|||||||
assym.s: genassym
|
assym.s: genassym
|
||||||
./genassym >assym.s
|
./genassym >assym.s
|
||||||
|
|
||||||
genassym.o: ${I386}/i386/genassym.c
|
genassym.o: $S/$M/$M/genassym.c
|
||||||
${CC} -c ${GEN_CFLAGS} ${I386}/i386/genassym.c
|
${CC} -c ${GEN_CFLAGS} $S/$M/$M/genassym.c
|
||||||
|
|
||||||
genassym: genassym.o
|
genassym: genassym.o
|
||||||
${CC} ${GEN_CFLAGS} genassym.o -o ${.TARGET}
|
${CC} ${GEN_CFLAGS} genassym.o -o ${.TARGET}
|
||||||
|
Loading…
Reference in New Issue
Block a user