2014-02-01 09:25:10 +00:00
|
|
|
CONF=pc64
|
2014-09-21 14:06:25 +00:00
|
|
|
CONFLIST=pc64 pccpu64
|
2014-02-01 09:25:10 +00:00
|
|
|
|
|
|
|
objtype=amd64
|
|
|
|
</$objtype/mkfile
|
|
|
|
p=9
|
|
|
|
|
2019-01-04 01:51:29 +00:00
|
|
|
# must match mem.h
|
2014-02-01 09:25:10 +00:00
|
|
|
KTZERO=0xffffffff80110000
|
2018-10-05 22:26:07 +00:00
|
|
|
APBOOTSTRAP=0xffffffff80007000
|
2014-03-16 19:22:59 +00:00
|
|
|
REBOOTADDR=0x11000
|
2014-02-01 09:25:10 +00:00
|
|
|
|
|
|
|
DEVS=`{rc ../port/mkdevlist $CONF}
|
|
|
|
|
|
|
|
PORT=\
|
|
|
|
alarm.$O\
|
|
|
|
alloc.$O\
|
|
|
|
allocb.$O\
|
|
|
|
auth.$O\
|
|
|
|
cache.$O\
|
|
|
|
chan.$O\
|
|
|
|
dev.$O\
|
|
|
|
edf.$O\
|
|
|
|
fault.$O\
|
|
|
|
page.$O\
|
|
|
|
parse.$O\
|
|
|
|
pgrp.$O\
|
|
|
|
portclock.$O\
|
|
|
|
print.$O\
|
|
|
|
proc.$O\
|
|
|
|
qio.$O\
|
|
|
|
qlock.$O\
|
2016-08-27 18:42:31 +00:00
|
|
|
random.$O\
|
2014-02-01 09:25:10 +00:00
|
|
|
rdb.$O\
|
|
|
|
rebootcmd.$O\
|
|
|
|
segment.$O\
|
|
|
|
syscallfmt.$O\
|
|
|
|
sysfile.$O\
|
|
|
|
sysproc.$O\
|
|
|
|
taslock.$O\
|
|
|
|
tod.$O\
|
|
|
|
xalloc.$O\
|
2020-01-26 18:01:36 +00:00
|
|
|
userinit.$O\
|
2014-02-01 09:25:10 +00:00
|
|
|
|
|
|
|
OBJ=\
|
|
|
|
l.$O\
|
|
|
|
cga.$O\
|
|
|
|
i8253.$O\
|
|
|
|
i8259.$O\
|
|
|
|
main.$O\
|
|
|
|
memory.$O\
|
|
|
|
mmu.$O\
|
|
|
|
trap.$O\
|
2017-06-25 20:22:58 +00:00
|
|
|
bootargs.$O\
|
2014-02-01 09:25:10 +00:00
|
|
|
$CONF.root.$O\
|
|
|
|
$CONF.rootc.$O\
|
|
|
|
$DEVS\
|
|
|
|
$PORT\
|
|
|
|
|
|
|
|
LIB=\
|
|
|
|
/$objtype/lib/libmemlayer.a\
|
|
|
|
/$objtype/lib/libmemdraw.a\
|
|
|
|
/$objtype/lib/libdraw.a\
|
|
|
|
/$objtype/lib/libip.a\
|
|
|
|
/$objtype/lib/libsec.a\
|
|
|
|
/$objtype/lib/libmp.a\
|
|
|
|
/$objtype/lib/libc.a\
|
|
|
|
/$objtype/lib/libfis.a\
|
|
|
|
/$objtype/lib/libaml.a\
|
2018-12-11 07:44:34 +00:00
|
|
|
/$objtype/lib/libdtracy.a\
|
2014-02-01 09:25:10 +00:00
|
|
|
|
|
|
|
ETHER=`{cd ../pc; echo devether.c ether*.c | sed 's/\.c/.'$O'/g'}
|
|
|
|
AUDIO=`{cd ../pc; echo devaudio.c audio*.c | sed 's/\.c/.'$O'/g'}
|
|
|
|
VGA=`{cd ../pc; echo devvga.c screen.c vga*.c | sed 's/\.c/.'$O'/g'}
|
|
|
|
SDEV=`{cd ../pc; echo devsd.c sd*.c | sed 's/\.c/.'$O'/g'}
|
|
|
|
|
|
|
|
$p$CONF: $CONF.c $OBJ $LIB
|
|
|
|
$CC $CFLAGS '-DKERNDATE='`{date -n} $CONF.c
|
|
|
|
$LD -o $target -T$KTZERO -R4096 -l $OBJ $CONF.$O $LIB
|
|
|
|
size $target
|
|
|
|
|
|
|
|
install:V: $p$CONF
|
|
|
|
cp $p$CONF /$objtype/
|
|
|
|
for(i in $EXTRACOPIES)
|
|
|
|
import $i / /n/$i && cp $p$CONF $p$CONF.gz /n/$i/$objtype/
|
|
|
|
|
|
|
|
|
|
|
|
# copies generated by the rule below
|
2019-07-11 05:47:39 +00:00
|
|
|
PCHEADERS=usbehci.h screen.h mp.h io.h ahci.h \
|
2016-05-05 14:18:57 +00:00
|
|
|
yukdump.h
|
2014-02-01 09:25:10 +00:00
|
|
|
|
2014-03-24 18:00:34 +00:00
|
|
|
REPCH=`{echo $PCHEADERS | sed 's/\.h//g; s/ /|/g'}
|
2015-07-10 07:04:05 +00:00
|
|
|
^($REPCH)\.h:R: ../pc/\1.h
|
2014-02-01 09:25:10 +00:00
|
|
|
cp $prereq .
|
|
|
|
|
2014-03-24 18:00:34 +00:00
|
|
|
REPCC=`{../port/mkfilelist ../pc}
|
|
|
|
^($REPCC)\.$O:R: '../pc/\1.c'
|
2014-02-01 09:25:10 +00:00
|
|
|
$CC $CFLAGS -I. -. ../pc/$stem1.c
|
|
|
|
|
|
|
|
<../boot/bootmkfile
|
|
|
|
<../port/portmkfile
|
|
|
|
<|../port/mkbootrules $CONF
|
|
|
|
|
2020-01-26 18:01:36 +00:00
|
|
|
l.$O rebootcode.$O apbootstrap.$O: mem.h
|
2014-02-01 09:25:10 +00:00
|
|
|
|
2018-02-11 17:08:03 +00:00
|
|
|
$ETHER: ../port/etherif.h ../port/netif.h
|
2014-02-01 09:25:10 +00:00
|
|
|
$AUDIO: ../port/audioif.h
|
|
|
|
ether8003.$O ether8390.$O: ether8390.h
|
|
|
|
etheryuk.$O: yukdump.h
|
|
|
|
$VGA mouse.$O: screen.h /sys/include/memdraw.h
|
|
|
|
vgavesa.$O: /386/include/ureg.h
|
|
|
|
|
2020-01-26 18:01:36 +00:00
|
|
|
mp.$O: mp.h apbootstrap.i
|
2017-04-11 00:26:39 +00:00
|
|
|
apic.$O squidboy.$O: mp.h
|
|
|
|
archmp.$O archacpi.$O: mp.h
|
2014-02-01 09:25:10 +00:00
|
|
|
|
2019-11-24 20:56:54 +00:00
|
|
|
sd53c8xx.$O: ../pc/sd53c8xx.i
|
|
|
|
../pc/sd53c8xx.i: ../pc/sd53c8xx.n
|
|
|
|
cd ../pc && mk sd53c8xx.i
|
|
|
|
|
2014-02-01 09:25:10 +00:00
|
|
|
$SDEV: ../port/sd.h
|
|
|
|
sdiahci.$O: ahci.h
|
|
|
|
devaoe.$O sdaoe.$O: ../port/aoe.h
|
2020-01-26 18:01:36 +00:00
|
|
|
main.$O: rebootcode.i
|
2014-02-01 09:25:10 +00:00
|
|
|
|
2017-07-16 20:33:24 +00:00
|
|
|
devusb.$O usbuhci.$O usbohci.$O usbehci.$O usbehcipc.$O usbxhci.$O: ../port/usb.h
|
2015-03-25 16:42:51 +00:00
|
|
|
usbehci.$O usbehcipc.$O: usbehci.h
|
|
|
|
|
2020-01-26 18:01:36 +00:00
|
|
|
trap.$O main.$O: /sys/include/tos.h
|
2018-04-12 21:50:10 +00:00
|
|
|
|
2019-07-11 05:47:39 +00:00
|
|
|
ether8169.$O: ../port/ethermii.h
|
|
|
|
etherdp83820.$O: ../port/ethermii.h
|
|
|
|
etherigbe.$O: ../port/ethermii.h
|
|
|
|
ethervgbe.$O: ../port/ethermii.h
|
|
|
|
ethervt6102.$O: ../port/ethermii.h
|
|
|
|
ethervt6105m.$O: ../port/ethermii.h
|
2018-04-12 21:50:10 +00:00
|
|
|
|
2018-02-11 17:08:03 +00:00
|
|
|
etheriwl.$O: ../port/wifi.h
|
|
|
|
etherwpi.$O: ../port/wifi.h
|
|
|
|
etherrt2860.$O: ../port/wifi.h
|
2014-02-01 09:25:10 +00:00
|
|
|
|
2020-01-26 18:01:36 +00:00
|
|
|
initcode.out: init9.$O initcode.$O /$objtype/lib/libc.a
|
|
|
|
$LD -l -R1 -s -o $target $prereq
|
|
|
|
|
|
|
|
$O.rebootcode: rebootcode.$O
|
|
|
|
$LD -l -R1 -s -o $target -T$REBOOTADDR $prereq
|
|
|
|
rebootcode.out: $O.rebootcode
|
|
|
|
dd -if $prereq(1) -of $target -bs 1 -iseek 40
|
|
|
|
|
|
|
|
$O.apbootstrap: apbootstrap.$O
|
|
|
|
$LD -l -R1 -s -o $target -T$APBOOTSTRAP $prereq
|
|
|
|
apbootstrap.out: $O.apbootstrap
|
|
|
|
dd -if $prereq(1) -of $target -bs 1 -iseek 40
|
2014-02-01 09:25:10 +00:00
|
|
|
|
|
|
|
sd53c8xx.i: sd53c8xx.n
|
|
|
|
aux/na $prereq > $target
|
|
|
|
|
|
|
|
acid:V:
|
2014-02-10 22:12:52 +00:00
|
|
|
$CC -a -w main.c>acid
|
2014-02-01 09:25:10 +00:00
|
|
|
|
|
|
|
%.clean:V:
|
2020-01-26 18:01:36 +00:00
|
|
|
rm -f $stem.c [9bz]$stem [9bz]$stem.gz boot$stem.* $O.rebootcode $O.apbootstrap $PCHEADERS
|