aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2023-10-08 19:50:00 +0300
committeraqua <aqua@iserlohn-fortress.net>2023-11-27 21:02:22 +0200
commitfc13fb2ba5993d06d9d6ae5e80bc337aebbdc119 (patch)
tree9607ab4d5f1d4069d4f761a0b25eada36088bd6b /src
parentrules.mk: make include paths absolute (diff)
downloadkernel-fc13fb2ba5993d06d9d6ae5e80bc337aebbdc119.tar.xz
Use meson build system
Diffstat (limited to 'src')
-rw-r--r--src/meson.build25
-rwxr-xr-xsrc/mk25
2 files changed, 25 insertions, 25 deletions
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..128a7b5
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,25 @@
+
+kernel_srcs = files('multiboot2.c', 'mmap.c', 'kernel.c', 'mem/vmm.c')
+kernel_incl = include_directories('.')
+
+glitch_elf = executable('glitch.elf', kernel_srcs,
+ include_directories: [ kernel_incl, grub_incl ],
+ dependencies: [ libk, devs, i686 ],
+ link_args: [ '-static', '-nostdlib', '-T', '../i686/linker.ld' ],
+)
+
+# tests
+test('taskqueue',
+ executable('test_taskqueue', 'sched/test_taskqueue.cc',
+ dependencies: [ gtest ],
+ native: true),
+ suite: 'kernel'
+)
+
+test('roundrobin',
+ executable('test_roundrobin', 'sched/test_roundrobin.cc',
+ dependencies: [ gtest ],
+ native: true),
+ suite: 'kernel'
+)
+
diff --git a/src/mk b/src/mk
deleted file mode 100755
index 84a735f..0000000
--- a/src/mk
+++ /dev/null
@@ -1,25 +0,0 @@
-#!../mach
-
-INCLUDES := -isystem${ROOTDIR}grub -I${ROOTDIR}${ARCH} -I${ROOTDIR}devices
-${ARCH}_CFLAGS += ${INCLUDES}
-${ARCH}_CXXFLAGS += ${INCLUDES}
-
-TARGETLIB += kernel
-kernel.SRCS := multiboot2.c mmap.c kernel.cpp mem/vmm.c
-
-HOSTTARGETBIN += sched/test_taskqueue
-sched/test_taskqueue.SRCS = sched/test_taskqueue.cc
-
-HOSTTARGETBIN += sched/test_roundrobin
-sched/test_roundrobin.SRCS = sched/test_roundrobin.cc
-
-TESTS += \
- sched/test_taskqueue sched/test_roundrobin
-
-kernel.c: conf.h
-conf.h: conf.h.in
- @echo ' GEN $@'
- @cp conf.h.in conf.h
- @sed -i 's/@VERSION@/$(shell git describe)/' conf.h
- @sed -i 's/@CC@/${${ARCH}_CCID}/' conf.h
-