1# Copyright 2016 The Fuchsia Authors 2# Copyright (c) 2008-2015 Travis Geiselbrecht 3# 4# Use of this source code is governed by a MIT-style 5# license that can be found in the LICENSE file or at 6# https://opensource.org/licenses/MIT 7 8LOCAL_DIR := $(GET_LOCAL_DIR) 9 10MODULE := $(LOCAL_DIR) 11 12MODULE_SRCS := \ 13 $(LOCAL_DIR)/userboot.cpp \ 14 $(LOCAL_DIR)/userboot-image.S \ 15 16MODULE_DEPS := kernel/lib/vdso 17 18userboot-filename := $(BUILDDIR)/system/core/userboot/libuserboot.so 19 20# userboot-image.S embeds this file, so building depends on it. 21MODULE_SRCDEPS += $(userboot-filename).strip 22 23# This generated header file tells the userboot.cpp code 24# where the segment boundaries and entry points are. 25MODULE_SRCDEPS += $(BUILDDIR)/$(LOCAL_DIR)/userboot-code.h 26$(BUILDDIR)/$(LOCAL_DIR)/userboot-code.h: scripts/gen-rodso-code.sh $(userboot-filename) 27 @$(MKDIR) 28 $(call BUILDECHO,generating $@) 29 $(NOECHO)$(SHELLEXEC) $< '$(NM)' '$(READELF)' \ 30 $@.new USERBOOT $(userboot-filename) 31 @mv -f $@.new $@ 32GENERATED += $(BUILDDIR)/$(LOCAL_DIR)/userboot-code.h 33MODULE_COMPILEFLAGS += -I$(BUILDDIR)/$(LOCAL_DIR) 34 35include make/module.mk 36