]> git.saurik.com Git - apple/libpthread.git/blame - tests/Makefile
libpthread-454.100.8.tar.gz
[apple/libpthread.git] / tests / Makefile
CommitLineData
2546420a
A
1PROJECT := libpthread
2TEST_DIR := tests/
964d3577 3
a0619f9c
A
4ENABLE_LTE_TESTS=YES
5
2546420a
A
6ifeq ($(DEVELOPER_DIR),)
7 DEVELOPER_DIR := $(shell xcode-select -p)
8endif
3a6437e6 9
2546420a 10include $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.common
3a6437e6 11
2546420a
A
12TARGETS :=
13TARGETS += atfork
14TARGETS += bsdthread_set_self
214d78a2
A
15TARGETS += stack
16TARGETS += stack_size
2546420a
A
17TARGETS += cond
18#TARGETS += cond_hang3
19#TARGETS += cond_stress
20TARGETS += cond_timed
214d78a2 21TARGETS += cond_prepost
2546420a
A
22TARGETS += custom_stack
23TARGETS += stack_aslr
24TARGETS += join
25TARGETS += main_stack
26TARGETS += main_stack_custom
a0619f9c 27TARGETS += detach
2546420a
A
28#TARGETS += maxwidth
29TARGETS += mutex
214d78a2 30TARGETS += mutex_prepost
2546420a
A
31TARGETS += mutex_try
32TARGETS += once_cancel
33TARGETS += pthread_attr_setstacksize
34TARGETS += pthread_bulk_create
35TARGETS += pthread_cancel
c6e5f90c 36TARGETS += pthread_create_from_mach_thread
2546420a
A
37TARGETS += pthread_cwd
38TARGETS += pthread_exit
39TARGETS += pthread_introspection
40TARGETS += pthread_setspecific
41TARGETS += pthread_threadid_np
a0619f9c 42TARGETS += pthread_get_qos_class_np
214d78a2 43TARGETS += pthread_dependency
2546420a 44#TARGETS += qos
a0619f9c 45TARGETS += rdar_32848402
2546420a
A
46#TARGETS += rwlock-22244050
47#TARGETS += rwlock-signal
48#TARGETS += rwlock
49TARGETS += tsd
c6e5f90c 50TARGETS += setrlimit_sigsegv
2546420a
A
51#TARGETS += wq_block_handoff
52#TARGETS += wq_event_manager
53#TARGETS += wq_kevent
54#TARGETS += wq_kevent_stress
a0619f9c 55TARGETS += wq_limits
2546420a 56TARGETS += add_timer_termination
214d78a2 57TARGETS += perf_contended_mutex_rwlock
6dae708f
A
58
59ifeq ($(PLATFORM),MacOSX)
c1f56ec9
A
60TARGETS += pthread_jit_write_protection
61pthread_jit_write_protection: CODE_SIGN_ENTITLEMENTS=pthread_jit_write_protection-entitlements.plist
6dae708f 62endif
964d3577 63
c6e5f90c
A
64# this should be CUSTOM_TARGETS, see "Compatibility defines" in Makefile.targets
65OTHER_TARGETS := stackoverflow_crash
66
a0619f9c
A
67OTHER_LTE_INCLUDE_FILES += \
68 /usr/local/lib/libdarwintest_utils.dylib
964d3577 69
2546420a
A
70OTHER_CFLAGS := -DDARWINTEST -Weverything \
71 -Wno-vla -Wno-bad-function-cast -Wno-missing-noreturn \
72 -Wno-missing-field-initializers -Wno-format-pedantic \
c1f56ec9
A
73 -Wno-gnu-folding-constant -Wno-used-but-marked-unused \
74 -Wno-padded
2546420a 75OTHER_LDFLAGS := -ldarwintest_utils
964d3577 76
2546420a
A
77#TARGETS += main_stack_legacy // Disabled by default due to linker warnings
78#main_stack_legacy: OTHER_LDFLAGS += -Wl,-stack_addr,0xc1000000 -Wl,-stack_size,0x0f00000
79#main_stack_legacy: OTHER_CFLAGS += -DSTACKSIZE=0x0f00000
80#main_stack_legacy: ARCH_FLAGS = -arch i386
81#main_stack_legacy: DEPLOYMENT_TARGET_FLAGS = -mmacosx-version-min=10.7
964d3577 82
214d78a2
A
83main_stack_custom: OTHER_LDFLAGS += -Wl,-stack_size,0x124000
84main_stack_custom: OTHER_CFLAGS += -DSTACKSIZE=0x124000
964d3577 85
2546420a 86bsdthread_set_self: OTHER_CFLAGS += -D_DARWIN_FEATURE_CLOCK_GETTIME
3a6437e6 87
2546420a 88include $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.targets
c6e5f90c
A
89
90stackoverflow_crash: helpers/stackoverflow_crash.c
91 mkdir -p $(SYMROOT)/assets/
92 $(CC) -o $(SYMROOT)/assets/$@ $(CFLAGS) -D_POSIX_C_SOURCE=1 $(OTHER_CFLAGS) $(LDFLAGS) $(OTHER_LDFLAGS) $<
93 env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/assets/$@
94
95install-stackoverflow_crash: stackoverflow_crash
96 mkdir -p $(INSTALLDIR)/assets
97 @cp $(SYMROOT)/assets/stackoverflow_crash $(INSTALLDIR)/assets
c1f56ec9 98