Update warning inhibition
[openafs.git] / src / ptserver / 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 srcdir=@srcdir@
8 include @TOP_OBJDIR@/src/config/Makefile.config
9 INSTALL = @INSTALL@
10 INSTALL_DATA = @INSTALL_DATA@
11 INSTALL_PROGRAM = @INSTALL_PROGRAM@
12 INSTALL_SCRIPT = @INSTALL_SCRIPT@
13
14 INCLS=${TOP_INCDIR}/ubik.h \
15         ${TOP_INCDIR}/lock.h  \
16         ${TOP_INCDIR}/lwp.h \
17         ${TOP_INCDIR}/rx/rx.h \
18         ${TOP_INCDIR}/rx/xdr.h \
19         ${TOP_INCDIR}/afs/keys.h \
20         ${TOP_INCDIR}/afs/cellconfig.h \
21         ptserver.h ptclient.h ptuser.h ptint.h pterror.h map.h ptprototypes.h
22
23 LINCLS=${TOP_INCDIR}/ubik.h \
24         ${TOP_INCDIR}/lock.h \
25         ${TOP_INCDIR}/rx/rx.h \
26         ${TOP_INCDIR}/rx/xdr.h  \
27         ${TOP_INCDIR}/rx/rxkad.h \
28         ${TOP_INCDIR}/afs/auth.h \
29         ${TOP_INCDIR}/afs/cellconfig.h \
30         ptclient.h ptuser.h ptint.h pterror.h
31
32 LIBS=${TOP_LIBDIR}/libubik.a \
33         ${TOP_LIBDIR}/libauth.a \
34         ${TOP_LIBDIR}/librxkad.a \
35         ${TOP_LIBDIR}/librxstat.a \
36         ${TOP_LIBDIR}/librx.a \
37         ${TOP_LIBDIR}/liblwp.a \
38         ${TOP_LIBDIR}/libdes.a \
39         ${TOP_LIBDIR}/libcmd.a \
40         ${TOP_LIBDIR}/libcom_err.a \
41         ${TOP_LIBDIR}/libsys.a \
42         ${TOP_LIBDIR}/libafsutil.a
43
44
45 all: ptserver pts pt_util db_verify ${TOP_LIBDIR}/libprot.a \
46         depinstall readgroup readpwd testpt
47
48 depinstall: \
49         ptint.cs.c ptint.xdr.c \
50         ${TOP_INCDIR}/afs/prclient.h \
51         ${TOP_INCDIR}/afs/prerror.h \
52         ${TOP_INCDIR}/afs/print.h \
53         ${TOP_INCDIR}/afs/prserver.h \
54         ${TOP_INCDIR}/afs/ptclient.h \
55         ${TOP_INCDIR}/afs/ptuser.h \
56         ${TOP_INCDIR}/afs/pterror.h \
57         ${TOP_INCDIR}/afs/ptint.h \
58         ${TOP_INCDIR}/afs/ptserver.h
59
60 ${TOP_LIBDIR}/libprot.a: libprot.a
61         ${INSTALL_DATA} $? $@
62
63 ${TOP_INCDIR}/afs/prclient.h: ptclient.h
64         ${INSTALL_DATA} $? $@
65
66 ${TOP_INCDIR}/afs/prerror.h: pterror.h
67         ${INSTALL_DATA} $? $@
68
69 ${TOP_INCDIR}/afs/print.h: ptint.h
70         ${INSTALL_DATA} $? $@
71
72 ${TOP_INCDIR}/afs/prserver.h: ptserver.h
73         ${INSTALL_DATA} $? $@
74
75 ${TOP_INCDIR}/afs/ptclient.h: ptclient.h
76         ${INSTALL_DATA} $? $@
77
78 ${TOP_INCDIR}/afs/ptuser.h: ptuser.h
79         ${INSTALL_DATA} $? $@
80
81 ${TOP_INCDIR}/afs/pterror.h: pterror.h
82         ${INSTALL_DATA} $? $@
83
84 ${TOP_INCDIR}/afs/ptint.h: ptint.h
85         ${INSTALL_DATA} $? $@
86
87 ${TOP_INCDIR}/afs/ptserver.h: ptserver.h
88         ${INSTALL_DATA} $? $@
89
90 #
91 # Build targets
92 #
93 ptserver: ptserver.o ptutils.o ptprocs.o ptint.ss.o ptint.xdr.o utils.o $(LIBS) ${TOP_LIBDIR}/libaudit.a map.o
94         $(CC) ${CFLAGS} -o ptserver ptserver.o ptutils.o ptprocs.o ptint.ss.o ptint.xdr.o utils.o map.o $(LIBS) ${XLIBS} ${TOP_LIBDIR}/libaudit.a
95
96 ptserver.o: ptserver.c ${INCLS} AFS_component_version_number.c
97
98 ptutils.o: ptutils.c ${INCLS}
99
100 ptprocs.o: ptprocs.c ${INCLS}
101
102 utils.o: utils.c ${INCLS} 
103
104 map.o: map.c ${INCLS}
105
106 ptint.ss.o: ptint.ss.c ptint.xdr.c ptint.xg
107 ptint.cs.o: ptint.cs.c ptint.xdr.c ptint.xg
108 ptint.xdr.o: ptint.xdr.c ptint.h ptint.xg
109
110 ptint.cs.c: ptint.xg
111         ${RXGEN} -A -x -C -u -o $@ ${srcdir}/ptint.xg
112
113 ptint.ss.c: ptint.xg
114         ${RXGEN} -A -x -S -o $@ ${srcdir}/ptint.xg
115
116 ptint.xdr.c: ptint.xg
117         ${RXGEN} -A -x -c -o $@ ${srcdir}/ptint.xg
118
119 ptint.h: ptint.xg
120         ${RXGEN} -A -x -h -u -o $@ ${srcdir}/ptint.xg
121
122 ptint.cs.c: ptint.h
123 ptint.ss.c: ptint.h
124 ptint.xdr.c: ptint.h
125
126 Kptint.cs.c: ptint.xg Kptint.h
127         ${RXGEN} -A -x -k -C -o Kptint.cs.c ${srcdir}/ptint.xg
128
129 Kptint.xdr.c: ptint.xg
130         ${RXGEN} -A -x -k -c -o Kptint.xdr.c ${srcdir}/ptint.xg
131
132 Kptint.h: ptint.xg
133         ${RXGEN} -A -x -k -h -o Kptint.h ${srcdir}/ptint.xg
134
135 display.o: display.c ${INCLS}
136
137 db_verify.o: db_verify.c ${INCLS} AFS_component_version_number.c
138
139 db_verify: db_verify.o pterror.o display.o $(LIBS)
140         $(CC) ${CFLAGS} -o db_verify db_verify.o display.o pterror.o $(LIBS) ${XLIBS}
141
142 ptclient: ptclient.o display.o libprot.a $(LIBS)
143         $(CC) ${CFLAGS} -o ptclient ptclient.o display.o libprot.a $(LIBS) ${XLIBS}
144
145 ptclient.o: ptclient.c ${INCLS} AFS_component_version_number.c
146
147 ptuser.o: ptuser.c ${LINCLS}
148
149 pterror.h pterror.c: pterror.et
150         $(RM) -f pterror.h pterror.c
151         ${COMPILE_ET} -p ${srcdir} pterror
152
153 libprot.a: ptuser.o pterror.o ptint.cs.o ptint.xdr.o AFS_component_version_number.o
154         $(RM) -f $@
155         $(AR) crv $@ ptuser.o pterror.o ptint.cs.o ptint.xdr.o AFS_component_version_number.o
156         $(RANLIB) $@
157
158 pts: pts.o libprot.a ${TOP_LIBDIR}/libcmd.a $(LIBS)
159         $(CC) ${CFLAGS} -o pts pts.o ${TOP_LIBDIR}/libcmd.a libprot.a ${LIBS} ${XLIBS}
160
161 pts.o: pts.c ${LINCLS} ${TOP_INCDIR}/afs/cmd.h AFS_component_version_number.c
162
163 readgroup: readgroup.o libprot.a $(LIBS)
164         $(CC) ${CFLAGS} -o readgroup readgroup.o libprot.a ${LIBS} ${XLIBS}
165
166 readgroup.o: readgroup.c ${LINCLS} AFS_component_version_number.c
167
168 readpwd: readpwd.o libprot.a $(LIBS)
169         $(CC) ${CFLAGS} -o readpwd readpwd.o libprot.a ${LIBS} ${XLIBS}
170
171 readpwd.o: readpwd.c ${LINCLS} AFS_component_version_number.c
172
173 testpt: testpt.o libprot.a ${TOP_LIBDIR}/libcmd.a $(LIBS)
174         case "$(SYS_NAME)" in \
175         *_darwin_12 ) \
176                 $(CC) ${CFLAGS} -o testpt testpt.o ${TOP_LIBDIR}/libcmd.a libprot.a $(LIBS) ;; \
177         * ) \
178                 $(CC) ${CFLAGS} -o testpt testpt.o -lm ${TOP_LIBDIR}/libcmd.a libprot.a $(LIBS) ${XLIBS} ;; \
179         esac
180
181 testpt.o: testpt.c ${INCLS} ${TOP_INCDIR}/afs/cmd.h AFS_component_version_number.c
182
183 pt_util: pt_util.o ptutils.o ubik.o utils.o map.o libprot.a $(LIBS)
184         $(CC) ${CFLAGS} -o pt_util pt_util.o ptutils.o ubik.o utils.o map.o libprot.a ${TOP_LIBDIR}/libcmd.a $(LIBS) ${XLIBS}
185
186 ubik.o: ubik.c ${INCLS}
187
188 prerror.h: pterror.h
189         ${INSTALL_DATA} $? $@
190         echo '#define ERROR_TABLE_BASE_pr ERROR_TABLE_BASE_PT' >> $@
191
192 #
193 # Installation targets
194 #
195 install: ptserver pts pt_util db_verify libprot.a ptclient.h pterror.h \
196                 ptint.h ptserver.h
197         ${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
198         ${INSTALL} -d ${DESTDIR}${afssrvbindir}
199         ${INSTALL} -d ${DESTDIR}${afssrvsbindir}
200         ${INSTALL} -d ${DESTDIR}${bindir}
201         ${INSTALL} -d ${DESTDIR}${libdir}/afs
202         ${INSTALL} -d ${DESTDIR}${includedir}/afs
203         ${INSTALL_PROGRAM} ptserver ${DESTDIR}${afssrvlibexecdir}/ptserver
204         ${INSTALL_PROGRAM} pts ${DESTDIR}${afssrvbindir}/pts
205         ${INSTALL_PROGRAM} pts ${DESTDIR}${bindir}/pts
206         ${INSTALL_PROGRAM} pt_util ${DESTDIR}${afssrvsbindir}/pt_util
207         ${INSTALL_PROGRAM} db_verify ${DESTDIR}${afssrvsbindir}/prdb_check
208         ${INSTALL_DATA} libprot.a ${DESTDIR}${libdir}/afs/libprot.a
209         ${INSTALL_DATA} ptclient.h ${DESTDIR}${includedir}/afs/prclient.h
210         ${INSTALL_DATA} pterror.h ${DESTDIR}${includedir}/afs/prerror.h
211         ${INSTALL_DATA} ptint.h ${DESTDIR}${includedir}/afs/print.h
212         ${INSTALL_DATA} ptserver.h ${DESTDIR}${includedir}/afs/prserver.h
213         ${INSTALL_DATA} ptclient.h ${DESTDIR}${includedir}/afs/ptclient.h
214         ${INSTALL_DATA} ptuser.h ${DESTDIR}${includedir}/afs/ptuser.h
215         ${INSTALL_DATA} pterror.h ${DESTDIR}${includedir}/afs/pterror.h
216         ${INSTALL_DATA} ptint.h ${DESTDIR}${includedir}/afs/ptint.h
217         ${INSTALL_DATA} ptserver.h ${DESTDIR}${includedir}/afs/ptserver.h
218
219 dest: ptserver pts pt_util db_verify libprot.a ptclient.h pterror.h \
220                 ptint.h ptserver.h
221         ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
222         ${INSTALL} -d ${DEST}/bin
223         ${INSTALL} -d ${DEST}/etc
224         ${INSTALL} -d ${DEST}/lib/afs
225         ${INSTALL} -d ${DEST}/include/afs
226         ${INSTALL_PROGRAM} ptserver ${DEST}/root.server/usr/afs/bin/ptserver
227         ${INSTALL_PROGRAM} pts ${DEST}/root.server/usr/afs/bin/pts
228         ${INSTALL_PROGRAM} pts ${DEST}/bin/pts
229         ${INSTALL_PROGRAM} pt_util ${DEST}/root.server/usr/afs/bin/pt_util
230         ${INSTALL_PROGRAM} db_verify ${DEST}/etc/prdb_check
231         ${INSTALL_DATA} libprot.a ${DEST}/lib/afs/libprot.a
232         ${INSTALL_DATA} ptclient.h ${DEST}/include/afs/prclient.h
233         ${INSTALL_DATA} pterror.h ${DEST}/include/afs/prerror.h
234         ${INSTALL_DATA} ptint.h ${DEST}/include/afs/print.h
235         ${INSTALL_DATA} ptserver.h ${DEST}/include/afs/prserver.h
236         ${INSTALL_DATA} ptclient.h ${DEST}/include/afs/ptclient.h
237         ${INSTALL_DATA} ptuser.h ${DEST}/include/afs/ptuser.h
238         ${INSTALL_DATA} pterror.h ${DEST}/include/afs/pterror.h
239         ${INSTALL_DATA} ptint.h ${DEST}/include/afs/ptint.h
240         ${INSTALL_DATA} ptserver.h ${DEST}/include/afs/ptserver.h
241
242 #
243 # Misc. targets
244 #
245 clean:
246         $(RM) -f *.a *.o ptserver ptint.cs.c ptint.ss.c ptclient ptint.xdr.c ptint.h \
247         libprot.a pts readgroup readpwd db_verify testpt pt_util pterror.h pterror.c \
248         core AFS_component_version_number.c Kptint.cs.c Kptint.h Kptint.xdr.c
249
250 include ../config/Makefile.version