ARCH_DIR = arch/um
OS := $(shell uname -s)
-# We require bash because the vmlinux link and loader script cpp use bash
-# features.
+#We require it or things break.
SHELL := /bin/bash
filechk_gen_header = $<
MAKEFILE-$(CONFIG_MODE_SKAS) += Makefile-skas
ifneq ($(MAKEFILE-y),)
- include $(addprefix $(srctree)/$(ARCH_DIR)/,$(MAKEFILE-y))
+ include $(addprefix $(ARCH_DIR)/,$(MAKEFILE-y))
endif
ARCH_INCLUDE := -I$(ARCH_DIR)/include
SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH)
-include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH)
-include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
+include $(ARCH_DIR)/Makefile-$(SUBARCH)
+include $(ARCH_DIR)/Makefile-os-$(OS)
# -Derrno=kernel_errno - This turns all kernel references to errno into
# kernel_errno to separate them from the libc errno. This allows -fno-common
$(SYS_HEADERS) : $(ARCH_DIR)/include/skas_ptregs.h
endif
-.PHONY: linux
-
-all: linux
-
-linux: vmlinux
- ln -f $< $@
-
-define archhelp
- echo '* linux - Binary kernel image (./linux) - for backward'
- echo ' compatibility only, this creates a hard link to the'
- echo ' real kernel binary, the the "vmlinux" binary you'
- echo ' find in the kernel root.'
-endef
-
prepare: $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS) \
$(ARCH_DIR)/kernel/vmlinux.lds.S
-Wl,-T,$(vmlinux-lds) $(vmlinux-init) \
-Wl,--start-group $(vmlinux-main) -Wl,--end-group \
-L/usr/lib -lutil \
- $(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) \
- FORCE ,$^) ; rm -f linux
+ $(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) FORCE ,$^)
endef
USER_CFLAGS := $(patsubst -I%,,$(CFLAGS))
USER_CFLAGS := $(patsubst -Dsigprocmask=kernel_sigprocmask,,$(USER_CFLAGS))
USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \
$(MODE_INCLUDE)
-USER_CFLAGS += $(ARCH_USER_CFLAGS)
# To get a definition of F_SETSIG
USER_CFLAGS += -D_GNU_SOURCE
$(ARCH_DIR)/kernel/skas/util: scripts_basic FORCE
$(Q)$(MAKE) $(build)=$@
-export SUBARCH USER_CFLAGS OS
+define archhelp
+ echo '* linux - Binary kernel image (./linux)'
+endef