Unix: Rework build system
[openafs.git] / src / rxkad / test / Makefile.in
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 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10 include @TOP_OBJDIR@/src/config/Makefile.lwp
11
12 INSTALL = @INSTALL@
13 INSTALL_DATA = @INSTALL_DATA@
14 INSTALL_PROGRAM = @INSTALL_PROGRAM@
15 INSTALL_SCRIPT = @INSTALL_SCRIPT@
16
17
18 CFLAGS=-g -I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
19
20 HEADERS = ../rxkad.h stress.h stress_internal.h stress_errs.h
21
22 LIBS=${TOP_LIBDIR}/libauth.a \
23         ${TOP_LIBDIR}/librx.a \
24         ${TOP_LIBDIR}/liblwp.a \
25         ${TOP_LIBDIR}/libsys.a \
26         ${TOP_LIBDIR}/libcmd.a \
27         ${TOP_LIBDIR}/librxkad.a \
28         ${TOP_LIBDIR}/libdes.a \
29         ${TOP_LIBDIR}/librx.a \
30         ${TOP_LIBDIR}/libcom_err.a \
31         ${TOP_LIBDIR}/util.a
32
33 THLIBS= ${TOP_LIBDIR}/libcmd.a  ${TOP_LIBDIR}/libcom_err.a \
34         ${TOP_LIBDIR}/libafsauthent.a ${TOP_LIBDIR}/libafsrpc.a \
35         ${MT_LIBS} ${ULIBS} ${XLIBS} ${LIBRPC} -lpthread
36
37 THRULE = ${MT_CC} $(COMMON_CFLAGS) $(MT_CFLAGS)
38
39 noversion all test system: stress
40
41 clean:
42         $(RM) -f *.o stress.cs.c stress.ss.c stress.xdr.c stress.h \
43                 stress_errs.c stress_errs.h stress th_*
44
45 stress.ss.o: stress.ss.c
46 stress.cs.o: stress.cs.c
47 stress.xdr.o: stress.xdr.c stress.h
48
49 th_stress.ss.o: stress.ss.c
50         ${THRULE} -c stress.ss.c -o th_stress.ss.o
51
52 th_stress.cs.o: stress.cs.c
53         ${THRULE} -c stress.cs.c -o th_stress.cs.o
54         
55 th_stress.xdr.o: stress.xdr.c stress.h
56         ${THRULE} -c stress.xdr.c -o th_stress.xdr.o
57
58 stress.ss.c: stress.rg
59         ${RXGEN} -A -x -S -o stress.ss.c $(srcdir)/stress.rg
60
61 stress.cs.c: stress.rg
62         ${RXGEN} -A -x -C -o stress.cs.c $(srcdir)/stress.rg
63
64 stress.xdr.c: stress.rg
65         ${RXGEN} -A -x -c -o stress.xdr.c $(srcdir)/stress.rg
66
67 stress.h: stress.rg
68         ${RXGEN} -A -x -h -o stress.h $(srcdir)/stress.rg
69
70 stress_errs.o: stress_errs.c
71
72 th_stress_errs.o: stress_errs.c
73         ${THRULE} -c $(srcdir)/stress_errs.c -o th_stress_errs.o
74
75 stress_errs.c stress_errs.h: stress_errs.et
76         $(RM) -f stress_errs.h stress_errs.c; ${COMPILE_ET} -p ${srcdir} stress_errs -h stress_errs
77
78 stress.o: ${HEADERS}
79 stress_c.o: ${HEADERS}
80 stress_s.o: ${HEADERS}
81
82 th_stress.o: stress.c ${HEADERS}
83         ${THRULE} -c $(srcdir)/stress.c -o th_stress.o
84
85 th_stress_c.o: stress_c.c ${HEADERS}
86         ${THRULE} -c $(srcdir)/stress_c.c -o th_stress_c.o
87
88 th_stress_s.o: stress_s.c ${HEADERS}
89         ${THRULE} -c $(srcdir)/stress_s.c -o th_stress_s.o
90
91 stress: stress.o stress.xdr.o stress_c.o stress_s.o stress.cs.o \
92                 stress.ss.o stress_errs.o 
93         $(AFS_LDRULE) stress.o stress.xdr.o stress_c.o \
94                 stress_s.o stress.cs.o stress.ss.o stress_errs.o \
95                 ${LIBS} ${XLIBS}
96
97 th_stress: th_stress.o th_stress.xdr.o th_stress_c.o th_stress_s.o \
98                 th_stress.cs.o th_stress.ss.o stress_errs.o \
99                 ${LIBRPC}
100         $(AFS_LDRULE) th_stress.o th_stress.xdr.o th_stress_c.o \
101                 th_stress_s.o th_stress.cs.o th_stress.ss.o stress_errs.o \
102                 ${THLIBS} ${XLIBS}
103