aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2021-12-20 13:12:06 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2021-12-20 13:12:06 +0200
commita37974009152b4bf6a2d7ed205a48230f939dd72 (patch)
tree8fb3dd159751a9cf983fd78819aad7ff69bb03cc /scripts
parentdc2e2cc9dc9d7790e23dd9a4ccc265d7bb6d76aa (diff)
downloadkmi-a37974009152b4bf6a2d7ed205a48230f939dd72.tar.gz
kmi-a37974009152b4bf6a2d7ed205a48230f939dd72.zip
still some issues with vmem
+ Not sure if I should go with noinit or init, fuck
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gen-deps30
1 files changed, 24 insertions, 6 deletions
diff --git a/scripts/gen-deps b/scripts/gen-deps
index ee64022..7a468d3 100755
--- a/scripts/gen-deps
+++ b/scripts/gen-deps
@@ -11,25 +11,43 @@ gencommon () {
echo "${obj}: ${s}" >> deps.mk
}
-
genlink () {
gencommon ".ld"
- echo " \$(GENLINK) $< | \$(STRIPLINK) | \$(KERN_INFO) > \$@"\
+ if [ "${init}" = "0" ] ; then
+ echo " \$(GENLINK) $< | \$(STRIPLINK) > \$@"\
+ >> deps.mk;
+ else
+ echo " \$(GENLINK) $< | \$(STRIPLINK) | \$(KERN_INFO) > \$@"\
>> deps.mk;
+ fi
+
}
genrule () {
gencommon "${1}"
- echo " \$(COMPILE) -c \$< -o \$@" >> deps.mk
+ echo " \$(COMPILE) ${defs} -c \$< -o \$@" >> deps.mk
}
case "${1}" in
- --compile)
- suffix=.o
+ --kern)
+ suffix=.k.o
+ defs=-DKERNEL
+ func=genrule
+ ;;
+ --init)
+ suffix=.i.o
+ defs=-DINIT
func=genrule
;;
- --link)
+ --init-link)
+ suffix=.ld
+ init=1
+ func=genlink
+ ;;
+
+ --kern-link)
suffix=.ld
+ init=0
func=genlink
esac