xref: /xnu-11417.101.15/tests/sched/Makefile (revision e3723e1f17661b24996789d8afc084c0c3303b26)
1*e3723e1fSApple OSS Distributions# Copyright (c) 2024 Apple Inc.  All rights reserved.
2*e3723e1fSApple OSS Distributions
3*e3723e1fSApple OSS DistributionsSCHED_UTILS = sched/sched_test_utils.c
4*e3723e1fSApple OSS DistributionsSCHED_UTILS_FLAGS = -ldarwintest_utils -Wno-format-nonliteral -Wno-cast-qual -Wno-c++98-compat -Wno-format-security
5*e3723e1fSApple OSS DistributionsEXCLUDED_SOURCES += $(SCHED_UTILS)
6*e3723e1fSApple OSS Distributions# Note, SCHED_UTILS depends on -ldarwintest_utils to build
7*e3723e1fSApple OSS Distributions
8*e3723e1fSApple OSS Distributionsinclude sched/sched_test_harness/Makefile
9*e3723e1fSApple OSS Distributions
10*e3723e1fSApple OSS Distributionssched/all_cores_running: OTHER_LDFLAGS += $(SCHED_UTILS_FLAGS)
11*e3723e1fSApple OSS Distributionssched/all_cores_running: $(SCHED_UTILS)
12*e3723e1fSApple OSS DistributionsSCHED_TARGETS += sched/all_cores_running
13*e3723e1fSApple OSS Distributions
14*e3723e1fSApple OSS Distributions
15*e3723e1fSApple OSS Distributionssched/cluster_bound_threads: OTHER_LDFLAGS += $(SCHED_UTILS_FLAGS)
16*e3723e1fSApple OSS Distributionssched/cluster_bound_threads: $(SCHED_UTILS)
17*e3723e1fSApple OSS DistributionsSCHED_TARGETS += sched/cluster_bound_threads
18*e3723e1fSApple OSS Distributions
19*e3723e1fSApple OSS Distributionssched/contextswitch: OTHER_LDFLAGS += $(SCHED_UTILS_FLAGS)
20*e3723e1fSApple OSS Distributionssched/contextswitch: $(SCHED_UTILS)
21*e3723e1fSApple OSS DistributionsSCHED_TARGETS += sched/contextswitch
22*e3723e1fSApple OSS Distributions
23*e3723e1fSApple OSS Distributionssched/enabled_policy: OTHER_LDFLAGS += $(SCHED_UTILS_FLAGS)
24*e3723e1fSApple OSS Distributionssched/enabled_policy: $(SCHED_UTILS)
25*e3723e1fSApple OSS DistributionsSCHED_TARGETS += sched/enabled_policy
26*e3723e1fSApple OSS Distributions
27*e3723e1fSApple OSS Distributionssched/headers_compat_cpp: OTHER_CXXFLAGS += -I$(SRCROOT)/../osfmk
28*e3723e1fSApple OSS DistributionsSCHED_TARGETS += sched/headers_compat_cpp
29*e3723e1fSApple OSS Distributions
30*e3723e1fSApple OSS Distributionssched/headers_compat_c: OTHER_CFLAGS += -I$(SRCROOT)/../osfmk
31*e3723e1fSApple OSS DistributionsSCHED_TARGETS += sched/headers_compat_c
32*e3723e1fSApple OSS Distributions
33*e3723e1fSApple OSS Distributionssched/overloaded_runqueue: CODE_SIGN_ENTITLEMENTS = sched/overloaded_runqueue.entitlements
34*e3723e1fSApple OSS Distributionssched/overloaded_runqueue: OTHER_CFLAGS += -DENTITLED=1
35*e3723e1fSApple OSS Distributionssched/overloaded_runqueue: OTHER_LDFLAGS += -framework ktrace $(SCHED_UTILS_FLAGS)
36*e3723e1fSApple OSS Distributionssched/overloaded_runqueue: $(SCHED_UTILS)
37*e3723e1fSApple OSS DistributionsSCHED_TARGETS += sched/overloaded_runqueue
38*e3723e1fSApple OSS Distributions
39*e3723e1fSApple OSS Distributionssched/thread_group_fairness: CODE_SIGN_ENTITLEMENTS = sched/thread_group_fairness.entitlements
40*e3723e1fSApple OSS Distributionssched/thread_group_fairness: OTHER_CFLAGS += -DENTITLED=1
41*e3723e1fSApple OSS Distributionssched/thread_group_fairness: OTHER_LDFLAGS += -framework perfdata $(SCHED_UTILS_FLAGS)
42*e3723e1fSApple OSS Distributionssched/thread_group_fairness: $(SCHED_UTILS)
43*e3723e1fSApple OSS Distributionssched/thread_group_fairness: sched/thread_group_fairness_workload_config.h
44*e3723e1fSApple OSS Distributionssched/thread_group_fairness_workload_config.h: sched/thread_group_fairness_workload_config.plist
45*e3723e1fSApple OSS Distributions	xxd -i $< > $@
46*e3723e1fSApple OSS DistributionsSCHED_TARGETS += sched/thread_group_fairness
47*e3723e1fSApple OSS Distributions
48*e3723e1fSApple OSS Distributionssched/thread_group_flags: CODE_SIGN_ENTITLEMENTS = sched/thread_group_flags.entitlements
49*e3723e1fSApple OSS Distributionssched/thread_group_flags: OTHER_CFLAGS += -DENTITLED=1
50*e3723e1fSApple OSS Distributionssched/thread_group_flags: OTHER_LDFLAGS += -framework ktrace
51*e3723e1fSApple OSS Distributionssched/thread_group_flags: sched/thread_group_flags_workload_config.h
52*e3723e1fSApple OSS Distributionssched/thread_group_flags_workload_config.h: sched/thread_group_flags_workload_config.plist
53*e3723e1fSApple OSS Distributions	xxd -i $< > $@
54*e3723e1fSApple OSS DistributionsSCHED_TARGETS += sched/thread_group_flags
55*e3723e1fSApple OSS Distributions
56*e3723e1fSApple OSS Distributionssched/yield_aggressor: OTHER_CFLAGS += -Wno-atomic-implicit-seq-cst
57*e3723e1fSApple OSS Distributionssched/yield_aggressor: OTHER_LDFLAGS += -framework perfdata $(SCHED_UTILS_FLAGS)
58*e3723e1fSApple OSS Distributionssched/yield_aggressor: $(SCHED_UTILS)
59*e3723e1fSApple OSS DistributionsSCHED_TARGETS += sched/yield_aggressor
60*e3723e1fSApple OSS Distributions
61*e3723e1fSApple OSS Distributionssched/zero_to_n_tests: OTHER_LDFLAGS += -framework perfdata $(SCHED_UTILS_FLAGS)
62*e3723e1fSApple OSS DistributionsSCHED_TARGETS += sched/zero_to_n_tests
63*e3723e1fSApple OSS Distributions
64*e3723e1fSApple OSS Distributions# Convenience command for building all of the test targets under sched/
65*e3723e1fSApple OSS Distributions.PHONY: sched/all
66*e3723e1fSApple OSS Distributionssched/all: $(SCHED_TARGETS)
67