Makefile (063a7ce32ddc2c4f2404b0dfd29e60e3dbcdffac) | Makefile (cfbab37b3da094579b8f7492e4df8a8a4c8c41b0) |
---|---|
1# SPDX-License-Identifier: GPL-2.0 2TARGETS += alsa 3TARGETS += amd-pstate 4TARGETS += arm64 5TARGETS += bpf 6TARGETS += breakpoints 7TARGETS += cachestat 8TARGETS += capabilities --- 12 unchanged lines hidden (view full) --- 21TARGETS += dt 22TARGETS += efivarfs 23TARGETS += exec 24TARGETS += fchmodat2 25TARGETS += filesystems 26TARGETS += filesystems/binderfs 27TARGETS += filesystems/epoll 28TARGETS += filesystems/fat | 1# SPDX-License-Identifier: GPL-2.0 2TARGETS += alsa 3TARGETS += amd-pstate 4TARGETS += arm64 5TARGETS += bpf 6TARGETS += breakpoints 7TARGETS += cachestat 8TARGETS += capabilities --- 12 unchanged lines hidden (view full) --- 21TARGETS += dt 22TARGETS += efivarfs 23TARGETS += exec 24TARGETS += fchmodat2 25TARGETS += filesystems 26TARGETS += filesystems/binderfs 27TARGETS += filesystems/epoll 28TARGETS += filesystems/fat |
29TARGETS += filesystems/overlayfs 30TARGETS += filesystems/statmount | |
31TARGETS += firmware 32TARGETS += fpu 33TARGETS += ftrace 34TARGETS += futex 35TARGETS += gpio 36TARGETS += hid 37TARGETS += intel_pstate 38TARGETS += iommu 39TARGETS += ipc 40TARGETS += ir 41TARGETS += kcmp 42TARGETS += kexec 43TARGETS += kvm 44TARGETS += landlock 45TARGETS += lib 46TARGETS += livepatch 47TARGETS += lkdtm | 29TARGETS += firmware 30TARGETS += fpu 31TARGETS += ftrace 32TARGETS += futex 33TARGETS += gpio 34TARGETS += hid 35TARGETS += intel_pstate 36TARGETS += iommu 37TARGETS += ipc 38TARGETS += ir 39TARGETS += kcmp 40TARGETS += kexec 41TARGETS += kvm 42TARGETS += landlock 43TARGETS += lib 44TARGETS += livepatch 45TARGETS += lkdtm |
48TARGETS += lsm | |
49TARGETS += membarrier 50TARGETS += memfd 51TARGETS += memory-hotplug 52TARGETS += mincore 53TARGETS += mount 54TARGETS += mount_setattr 55TARGETS += move_mount_set_group 56TARGETS += mqueue 57TARGETS += nci 58TARGETS += net 59TARGETS += net/af_unix 60TARGETS += net/forwarding 61TARGETS += net/hsr 62TARGETS += net/mptcp 63TARGETS += net/openvswitch | 46TARGETS += membarrier 47TARGETS += memfd 48TARGETS += memory-hotplug 49TARGETS += mincore 50TARGETS += mount 51TARGETS += mount_setattr 52TARGETS += move_mount_set_group 53TARGETS += mqueue 54TARGETS += nci 55TARGETS += net 56TARGETS += net/af_unix 57TARGETS += net/forwarding 58TARGETS += net/hsr 59TARGETS += net/mptcp 60TARGETS += net/openvswitch |
61TARGETS += net/tcp_ao |
|
64TARGETS += netfilter 65TARGETS += nsfs 66TARGETS += perf_events 67TARGETS += pidfd 68TARGETS += pid_namespace 69TARGETS += powerpc 70TARGETS += prctl 71TARGETS += proc --- 81 unchanged lines hidden (view full) --- 153 # expand a shell special character '~'. We use a somewhat tedious way here. 154 abs_objtree := $(shell cd $(top_srcdir) && mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) && pwd) 155 $(if $(abs_objtree),, \ 156 $(error failed to create output directory "$(KBUILD_OUTPUT)")) 157 # $(realpath ...) resolves symlinks 158 abs_objtree := $(realpath $(abs_objtree)) 159 BUILD := $(abs_objtree)/kselftest 160 KHDR_INCLUDES := -isystem ${abs_objtree}/usr/include | 62TARGETS += netfilter 63TARGETS += nsfs 64TARGETS += perf_events 65TARGETS += pidfd 66TARGETS += pid_namespace 67TARGETS += powerpc 68TARGETS += prctl 69TARGETS += proc --- 81 unchanged lines hidden (view full) --- 151 # expand a shell special character '~'. We use a somewhat tedious way here. 152 abs_objtree := $(shell cd $(top_srcdir) && mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) && pwd) 153 $(if $(abs_objtree),, \ 154 $(error failed to create output directory "$(KBUILD_OUTPUT)")) 155 # $(realpath ...) resolves symlinks 156 abs_objtree := $(realpath $(abs_objtree)) 157 BUILD := $(abs_objtree)/kselftest 158 KHDR_INCLUDES := -isystem ${abs_objtree}/usr/include |
159 KHDR_DIR := ${abs_objtree}/usr/include |
|
161else 162 BUILD := $(CURDIR) 163 abs_srctree := $(shell cd $(top_srcdir) && pwd) 164 KHDR_INCLUDES := -isystem ${abs_srctree}/usr/include | 160else 161 BUILD := $(CURDIR) 162 abs_srctree := $(shell cd $(top_srcdir) && pwd) 163 KHDR_INCLUDES := -isystem ${abs_srctree}/usr/include |
164 KHDR_DIR := ${abs_srctree}/usr/include |
|
165 DEFAULT_INSTALL_HDR_PATH := 1 166endif 167 168# Prepare for headers install 169include $(top_srcdir)/scripts/subarch.include 170ARCH ?= $(SUBARCH) 171export BUILD 172export KHDR_INCLUDES 173 174# set default goal to all, so make without a target runs all, even when 175# all isn't the first target in the file. 176.DEFAULT_GOAL := all 177 | 165 DEFAULT_INSTALL_HDR_PATH := 1 166endif 167 168# Prepare for headers install 169include $(top_srcdir)/scripts/subarch.include 170ARCH ?= $(SUBARCH) 171export BUILD 172export KHDR_INCLUDES 173 174# set default goal to all, so make without a target runs all, even when 175# all isn't the first target in the file. 176.DEFAULT_GOAL := all 177 |
178all: | 178all: kernel_header_files |
179 @ret=1; \ 180 for TARGET in $(TARGETS); do \ 181 BUILD_TARGET=$$BUILD/$$TARGET; \ 182 mkdir $$BUILD_TARGET -p; \ 183 $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET \ 184 O=$(abs_objtree) \ 185 $(if $(FORCE_TARGETS),|| exit); \ 186 ret=$$((ret * $$?)); \ 187 done; exit $$ret; 188 | 179 @ret=1; \ 180 for TARGET in $(TARGETS); do \ 181 BUILD_TARGET=$$BUILD/$$TARGET; \ 182 mkdir $$BUILD_TARGET -p; \ 183 $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET \ 184 O=$(abs_objtree) \ 185 $(if $(FORCE_TARGETS),|| exit); \ 186 ret=$$((ret * $$?)); \ 187 done; exit $$ret; 188 |
189kernel_header_files: 190 @ls $(KHDR_DIR)/linux/*.h >/dev/null 2>/dev/null; \ 191 if [ $$? -ne 0 ]; then \ 192 RED='\033[1;31m'; \ 193 NOCOLOR='\033[0m'; \ 194 echo; \ 195 echo -e "$${RED}error$${NOCOLOR}: missing kernel header files."; \ 196 echo "Please run this and try again:"; \ 197 echo; \ 198 echo " cd $(top_srcdir)"; \ 199 echo " make headers"; \ 200 echo; \ 201 exit 1; \ 202 fi 203 204.PHONY: kernel_header_files 205 |
|
189run_tests: all 190 @for TARGET in $(TARGETS); do \ 191 BUILD_TARGET=$$BUILD/$$TARGET; \ 192 $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests \ 193 O=$(abs_objtree); \ 194 done; 195 196hotplug: --- 82 unchanged lines hidden --- | 206run_tests: all 207 @for TARGET in $(TARGETS); do \ 208 BUILD_TARGET=$$BUILD/$$TARGET; \ 209 $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests \ 210 O=$(abs_objtree); \ 211 done; 212 213hotplug: --- 82 unchanged lines hidden --- |