]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/9/sgi/mkfile
kernel: implement portable userinit() and simplify process creation
[plan9front.git] / sys / src / 9 / sgi / mkfile
index 1e39e89f843c61fd5c23887dfcf60e9bfcc83d96..ff0ea189f51a62f5fcfe67743bd5124bb720cbe8 100644 (file)
@@ -44,6 +44,7 @@ PORT=\
        taslock.$O\
        tod.$O\
        xalloc.$O\
+       userinit.$O\
 
 OBJ=\
        l.$O\
@@ -79,17 +80,12 @@ install:V:  $p$CONF
 <../port/portmkfile
 <|../port/mkbootrules $CONF
 
-init.h:        init9.s ../port/initcode.c /sys/src/libc/9syscall/sys.h
-       va init9.s
-       vc ../port/initcode.c
-       vl -T$UTZERO -R4 -o init.out init9.$O initcode.$O
-       {echo 'uchar initcode[]={'
-        xd -r -1x init.out |
-               sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
-        echo '};'} > init.h
+initcode.out: init9.$O initcode.$O /$objtype/lib/libc.a
+       $LD -T$UTZERO -R4 -s -o $target $prereq
 
 faultmips.$O mmu.$O syscall.$O  trap.$O: /$objtype/include/ureg.h
-main.$O:       /$objtype/include/ureg.h errstr.h init.h
+main.$O:       /$objtype/include/ureg.h errstr.h
+main.$O trap.$O: /sys/include/tos.h
 
 %.clean:V:
-       rm -f $stem.c [9bz]$stem [9bz]$stem.gz boot$stem.* init.h
+       rm -f $stem.c [9bz]$stem [9bz]$stem.gz boot$stem.*