]> git.lizzy.rs Git - plan9front.git/blob - sys/src/9/pc/mkfile
kernel: cleanup the software mouse cursor mess
[plan9front.git] / sys / src / 9 / pc / mkfile
1 CONF=pc
2 CONFLIST=pc pcf pccpuf
3 EXTRACOPIES=
4 #EXTRACOPIES=lookout boundary   # copy to these servers on install
5
6 objtype=386
7 </$objtype/mkfile
8 p=9
9
10 # must match mem.h
11 KTZERO=0xF0100020
12 APBOOTSTRAP=0xF0007000
13 REBOOTADDR=0x11000
14
15 DEVS=`{rc ../port/mkdevlist $CONF}
16
17 PORT=\
18         alarm.$O\
19         alloc.$O\
20         allocb.$O\
21         auth.$O\
22         cache.$O\
23         chan.$O\
24         dev.$O\
25         edf.$O\
26         fault.$O\
27         page.$O\
28         parse.$O\
29         pgrp.$O\
30         portclock.$O\
31         print.$O\
32         proc.$O\
33         qio.$O\
34         qlock.$O\
35         random.$O\
36         rdb.$O\
37         rebootcmd.$O\
38         memmap.$O\
39         segment.$O\
40         syscallfmt.$O\
41         sysfile.$O\
42         sysproc.$O\
43         taslock.$O\
44         tod.$O\
45         xalloc.$O\
46         userinit.$O\
47
48 OBJ=\
49         l.$O\
50         cga.$O\
51         i8253.$O\
52         i8259.$O\
53         main.$O\
54         memory.$O\
55         mmu.$O\
56         trap.$O\
57         bootargs.$O\
58         $CONF.root.$O\
59         $CONF.rootc.$O\
60         $DEVS\
61         $PORT\
62
63 LIB=\
64         /$objtype/lib/libmemlayer.a\
65         /$objtype/lib/libmemdraw.a\
66         /$objtype/lib/libdraw.a\
67         /$objtype/lib/libip.a\
68         /$objtype/lib/libc.a\
69         /$objtype/lib/libsec.a\
70         /$objtype/lib/libmp.a\
71         /$objtype/lib/libfis.a\
72         /$objtype/lib/libaml.a\
73         /$objtype/lib/libdtracy.a\
74
75 ETHER=`{echo devether.c ether*.c | sed 's/\.c/.'$O'/g'}
76 AUDIO=`{echo devaudio.c audio*.c | sed 's/\.c/.'$O'/g'}
77 VGA=`{echo devvga.c screen.c vga*.c | sed 's/\.c/.'$O'/g'}
78 SDEV=`{echo devsd.c sd*.c | sed 's/\.c/.'$O'/g'}
79
80 $p$CONF:        $OBJ $CONF.$O $LIB
81         $LD -o $target -T$KTZERO -l $prereq
82         size $target
83
84 # don't strip the gzipped kernels -- too frustrating when that's all you have!
85 $p%.gz:D:       $p%
86         gzip -9 <$p$stem >$p$stem.gz
87
88
89 # pcflop and pccd need all the space they can get
90 9pcflop.gz:D: 9pcflop
91         strip -o /fd/1 9pcflop | gzip -9 >9pcflop.gz
92
93 9pccd.gz:D: 9pccd
94         strip -o /fd/1 9pccd | gzip -9 >9pccd.gz
95
96
97 install:V:      $p$CONF
98         cp $p$CONF /$objtype/
99         for(i in $EXTRACOPIES)
100                 import $i / /n/$i && cp $p$CONF $p$CONF.gz /n/$i/$objtype/
101
102 <../boot/bootmkfile
103 <../port/portmkfile
104 <|../port/mkbootrules $CONF
105
106 $ETHER:                         ../port/etherif.h ../port/netif.h
107 $AUDIO:                         ../port/audioif.h
108 ether8003.$O ether8390.$O:      ether8390.h
109 etheryuk.$O:                    yukdump.h
110 $VGA mouse.$O:                  screen.h /sys/include/memdraw.h
111 vgavesa.$O:                     /386/include/ureg.h
112 devfloppy.$O:                   floppy.h
113 mp.$O:                          apbootstrap.i
114 apic.$O archmp.$O mp.$O:        mp.h
115 squidboy.$O:                    mp.h
116 $SDEV:                          ../port/sd.h
117 sd53c8xx.$O:                    sd53c8xx.i
118 sdiahci.$O:                     ahci.h
119 devaoe.$O sdaoe.$O:             ../port/aoe.h
120 main.$O:                        rebootcode.i
121 wavelan.$O:                     wavelan.c ../pc/wavelan.c ../pc/wavelan.h
122 etherwavelan.$O:                etherwavelan.c ../pc/wavelan.h
123 devusb.$O usbuhci.$O usbohci.$O usbehci.$O usbehcipc.$O usbxhci.$O: ../port/usb.h
124 usbehci.$O usbehcipc.$O:        usbehci.h
125 trap.$O main.$O:                /sys/include/tos.h
126 uartaxp.$O:                     uartaxp.i
127 ether8169.$O:                   ../port/ethermii.h
128 etherdp83820.$O:                ../port/ethermii.h
129 etherigbe.$O:                   ../port/ethermii.h
130 ethervgbe.$O:                   ../port/ethermii.h
131 ethervt6102.$O:                 ../port/ethermii.h
132 ethervt6105m.$O:                ../port/ethermii.h
133 etherm10g.$O:                   etherm10g2k.i etherm10g4k.i
134 etheriwl.$O:                    ../port/wifi.h
135 etherwpi.$O:                    ../port/wifi.h
136 etherrt2860.$O:                 ../port/wifi.h
137 l.$O rebootcode.$O apbootstrap.$O:      mem.h
138
139 initcode.out:           init9.$O initcode.$O /$objtype/lib/libc.a
140         $LD -l -R1 -s -o $target $prereq
141
142 rebootcode.out:         rebootcode.$O
143         $LD -l -R4 -s -o $target -T$REBOOTADDR -H3 $prereq
144
145 apbootstrap.out:        apbootstrap.$O
146         $LD -l -R4 -s -o $target -T$APBOOTSTRAP -H3 $prereq
147
148 sd53c8xx.i:     sd53c8xx.n
149         aux/na $prereq > $target
150
151 uartaxp.i:      a100p.cp
152         {echo 'static uchar uartaxpcp[] = {'
153          xd -1x $prereq |
154                 sed -e 's/^[0-9a-f]+ //' -e '/^$/d' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
155          echo '};'
156         } > $target
157
158 etherm10g%.i:   etherm10g%.fw
159         {echo 'static char fw'^$stem^'[] = {'
160          xd -1x $prereq |
161                 sed -e 's/^[0-9a-f]+ //' -e '/^$/d' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
162          echo '};'
163         } > $target
164
165 acid:V:
166         8c -a -w -I. i8253.c>acid
167
168 %.checkether:VQ:
169         for (i in ether*.c){
170                 x=`{echo $i | sed 's/\.c//'}
171                 if(! ~ $x ether8390 && ! grep -s '^     '^$x^'([        ]|$)' $stem)
172                         echo $x not included in $stem
173         }
174         exit 0
175
176 %.checkvga:VQ:
177         for (i in vga*.c){
178                 x=`{echo $i | sed 's/\.c//'}
179                 if(! ~ $x vga vgax vgasavage && ! grep -s '^    '^$x^'([        ]|$)' $stem)
180                         echo $x not included in $stem
181         }
182         exit 0
183
184 checkdist:VQ:
185         for(i in pcdisk pcflop)
186         for(j in checkvga checkether)
187                 mk $i.$j