make-install-support-for-transarc-and-prefix-style-universes-20010907
[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 DEST=@DEST@
9 TOP_INCDIR=@TOP_INCDIR@
10 TOP_LIBDIR=@TOP_LIBDIR@
11 prefix=@prefix@
12 exec_prefix=@exec_prefix@
13 bindir=@bindir@
14 sbindir=@sbindir@
15 libexecdir=@libexecdir@
16 libdir=@libdir@
17 includedir=@includedir@
18 mandir=@mandir@
19 afssrvbindir=@afssrvbindir@
20 afssrvsbindir=@afssrvsbindir@
21 afssrvlibexecdir=@afssrvlibexecdir@
22 COMPILE_ET=${TOP_SRCDIR}/comerr/compile_et
23 TOP_SRCDIR=@TOP_SRCDIR@
24 SYS_NAME=@AFS_SYSNAME@
25
26 SHELL = /bin/sh
27
28 include ../config/Makefile.${SYS_NAME}
29
30 LIBS=${TOP_LIBDIR}/libauth.a \
31         ${TOP_LIBDIR}/librxkad.a \
32         ${TOP_LIBDIR}/libdes.a \
33         ${TOP_LIBDIR}/librx.a \
34         ${TOP_LIBDIR}/liblwp.a \
35         ${TOP_LIBDIR}/libcom_err.a \
36         ${TOP_LIBDIR}/util.a \
37         ${TOP_LIBDIR}/libsys.a
38
39 CFLAGS=-I${TOP_INCDIR} -I${TOP_SRCDIR}/config ${XCFLAGS}
40
41 RXGEN=${TOP_SRCDIR}/rxgen/rxgen
42
43 all: upserver upclient
44
45 #
46 # Build targets
47 #
48 upclient: client.o update.cs.o utils.o ${LIBS} 
49         ${CC} ${CFLAGS} -o upclient client.o update.cs.o utils.o ${LIBS} ${XLIBS}
50
51 upserver: server.o utils.o update.ss.o ${LIBS}
52         ${CC} ${CFLAGS} -o upserver server.o utils.o update.ss.o ${LIBS} ${XLIBS}
53
54 utils.o: utils.c update.h global.h
55
56 client.o server.o: update.h global.h AFS_component_version_number.c
57
58 update.cs.c update.ss.c update.er.c update.h: update.xg
59         ${RXGEN} update.xg
60
61 #
62 # Installation targets
63 #
64 install : ${DESTDIR}${afssrvlibexecdir}/upserver ${DESTDIR}${afssrvlibexecdir}/upclient
65
66 ${DEST}/root.server/usr/afs/bin/upserver: upserver
67         ${INSTALL} $? $@
68
69 ${DEST}/root.server/usr/afs/bin/upclient: upclient
70         ${INSTALL} $? $@
71
72 #
73 # Misc. targets
74 #
75 clean: 
76         $(RM) -f *.o upclient upserver update.ss.c update.cs.c update.xdr.c update.h core \
77         AFS_component_version_number.c
78
79 include ../config/Makefile.version
80
81 ${DESTDIR}${afssrvlibexecdir}/upserver: upserver
82         ${INSTALL} $? $@
83
84 ${DESTDIR}${afssrvlibexecdir}/upclient: upclient
85         ${INSTALL} $? $@
86
87 dest: ${DEST}/root.server/usr/afs/bin/upserver ${DEST}/root.server/usr/afs/bin/upclient
88