Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965144AbbKCU3k (ORCPT ); Tue, 3 Nov 2015 15:29:40 -0500 Received: from mga03.intel.com ([134.134.136.65]:38789 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964846AbbKCUXN (ORCPT ); Tue, 3 Nov 2015 15:23:13 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,239,1444719600"; d="scan'208";a="677670329" From: Octavian Purdila To: linux-arch@vger.kernel.org Cc: linux-kernel@vger.kernel.org, thehajime@gmail.com, Octavian Purdila Subject: [RFC PATCH 14/28] lkl: plug in the build system Date: Tue, 3 Nov 2015 22:20:45 +0200 Message-Id: <1446582059-17355-15-git-send-email-octavian.purdila@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1446582059-17355-1-git-send-email-octavian.purdila@intel.com> References: <1446582059-17355-1-git-send-email-octavian.purdila@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1900 Lines: 69 Basic Makefiles for building LKL. Add a new architecture specific target for installing the resulting library files and headers. Signed-off-by: Octavian Purdila --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/