Standardize License information
[openafs.git] / src / rxkad / test / Makefile
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3
4 # This software has been released under the terms of the IBM Public
5 # License.  For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
7
8 BACKDIR=../../../../PARENT/dest/
9 include ../../config/Makefile.${SYS_NAME}
10
11 OPTIMIZE=-g
12
13 INCDIRS= -I${DESTDIR}include -I.. -I${BACKDIR}include
14
15 HEADERS = ../rxkad.h stress.h stress_internal.h stress_errs.h
16
17 LDIR= ${DESTDIR}lib/
18 ULIBS = ${LDIR}afs/libcmd.a ${LDIR}afs/libcom_err.a ${DESTDIR}lib/afs/util.a
19
20 LIBS = ../librxkad.a  ${LDIR}librx.a ${LDIR}libdes.a \
21         ${LDIR}liblwp.a  ${ULIBS} ${XLIBS}
22
23 LIBRPC = ../../librpc/libafsrpc.so
24 THLIBS= ${LDIR}afs/libcmd.a  ${LDIR}afs/libcom_err.a \
25         ${ULIBS} ${XLIBS} ${LIBRPC} -lpthread
26
27 CFLAGS = ${OPTIMIZE} ${INCDIRS}  ${XCFLAGS}
28
29
30 THFLAGS = -mt -DAFS_PTHREAD_ENV
31
32 THRULE = ${CC} ${CFLAGS} ${THFLAGS} -c $?
33
34 COMPILE_ET = ${SRCDIR}bin/compile_et
35
36 noversion all test system: stress
37
38 clean:
39         rm -f *.o stress.cs.c stress.ss.c stress.xdr.c stress.h \
40                 stress_errs.c stress_errs.h stress th_*
41
42 stress.ss.o: stress.ss.c
43 stress.cs.o: stress.cs.c
44 stress.xdr.o: stress.xdr.c stress.h
45
46 th_stress.ss.o: stress.ss.c
47         ${THRULE} -o th_stress.ss.o
48
49 th_stress.cs.o: stress.cs.c
50         ${THRULE} -o th_stress.cs.o
51         
52 th_stress.xdr.o: stress.xdr.c stress.h
53         ${THRULE} -o th_stress.xdr.o
54
55 stress.ss.c stress.cs.c stress.xdr.c stress.h: stress.rg
56         ${SRCDIR}bin/rxgen stress.rg
57
58 stress_errs.o: stress_errs.c
59
60 th_stress_errs.o: stress_errs.c
61         ${THRULE} -o th_stress_errs.o
62
63 stress_errs.c stress_errs.h: stress_errs.et
64         rm -f stress_errs.h stress_errs.c; ${COMPILE_ET} stress_errs -h stress_errs
65
66 stress.o stress_c.o stress_s.o: ${HEADERS}
67
68 th_stress.o: stress.c ${HEADERS}
69         ${THRULE} -o th_stress.o
70
71 th_stress_c.o: stress_c.c ${HEADERS}
72         ${THRULE} -o th_stress_c.o
73
74 th_stress_s.o: stress_s.c ${HEADERS}
75         ${THRULE} -o th_stress_s.o
76
77 stress: stress.o stress.xdr.o stress_c.o stress_s.o stress.cs.o \
78                 stress.ss.o stress_errs.o 
79         $(CC) $(CFLAGS) -o stress stress.o stress.xdr.o stress_c.o \
80                 stress_s.o stress.cs.o stress.ss.o stress_errs.o ${LIBS}
81
82 th_stress: th_stress.o th_stress.xdr.o th_stress_c.o th_stress_s.o \
83                 th_stress.cs.o th_stress.ss.o stress_errs.o \
84                 ${LIBRPC}
85         ${CC} ${CFLAGS} ${THFLAGS} -o th_stress th_stress.o th_stress.xdr.o \
86                 th_stress_c.o th_stress_s.o th_stress.cs.o th_stress.ss.o \
87                 stress_errs.o ${THLIBS}
88