blob: bff425a8155f4168edbb7b20eb58541ee57e7aa7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
# Generated automatically from Makefile.in by configure.
# === GNUmakefile ============================================================
# Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
#
# Description: This file is for creating the test programs for libpthread.a
#
# 1.00 93/08/03 proven
# -Initial cut for pthreads.
#
INCLUDES= -I/usr/include/pthread
CFLAGS = -O2 -g -Werror $(INCLUDES) -DSRCDIR="\"${.CURDIR}\""
LDFLAGS = -static -lm -lgcc -L../obj.${MACHINE}/ -lpthread
# This list used to include test_select, but that test doesn't terminate.
TESTS = test_create test_pthread_join test_switch test_sleep test_readdir \
test_fork test_execve test_preemption test_preemption_float \
test_sock_1 test_sock_2 test_stdio_1 test_pthread_mutex \
test_pthread_cond_timedwait test_netdb test_pw test_cwd
# This list used to include p_bench_semaphore, but the semaphore support isn't
# defined for all targets (or used for any).
BENCHMARKS = p_bench_read p_bench_mutex p_bench_yield \
p_bench_getpid p_bench_pthread_create
OBJS= ${TESTS:=.o}
BOBJS= ${BENCHMARKS:=.o}
all : $(TESTS) $(BENCHMARKS)
${TESTS}: ${OBJS}
${CC} ${CFLAGS} -o ${.TARGET} ${.TARGET:=.o} ${LDFLAGS}
${BENCHMARKS}: ${BOBJS}
${CC} ${CFLAGS} -o ${.TARGET} ${.TARGET:=.o} ${LDFLAGS}
check : $(TESTS)
set -e ; \
for i in $(TESTS) ; do \
echo Running test $$i ... ; \
./$$i ; \
done
clean:
rm -f *.o $(TESTS) $(BENCHMARKS) a.out core maketmp makeout
depend:
sed '/\#\#\# Dependencies/q' < Makefile > maketmp
(for i in $(CSRC);do $(CPP) -M $$i;done) >> maketmp
cp maketmp Makefile
#test_create : test_create.o ../libpthread.a
# $(CC) $(CFLAGS) -o test_create test_create.o $(LIBS)
#
#test_pthread_join : test_pthread_join.o ../libpthread.a
# $(CC) $(CFLAGS) -o test_pthread_join test_pthread_join.o $(LIBS)
#
#test_switch : test_switch.o ../libpthread.a
# $(CC) $(CFLAGS) -o test_switch test_switch.o $(LIBS)
#
#test_sleep : test_sleep.o ../libpthread.a
# $(CC) $(CFLAGS) -o test_sleep test_sleep.o $(LIBS)
#
#test_readdir : test_readdir.o ../libpthread.a
# $(CC) $(CFLAGS) -o test_readdir test_readdir.o $(LIBS)
#
#test_fork : test_fork.o ../libpthread.a
# $(CC) $(CFLAGS) -o test_fork test_fork.o $(LIBS)
#
#test_execve : test_execve.o ../libpthread.a
# $(CC) $(CFLAGS) -o test_execve test_execve.o $(LIBS)
#
#test_preemption : test_preemption.o ../libpthread.a
# $(CC) $(CFLAGS) -o test_preemption test_preemption.o $(LIBS)
#
#test_preemption_float : test_preemption_float.o ../libpthread.a
# $(CC) $(CFLAGS) -o test_preemption_float test_preemption_float.o $(LIBS)
#
#test_stdio_1 : test_stdio_1.o ../libpthread.a
# $(CC) $(CFLAGS) -o test_stdio_1 test_stdio_1.o $(LIBS)
#
#test_sock_1 : test_sock_1.o ../libpthread.a
# $(CC) $(CFLAGS) -o test_sock_1 test_sock_1.o $(LIBS)
#
#test_sock_2 : test_sock_2a test_sock_2.o ../libpthread.a
# $(CC) $(CFLAGS) -o test_sock_2 test_sock_2.o $(LIBS)
#
#test_sock_2a : test_sock_2a.o ../libpthread.a
# $(CC) $(CFLAGS) -o test_sock_2a test_sock_2a.o $(LIBS)
#
#test_pthread_mutex : test_pthread_mutex.o ../libpthread.a
# $(CC) $(CFLAGS) -o test_pthread_mutex test_pthread_mutex.o $(LIBS)
#
#test_pthread_cond_timedwait : test_pthread_cond_timedwait.o ../libpthread.a
# $(CC) $(CFLAGS) -o test_pthread_cond_timedwait test_pthread_cond_timedwait.o $(LIBS)
#
#test_netdb : test_netdb.o ../libpthread.a
# $(CC) $(CFLAGS) -o test_netdb test_netdb.o $(LIBS)
#
#test_select : test_select.o ../obj/libpthread.a
# $(CC) $(CFLAGS) -o test_select test_select.o $(LIBS)
#
#test_pw : test_pw.o ../obj/libpthread.a
# $(CC) $(CFLAGS) -o test_pw test_pw.o $(LIBS)
#
#test_cwd : test_cwd.o ../obj/libpthread.a
# $(CC) $(CFLAGS) -o test_cwd test_cwd.o $(LIBS)
#
#p_bench_read : p_bench_read.o ../libpthread.a
# $(CC) $(CFLAGS) -o p_bench_read p_bench_read.o $(LIBS)
#
#p_bench_semaphore : p_bench_semaphore.o ../libpthread.a
# $(CC) $(CFLAGS) -o p_bench_semaphore p_bench_semaphore.o $(LIBS)
#
#p_bench_mutex : p_bench_mutex.o ../libpthread.a
# $(CC) $(CFLAGS) -o p_bench_mutex p_bench_mutex.o $(LIBS)
#
#p_bench_yield : p_bench_yield.o ../libpthread.a
# $(CC) $(CFLAGS) -o p_bench_yield p_bench_yield.o $(LIBS)
#
#p_bench_getpid : p_bench_getpid.o ../libpthread.a
# $(CC) $(CFLAGS) -o p_bench_getpid p_bench_getpid.o $(LIBS)
#
#p_bench_pthread_create : p_bench_pthread_create.o ../libpthread.a
# $(CC) $(CFLAGS) -o p_bench_pthread_create p_bench_pthread_create.o $(LIBS)
|