--- cci/sys/stand/Makefile 2019/07/28 12:24:19 1.1.1.1 +++ cci/sys/stand/Makefile 2019/07/28 12:29:48 1.1.1.2 @@ -1,30 +1,31 @@ - -DESTDIR=/DIST.1.2 -AS=/bin/as -CC=/bin/cc -LD=/bin/ld -INCLDIR=${DESTDIR}/usr/include -LIBDIR=${DESTDIR}/lib -ULIBDIR=${DESTDIR}/usr/lib -MAKEPARAM = AS=${AS} CC=${CC} LD=${LD} INCLDIR=${INCLDIR} LIBDIR=${LIBDIR} ULIBDIR=${ULIBDIR} DESTDIR=${DESTDIR} -LIBSDIR= ${DESTDIR}/usr/lib -LIBCDIR= ${DESTDIR}/lib -CFLAGS= -DSTANDALONE -DTAHOE ${COPTS} -COPTS= -O -RELOC= 70000 -MTARELOC= 98000 -BOOTRELOC= 100000 -SRCS= sys.c conf.c prf.c machdep.s +DESTDIR=/usr/src/1.21 +AS= /bin/as +CC= /bin/cc +CPP= /lib/cpp +AR= /bin/ar +LD= /bin/ld +INCLDIR= ${DESTDIR}/usr/include +LIBDIR= ${DESTDIR}/lib +ULIBDIR= ${DESTDIR}/usr/lib +LIBSDIR= . +LIBCDIR= /lib +MAKEPARAM= AS=${AS} CC=${CC} LD=${LD} CPP=${CPP} AR=${AR} INCLDIR=${INCLDIR} LIBDIR=${LIBDIR} ULIBDIR=${ULIBDIR} DESTDIR=${DESTDIR} +COPTS= -O -I.. -I${INCLDIR} +CFLAGS= -DSTANDALONE -DTAHOE ${COPTS} +RELOC= 70000 +MTBOOTRELOC= E0000 +BOOTRELOC= 2E0000 +SRCS= sys.c conf.c prf.c machdep.s DRIVERS= udc.o cy.o vddc.o -LDT1MBSYSOPT= -T ${MTARELOC} -x +MTLDTSYSOPT= -T ${MTBOOTRELOC} -x LDTSYSOPT= -T ${BOOTRELOC} -x LDTOPT= -T ${RELOC} -e _entry -x LDTSF= -N -x CFILES= boot.c cat.c conf.c ls.c prf.c \ - srt0.c sys.c vdformat.c ls.c \ + srt0.c sys.c ls.c \ fastcopy.c devcopy.c cat.c \ - vddc.c cy.c + vddc.c cy.c ALL= boot.fsd boot.smd boot.xfd boot.xsd \ boot1mb.fsd boot1mb.smd boot1mb.xfd boot1mb.xsd \ @@ -37,22 +38,20 @@ install: all rm -f ${DESTDIR}/boot; cp ${DESTDIR}/stand/boot.fsd ${DESTDIR}/boot clean: - rm -f *.o *.map *.bak a.out -cleansrc: + rm -f *.o *.map *.bak a.out ncy.c + @(cd vdfmt; make ${MAKEPARAM} clean) - rm -rf *.[csh] Makefile +clobber: clean + rm -f boot*.??? boot.tape fastcopy cat ls vdformat devcopy + @(cd vdfmt; make ${MAKEPARAM} clobber) machdep.o: machdep.s ../machine/mtpr.h ../h/param.h ../machine/mem.h - /lib/cpp machdep.s | ${AS} -o machdep.o + ${CPP} machdep.s | ${AS} -o machdep.o -${LIBSDIR}/libsa.a: sys.o conf.o ${DRIVERS} prf.o machdep.o - ar crv $@ $? +${LIBSDIR}/libsa.a: sys.o conf.o ${DRIVERS} prf.o machdep.o qsort.o strtok.o strspn.o strpbrk.o + ${AR} crv $@ $? ranlib $@ -${LIBSDIR}/libsa.a: libsa.a -libsa.a: sys.o conf.o ${DRIVERS} prf.o machdep.o - ar crv $@ $? - boot.fsd: boot.fsd.o bootsrt0.o ${LIBSDIR}/libsa.a ${LIBCDIR}/libc.a ${LD} ${LDTSYSOPT} bootsrt0.o boot.fsd.o ${LIBSDIR}/libsa.a \ ${LIBCDIR}/libc.a @@ -74,22 +73,22 @@ boot.xsd: boot.xsd.o bootsrt0.o ${LIBSDI dd if=a.out of=boot.xsd ibs=1024 skip=1 boot1mb.fsd: boot.fsd.o boot1mbsrt0.o ${LIBSDIR}/libsa.a ${LIBCDIR}/libc.a - ${LD} ${LDT1MBSYSOPT} boot1mbsrt0.o boot.fsd.o ${LIBSDIR}/libsa.a \ + ${LD} ${MTLDTSYSOPT} boot1mbsrt0.o boot.fsd.o ${LIBSDIR}/libsa.a \ ${LIBCDIR}/libc.a dd if=a.out of=boot1mb.fsd ibs=1024 skip=1 boot1mb.smd: boot.smd.o boot1mbsrt0.o ${LIBSDIR}/libsa.a ${LIBCDIR}/libc.a - ${LD} ${LDT1MBSYSOPT} boot1mbsrt0.o boot.smd.o ${LIBSDIR}/libsa.a \ + ${LD} ${MTLDTSYSOPT} boot1mbsrt0.o boot.smd.o ${LIBSDIR}/libsa.a \ ${LIBCDIR}/libc.a dd if=a.out of=boot1mb.smd ibs=1024 skip=1 boot1mb.xfd: boot.xfd.o boot1mbsrt0.o ${LIBSDIR}/libsa.a ${LIBCDIR}/libc.a - ${LD} ${LDT1MBSYSOPT} boot1mbsrt0.o boot.xfd.o ${LIBSDIR}/libsa.a \ + ${LD} ${MTLDTSYSOPT} boot1mbsrt0.o boot.xfd.o ${LIBSDIR}/libsa.a \ ${LIBCDIR}/libc.a dd if=a.out of=boot1mb.xfd ibs=1024 skip=1 boot1mb.xsd: boot.xsd.o boot1mbsrt0.o ${LIBSDIR}/libsa.a ${LIBCDIR}/libc.a - ${LD} ${LDT1MBSYSOPT} boot1mbsrt0.o boot.xsd.o ${LIBSDIR}/libsa.a \ + ${LD} ${MTLDTSYSOPT} boot1mbsrt0.o boot.xsd.o ${LIBSDIR}/libsa.a \ ${LIBCDIR}/libc.a dd if=a.out of=boot1mb.xsd ibs=1024 skip=1 @@ -109,14 +108,10 @@ fastcopy: fastcopy.o srt0.o ncy.o ${LIBS mv a.out fastcopy strip fastcopy -xpformat: ../h/xpreg.h xpformat.o srt0.o ${LIBSDIR}/libsa.a ${LIBCDIR}/libc.a - ${LD} ${LDTOPT} srt0.o xpformat.o ${LIBSDIR}/libsa.a ${LIBCDIR}/libc.a - mv a.out xpformat - -vdformat: vdformat.o srt0.o ${LIBSDIR}/libsa.a ${LIBCDIR}/libc.a - ${LD} ${LDTOPT} srt0.o vdformat.o ${LIBSDIR}/libsa.a ${LIBCDIR}/libc.a - cp a.out vdformat - strip vdformat +vdformat: ${LIBSDIR}/libsa.a ${LIBCDIR}/libc.a VDFORMAT + +VDFORMAT: + @(cd vdfmt; make ${MAKEPARAM} ) ls: ls.o srt0.o ${LIBSDIR}/libsa.a ${LIBCDIR}/libc.a ${LD} ${LDTOPT} srt0.o ls.o ${LIBSDIR}/libsa.a ${LIBCDIR}/libc.a @@ -139,17 +134,14 @@ boot.xsd.o: boot.c ${CC} -c $(COPTS) -DXFD boot.c mv boot.o $@ -srt0.o: srt0.c +srt0.o: srt0.c Makefile ${CC} -E -DRELOC=0x${RELOC} ${CFLAGS} srt0.c | ${AS} -o srt0.o -bootsrt0.o: srt0.c +bootsrt0.o: srt0.c Makefile ${CC} -E -DRELOC=0x${BOOTRELOC} -DREL ${CFLAGS} srt0.c | ${AS} -o bootsrt0.o -boot1mbsrt0.o: srt0.c - ${CC} -E -DRELOC=0x${MTARELOC} -DREL ${CFLAGS} srt0.c | ${AS} -o boot1mbsrt0.o - -sfrt0.o: sfrt0.c - ${CC} -E -DRELOC=0x${RELOC} -DREL ${CFLAGS} sfrt0.c | ${AS} -o sfrt0.o +boot1mbsrt0.o: srt0.c Makefile + ${CC} -E -DRELOC=0x${MTBOOTRELOC} -DREL ${CFLAGS} srt0.c | ${AS} -o boot1mbsrt0.o ncy.c: cy.c ln cy.c ncy.c @@ -158,10 +150,10 @@ ncy.o: ncy.c ${CC} -DNOBLOCK ${CFLAGS} -c ncy.c print: - @pr -f makefile + @pr -f Makefile @/usr/ucb/ls -l | pr -f @pr -f *.h *.c *.lst - + @(cd vdfmt; make ${MAKEPARAM} print) depend: grep '^#include' ${CFILES} | grep -v '<' | \ @@ -174,10 +166,11 @@ depend: echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep echo '$$r makedep' >>eddep echo 'w' >>eddep - cp makefile makefile.bak - ed - makefile < eddep + cp Makefile Makefile.bak + ed - Makefile < eddep rm -f eddep makedep - + @(cd vdfmt; make ${MAKEPARAM} depend) + # DO NOT DELETE THIS LINE -- make depend uses it boot.o: ../h/param.h ../h/inode.h ../h/fs.h ../h/vm.h ../machine/mtpr.h saio.h