lkml.org 
[lkml]   [2015]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 14/28] lkl: plug in the build system
Date
Basic Makefiles for building LKL. Add a new architecture specific
target for installing the resulting library files and headers.

Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
---
arch/lkl/Makefile | 35 +++++++++++++++++++++++++++++++++++
arch/lkl/kernel/Makefile | 3 +++
2 files changed, 38 insertions(+)
create mode 100644 arch/lkl/Makefile
create mode 100644 arch/lkl/kernel/Makefile

diff --git a/arch/lkl/Makefile b/arch/lkl/Makefile
new file mode 100644
index 0000000..7545830
--- /dev/null
+++ b/arch/lkl/Makefile
@@ -0,0 +1,35 @@
+include arch/lkl/auto.conf
+
+KBUILD_CFLAGS += -fno-builtin
+
+ifeq ($(OUTPUT_FORMAT),elf64-x86-64)
+KBUILD_CFLAGS += -fPIC
+endif
+
+LDFLAGS_vmlinux += -r
+LKL_ENTRY_POINTS := lkl_start_kernel lkl_sys_halt lkl_syscall lkl_trigger_irq \
+ lkl_get_free_irq lkl_put_irq
+
+core-y += arch/lkl/kernel/
+
+all: lkl.o
+
+lkl.o: vmlinux
+ $(OBJCOPY) $(foreach sym,$(LKL_ENTRY_POINTS),-G$(prefix)$(sym)) vmlinux lkl.o
+
+install: lkl.o __headers
+ @echo " INSTALL\t$(INSTALL_PATH)/lib/lkl.o"
+ @cp lkl.o $(INSTALL_PATH)/lib/
+ @arch/lkl/scripts/headers_install.py \
+ $(subst -j,-j$(shell nproc),$(findstring -j,$(MAKEFLAGS))) \
+ $(INSTALL_PATH)/include
+
+archclean:
+ $(Q)$(MAKE) $(clean)=$(boot)
+
+define archhelp
+ echo ' install - Install library and headers to INSTALL_PATH/{lib,include}'
+endef
+
+
+
diff --git a/arch/lkl/kernel/Makefile b/arch/lkl/kernel/Makefile
new file mode 100644
index 0000000..47036c0
--- /dev/null
+++ b/arch/lkl/kernel/Makefile
@@ -0,0 +1,3 @@
+extra-y := vmlinux.lds
+
+obj-y = setup.o threads.o irq.o time.o syscalls.o misc.o mem.o console.o
--
2.1.0


\
 
 \ /
  Last update: 2015-11-03 21:41    [W:0.247 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site