update link order
[openafs.git] / src / update / 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 INSTALL = @INSTALL@
11 INSTALL_DATA = @INSTALL_DATA@
12 INSTALL_PROGRAM = @INSTALL_PROGRAM@
13 INSTALL_SCRIPT = @INSTALL_SCRIPT@
14
15 LIBS=${TOP_LIBDIR}/libauth.a \
16         ${TOP_LIBDIR}/librxkad.a \
17         ${TOP_LIBDIR}/libdes.a \
18         ${TOP_LIBDIR}/librx.a \
19         ${TOP_LIBDIR}/libsys.a \
20         ${TOP_LIBDIR}/librx.a \
21         ${TOP_LIBDIR}/liblwp.a \
22         ${TOP_LIBDIR}/libcom_err.a \
23         ${TOP_LIBDIR}/util.a
24
25 all: upserver upclient
26
27 #
28 # Build targets
29 #
30 upclient: client.o update.cs.o utils.o ${LIBS} 
31         ${CC} ${CFLAGS} -o upclient client.o update.cs.o utils.o ${LIBS} ${XLIBS}
32
33 upserver: server.o utils.o update.ss.o ${LIBS}
34         ${CC} ${CFLAGS} -o upserver server.o utils.o update.ss.o ${LIBS} ${XLIBS}
35
36 utils.o: utils.c update.h global.h
37
38 client.o server.o: update.h global.h AFS_component_version_number.c
39
40 update.cs.c: update.xg
41         ${RXGEN} -A -u -C -o $@ ${srcdir}/update.xg
42
43 update.ss.c: update.xg
44         ${RXGEN} -A -S -o $@ ${srcdir}/update.xg
45
46 update.xdr.c: update.xg
47         ${RXGEN} -A -c -o $@ ${srcdir}/update.xg
48
49 update.h: update.xg
50         ${RXGEN} -A -u -h -o $@ ${srcdir}/update.xg
51
52 update.cs.c: update.h
53 update.ss.c: update.h
54 update.er.c: update.h
55
56 #
57 # Installation targets
58 #
59 install: upserver upclient
60         ${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
61         ${INSTALL_PROGRAM} upserver ${DESTDIR}${afssrvlibexecdir}/upserver
62         ${INSTALL_PROGRAM} upclient ${DESTDIR}${afssrvlibexecdir}/upclient
63
64 dest: upserver upclient
65         ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
66         ${INSTALL_PROGRAM} upserver ${DEST}/root.server/usr/afs/bin/upserver
67         ${INSTALL_PROGRAM} upclient ${DEST}/root.server/usr/afs/bin/upclient
68
69 #
70 # Misc. targets
71 #
72 clean: 
73         $(RM) -f *.o upclient upserver update.ss.c update.cs.c update.xdr.c update.h core \
74         AFS_component_version_number.c
75
76 include ../config/Makefile.version