Windows: Direct IO for AFS Redirector
[openafs.git] / src / WINNT / afsd / NTMakefile
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 AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) /D"_AFXDLL" /DSMB_UNICODE \
9         -I$(DESTDIR)\include\afs -I$(DESTDIR)\include\rx \
10         -I..\afsrdr\common -I..\afsrdr\user -I$(HEIMINC)
11
12 AFSDEV_NETGUI = 1
13 RELDIR=WINNT\afsd
14 !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME)
15 !INCLUDE ..\..\config\NTMakefile.version
16
17 EXEDIR = $(DESTDIR)\root.client\usr\vice\etc
18
19 ############################################################################
20 # Definitions for installing header files
21
22 INCFILEDIR = $(DESTDIR)\include\afs  # header file install directory
23
24 # afsdicon and below added for WINNT\extra support
25
26 INCFILES =\
27         $(INCFILEDIR)\afsd.h \
28         $(INCFILEDIR)\cm.h \
29         $(INCFILEDIR)\cm_buf.h \
30         $(INCFILEDIR)\cm_cell.h \
31         $(INCFILEDIR)\cm_config.h \
32         $(INCFILEDIR)\cm_conn.h \
33         $(INCFILEDIR)\cm_error.h \
34         $(INCFILEDIR)\cm_ioctl.h \
35         $(INCFILEDIR)\cm_scache.h \
36         $(INCFILEDIR)\cm_server.h \
37         $(INCFILEDIR)\cm_user.h \
38         $(INCFILEDIR)\cm_dns.h \
39         $(INCFILEDIR)\cm_utils.h \
40         $(INCFILEDIR)\fs_acl.h \
41         $(INCFILEDIR)\fs_utils.h \
42         $(INCFILEDIR)\krb.h \
43         $(INCFILEDIR)\krb_prot.h \
44         $(INCFILEDIR)\cm_dir.h \
45         $(INCFILEDIR)\smb.h \
46         $(INCFILEDIR)\smb3.h \
47         $(INCFILEDIR)\smb_iocons.h \
48         $(INCFILEDIR)\smb_ioctl.h \
49         $(INCFILEDIR)\smb_rpc.h \
50         $(INCFILEDIR)\afsrpc.h \
51 !IFDEF OSICRASH
52         $(INCFILEDIR)\afsdcrash.h \
53 !ENDIF
54         $(INCFILEDIR)\cm_dns_private.h \
55         $(INCFILEDIR)\lanahelper.h \
56         $(INCFILEDIR)\afsdicon.h \
57         $(INCFILEDIR)\cm_callback.h \
58         $(INCFILEDIR)\cm_aclent.h \
59         $(INCFILEDIR)\cm_volume.h \
60         $(INCFILEDIR)\cm_volstat.h \
61         $(INCFILEDIR)\cm_dcache.h \
62         $(INCFILEDIR)\cm_access.h \
63         $(INCFILEDIR)\cm_eacces.h \
64         $(INCFILEDIR)\cm_vnodeops.h \
65         $(INCFILEDIR)\cm_dir.h \
66         $(INCFILEDIR)\cm_utils.h \
67         $(INCFILEDIR)\cm_daemon.h \
68         $(INCFILEDIR)\cm_ioctl.h \
69         $(INCFILEDIR)\cm_dnlc.h \
70         $(INCFILEDIR)\cm_buf.h \
71         $(INCFILEDIR)\cm_freelance.h \
72         $(INCFILEDIR)\cm_memmap.h \
73         $(INCFILEDIR)\cm_performance.h \
74         $(INCFILEDIR)\cm_nls.h \
75         $(INCFILEDIR)\afsd_eventlog.h \
76         $(INCFILEDIR)\afsd_eventmessages.h \
77         $(INCFILEDIR)\afskfw.h \
78         $(INCFILEDIR)\afsicf.h \
79 #       $(INCFILEDIR)\krbcompat_delayload.h
80
81
82 $(INCFILEDIR)\krbcompat_delayload.h: $(HEIMINC)\krbcompat_delayload.h
83         $(COPY) $< $@
84
85 IDLFILES =\
86         afsrpc.h $(OUT)\afsrpc_c.obj
87
88 CONFOBJS=$(OUT)\cm_config.obj \
89          $(OUT)\cm_dns.obj \
90          $(OUT)\cm_nls.obj
91
92 $(CONFOBJS):
93
94 RXOBJS = $(OUT)\xdr_int32.obj $(OUT)\xdr_int64.obj
95
96 $(RXOBJS):
97
98 RX= ..\..\rx
99
100 $(RXOBJS): $(RX)\$$(@B).c
101         $(C2OBJ) -I$(RX) $**
102
103 $(IDLFILES):afsrpc.idl
104         midl $(MIDL_FLAGS) $(AFSDEV_AUXMIDLFLAGS) /app_config $?
105
106 ms-srvsvc.h ms-srvsvc_s.c: ms-srvsvc.idl
107         midl $(MIDL_FLAGS) $(AFSDEV_AUXMIDLFLAGS) /Os ms-srvsvc.idl
108
109 ms-wkssvc.h ms-wkssvc_s.c: ms-wkssvc.idl
110         midl $(MIDL_FLAGS) $(AFSDEV_AUXMIDLFLAGS) /Os ms-wkssvc.idl
111
112 $(OUT)\ms-srvsvc_s.obj: ms-srvsvc_s.c
113         $(C2OBJ) /FImsrpc.h /Fo$@ $**
114
115 $(OUT)\ms-wkssvc_s.obj: ms-wkssvc_s.c
116         $(C2OBJ) /FImsrpc.h /Fo$@ $**
117
118 AFSDOBJS=\
119         $(OUT)\rawops.obj \
120         $(OUT)\afsd_init.obj \
121         $(OUT)\cm_btree.obj \
122         $(OUT)\cm_cell.obj \
123         $(OUT)\cm_server.obj \
124         $(OUT)\cm_volume.obj \
125         $(OUT)\cm_volstat.obj \
126         $(OUT)\cm_config.obj \
127         $(OUT)\cm_conn.obj \
128         $(OUT)\cm_user.obj \
129         $(OUT)\cm_buf.obj \
130         $(OUT)\cm_scache.obj \
131         $(OUT)\cm_dcache.obj \
132         $(OUT)\cm_access.obj \
133         $(OUT)\cm_eacces.obj \
134         $(OUT)\cm_callback.obj \
135         $(OUT)\cm_vnodeops.obj \
136         $(OUT)\cm_dir.obj \
137         $(OUT)\cm_utils.obj \
138         $(OUT)\largeintdotnet.obj \
139         $(OUT)\smb.obj \
140         $(OUT)\smb3.obj \
141         $(OUT)\smb_ioctl.obj \
142         $(OUT)\smb_rpc.obj \
143         $(OUT)\msrpc.obj \
144         $(OUT)\cm_ioctl.obj \
145         $(OUT)\cm_daemon.obj \
146         $(OUT)\cm_aclent.obj \
147         $(OUT)\cm_dnlc.obj \
148         $(OUT)\cm_rpc.obj \
149         $(OUT)\cm_memmap.obj \
150         $(OUT)\cm_performance.obj \
151         $(OUT)\cm_nls.obj \
152         $(OUT)\afsrpc_s.obj \
153 !IFDEF OSICRASH
154         $(OUT)\afsdcrash.obj \
155 !ENDIF
156         $(OUT)\cm_freelance.obj \
157         $(OUT)\afsd_eventlog.obj \
158         $(OUT)\afsd_flushvol.obj \
159         $(OUT)\afsicf.obj \
160         $(OUT)\ms-srvsvc_s.obj \
161         $(OUT)\ms-wkssvc_s.obj \
162         $(OUT)\rpc_wkssvc.obj \
163         $(OUT)\rpc_srvsvc.obj \
164         $(OUT)\AFS_component_version_number.obj \
165         $(OUT)\RDRInit.obj \
166         $(OUT)\RDRFunction.obj \
167         $(OUT)\RDRIoctl.obj \
168         $(OUT)\RDRPipe.obj
169
170 $(AFSDOBJS):
171
172 $(OUT)\RDRInit.obj: ..\afsrdr\user\RDRInit.cpp ..\afsrdr\user\RDRPrototypes.h ..\afsrdr\user\RDRIoctl.h
173         $(CPP2OBJ) ..\afsrdr\user\RDRInit.cpp
174
175 $(OUT)\RDRFunction.obj: ..\afsrdr\user\RDRFunction.c ..\afsrdr\user\RDRPrototypes.h ..\afsrdr\user\RDRIoctl.h
176         $(C2OBJ)  ..\afsrdr\user\RDRFunction.c
177
178 $(OUT)\RDRIoctl.obj: ..\afsrdr\user\RDRIoctl.c ..\afsrdr\user\RDRIoctl.h
179         $(C2OBJ)  ..\afsrdr\user\RDRIoctl.c
180
181 $(OUT)\RDRPipe.obj: ..\afsrdr\user\RDRPipe.c ..\afsrdr\user\RDRPipe.h
182         $(C2OBJ)  ..\afsrdr\user\RDRPipe.c
183
184 $(OUT)\cm_conn.obj: cm_conn.c
185         $(C2OBJ) -DAFS_PTHREAD_ENV /Fo$@ $**
186
187 FSOBJS=$(OUT)\fs.obj \
188        $(OUT)\fs_acl.obj \
189        $(OUT)\fs_utils.obj \
190        $(OUT)\cm_nls.obj \
191        $(OUT)\parsemode.obj
192
193 CMDBGOBJS=$(OUT)\cmdebug.obj
194
195 $(CMDBGOBJS): $(AFSROOT)\src\venus\cmdebug.c
196         $(C2OBJ) -DAFS_PTHREAD_ENV /Fo$@ $**
197
198 AFSIOOBJS=$(OUT)\afsio.obj
199
200 $(AFSIOOBJS): $(AFSROOT)\src\venus\afsio.c
201         $(C2OBJ) -DAFS_PTHREAD_ENV /Fo$@ $**
202
203 SLOBJS= $(OUT)\symlink.obj \
204         $(OUT)\fs_utils.obj \
205         $(OUT)\cm_nls.obj
206
207 ILIBDIR = $(DESTDIR)\lib
208
209 #
210 # Rules for message compiler info for logging events
211 #
212 $(INCFILEDIR)\afsd_eventmessages.h:  afsd_eventmessages.mc
213         mc afsd_eventmessages.mc
214
215 ############################################################################
216 #
217 # Flags for linking LOGON DLL'S
218 #
219
220 LOGONLINKFLAGS = -entry:DllEntryPoint
221
222
223 ############################################################################
224 #
225 # IDL COMPILATION
226 #
227
228 MIDL_FLAGS=/app_config \
229            /Zp4 \
230            /cpp_cmd $(cc) \
231            /cpp_opt "-E" \
232            /nologo
233
234 .SUFFIXES: .h .idl
235
236 .idl.h:
237         midl $(MIDL_FLAGS) $(AFSDEV_AUXMIDLFLAGS) $<
238
239
240 AFSD_SDKLIBS =\
241         netapi32.lib \
242         dnsapi.lib \
243         mpr.lib \
244         rpcrt4.lib \
245         user32.lib \
246         Dbghelp.lib \
247         strsafe.lib \
248         mpr.lib \
249         secur32.lib \
250         ole32.lib \
251         oleaut32.lib \
252         iphlpapi.lib \
253         shell32.lib \
254         shlwapi.lib
255
256 ############################################################################
257 # krbcompat_delayload.obj
258
259 KCOMPAT_OBJ = $(DESTDIR)\lib\krbcompat_delayload.obj
260
261 $(KCOMPAT_OBJ): $(OUT)\krbcompat_delayload.obj
262         copy /y $** $@
263
264 ############################################################################
265 # libafsconf.dll
266
267 CONF_DLLFILE = $(DESTDIR)\lib\libafsconf.dll
268
269 CONF_DLLLIBS = \
270     $(DESTDIR)\lib\afs\afsutil.lib \
271     $(DESTDIR)\lib\afs\afsreg.lib \
272     $(DESTDIR)\lib\afsroken.lib
273
274 $(CONF_DLLFILE): $(CONFOBJS) $(OUT)\libafsconf.res $(CONF_DLLLIBS)
275         $(DLLGUILINK) -def:libafsconf.def  $(AFSD_SDKLIBS)
276         $(_VC_MANIFEST_EMBED_DLL)
277         $(DLLPREP)
278         $(CODESIGN_USERLAND)
279         $(SYMSTORE_IMPORT)
280         $(MAKECYGLIB) --input-def libafsconf.def
281         $(DEL) $*.exp
282
283 ############################################################################
284 # lanahelper.lib
285
286 LANAHELPERLIB = $(DESTDIR)\lib\lanahelper.lib
287
288 LANAHELPERLIB_OBJS =\
289       $(OUT)\lanahelper.obj
290
291 $(LANAHELPERLIB_OBJS):
292
293 $(LANAHELPERLIB): $(LANAHELPERLIB_OBJS)
294       $(LIBARCH) netapi32.lib
295
296 ############################################################################
297 # afskfw.lib
298
299 AFSKFWLIB = $(DESTDIR)\lib\afskfw.lib
300
301 PTERROBJS=$(OUT)\pterror.obj
302
303 $(PTERROBJS): $(AFSROOT)\src\ptserver\pterror.c
304         $(C2OBJ) /Fo$@ $**
305
306 KTCERROBJS=$(OUT)\ktc_errors.obj
307
308 $(KTCERROBJS): $(AFSROOT)\src\auth\ktc_errors.c
309         $(C2OBJ) /Fo$@ $**
310
311 AFSKFWLIB_OBJS = $(OUT)\afskfw.obj
312
313 $(AFSKFWLIB_OBJS):
314
315 $(AFSKFWLIB): $(AFSKFWLIB_OBJS) $(PTERROBJS) $(KTCERROBJS)
316       $(LIBARCH)
317
318 ############################################################################
319 # afslogon.dll
320
321 LOGON_DLLFILE = $(DESTDIR)\root.client\usr\vice\etc\afslogon.dll
322
323 LOGON_DLLOBJS =\
324     $(OUT)\afslogon.obj \
325     $(OUT)\logon_ad.obj \
326     $(OUT)\afslogon.res \
327     $(OUT)\cm_nls.obj   \
328     $(KRBCOMPATRES)
329
330 LOGON_DLLLIBS =\
331     $(DESTDIR)\lib\afsauthent.lib \
332     $(DESTDIR)\lib\libafsconf.lib \
333     $(DESTDIR)\lib\afs\afscom_err.lib \
334     $(DESTDIR)\lib\afs\afsutil.lib \
335     $(DESTDIR)\lib\opr.lib \
336     $(DESTDIR)\lib\afsroken.lib \
337     $(LANAHELPERLIB) \
338     $(AFSKFWLIB)
339
340 LOGON_DLLSDKLIBS =\
341         dnsapi.lib \
342         netapi32.lib \
343         mpr.lib \
344         advapi32.lib \
345         secur32.lib \
346         strsafe.lib \
347         oleaut32.lib \
348         ole32.lib \
349         adsiid.lib \
350         activeds.lib \
351         rpcrt4.lib \
352         user32.lib \
353         userenv.lib \
354         shell32.lib \
355         delayimp.lib
356
357 $(LOGON_DLLFILE): $(LOGON_DLLOBJS) $(LOGON_DLLLIBS) $(HEIMDEPS)
358         $(DLLGUILINK) $(LOGONLINKFLAGS) -def:afslogon.def $(LOGON_DLLSDKLIBS) $(HEIMLINKOPTS)
359         $(_VC_MANIFEST_EMBED_DLL)
360         $(DLLPREP)
361         $(CODESIGN_USERLAND)
362         $(SYMSTORE_IMPORT)
363         $(COPY) $*.lib $(DESTDIR)\lib
364         $(DEL) $*.lib $*.exp
365
366 ############################################################################
367 # Install target; primary makefile target
368
369 install_objs: $(CONF_DLLFILE) $(LANAHELPERLIB) $(OUT)\afsicf.obj $(OUT)\krbcompat_delayload.obj
370      $(COPY) $(OUT)\afsicf.obj $(DESTDIR)\lib
371      $(COPY) $(OUT)\krbcompat_delayload.obj $(DESTDIR)\lib
372
373 install_headers: $(IDLFILES) $(INCFILES) ms-wkssvc.h ms-srvsvc.h
374
375 install: install_headers install_objs $(CONF_DLLFILE) \
376         $(EXEDIR)\klog.exe \
377         $(EXEDIR)\tokens.exe \
378         $(EXEDIR)\unlog.exe \
379         $(EXEDIR)\afsd_service.exe \
380         $(EXEDIR)\fs.exe \
381         $(EXEDIR)\symlink.exe \
382         $(EXEDIR)\afsdacl.exe \
383         $(LOGON_DLLFILE) \
384         $(EXEDIR)\afsshare.exe \
385         $(DESTDIR)\bin\kpasswd.exe \
386         $(EXEDIR)\cmdebug.exe \
387         $(EXEDIR)\afscpcc.exe \
388         $(EXEDIR)\afsio.exe
389
390 install_libutils: install_headers $(CONF_DLLFILE) \
391         $(EXEDIR)\klog.exe \
392         $(EXEDIR)\tokens.exe \
393         $(EXEDIR)\unlog.exe \
394         $(EXEDIR)\fs.exe $(EXEDIR)\symlink.exe \
395         $(EXEDIR)\afsshare.exe \
396         $(DESTDIR)\bin\kpasswd.exe $(EXEDIR)\cmdebug.exe
397
398 ############################################################################
399 # Local clean target; augments predefined clean target
400
401 ############################################################################
402 # assorted exe's
403
404 EXELIBS = \
405         $(DESTDIR)\lib\afs\afsauth.lib \
406         $(DESTDIR)\lib\afs\afskauth.lib \
407         $(DESTDIR)\lib\afs\afsprot.lib \
408         $(DESTDIR)\lib\afs\afspioctl.lib \
409         $(DESTDIR)\lib\afs\afsaudit.lib \
410         $(DESTDIR)\lib\afs\afsutil.lib \
411         $(DESTDIR)\lib\afs\afscom_err.lib \
412         $(DESTDIR)\lib\afs\afsreg.lib \
413         $(DESTDIR)\lib\afs\afscmd.lib \
414         $(DESTDIR)\lib\afs\afsvldb.lib \
415         $(DESTDIR)\lib\afsubik.lib \
416         $(DESTDIR)\lib\afsrxkad.lib \
417         $(DESTDIR)\lib\afsrx.lib \
418         $(DESTDIR)\lib\afslwp.lib \
419         $(DESTDIR)\lib\libosi.lib \
420         $(DESTDIR)\lib\libafsconf.lib \
421         $(DESTDIR)\lib\opr.lib \
422         $(DESTDIR)\lib\afshcrypto.lib \
423         $(DESTDIR)\lib\afsroken.lib
424
425 EXELIBS2 = \
426         $(DESTDIR)\lib\afsrpc.lib \
427         $(DESTDIR)\lib\afs\afsprot.lib \
428         $(DESTDIR)\lib\afs\afspioctl.lib \
429         $(DESTDIR)\lib\afs\afscom_err.lib \
430         $(DESTDIR)\lib\afs\afscmd.lib \
431         $(DESTDIR)\lib\afs\afsutil.lib \
432         $(DESTDIR)\lib\afsubik.lib \
433         $(DESTDIR)\lib\afsrxkad.lib \
434         $(DESTDIR)\lib\afslwp.lib \
435         $(DESTDIR)\lib\libosi.lib \
436         $(DESTDIR)\lib\libafsconf.lib \
437         $(DESTDIR)\lib\opr.lib \
438         $(DESTDIR)\lib\afshcrypto.lib \
439         $(DESTDIR)\lib\afsroken.lib
440
441 EXELIBS3 = \
442         $(DESTDIR)\lib\afs\afscmd.lib \
443         $(DESTDIR)\lib\afsrxkad.lib \
444         $(DESTDIR)\lib\opr.lib \
445         $(DESTDIR)\lib\afshcrypto.lib \
446         $(DESTDIR)\lib\afsroken.lib
447
448 # klog.exe
449 $(EXEDIR)\klog.exe: $(OUT)\cklog.obj $(OUT)\klog.res $(DESTDIR)\lib\krbcompat_delayload.obj $(EXELIBS) $(HEIMDEPS)
450         $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib $(HEIMLINKOPTS)
451         $(_VC_MANIFEST_EMBED_EXE)
452         $(EXEPREP)
453         $(CODESIGN_USERLAND)
454         $(SYMSTORE_IMPORT)
455
456 # tokens.exe
457 $(EXEDIR)\tokens.exe: $(OUT)\ctokens.obj $(OUT)\tokens.res $(DESTDIR)\lib\krbcompat_delayload.obj $(EXELIBS) $(HEIMDEPS)
458         $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib $(HEIMLINKOPTS)
459         $(_VC_MANIFEST_EMBED_EXE)
460         $(EXEPREP)
461         $(CODESIGN_USERLAND)
462         $(SYMSTORE_IMPORT)
463
464 # unlog.exe
465 $(EXEDIR)\unlog.exe: $(OUT)\cunlog.obj $(OUT)\unlog.res $(DESTDIR)\lib\krbcompat_delayload.obj $(EXELIBS) $(HEIMDEPS)
466         $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib $(HEIMLINKOPTS)
467         $(_VC_MANIFEST_EMBED_EXE)
468         $(EXEPREP)
469         $(CODESIGN_USERLAND)
470         $(SYMSTORE_IMPORT)
471
472 # afscpcc.exe
473 $(EXEDIR)\afscpcc.exe: $(OUT)\afscpcc.obj $(OUT)\afscpcc.res $(DESTDIR)\lib\krbcompat_delayload.obj $(LOGON_DLLLIBS) $(HEIMDEPS)
474         $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib userenv.lib $(HEIMLINKOPTS)
475         $(_VC_MANIFEST_EMBED_EXE)
476         $(EXEPREP)
477         $(CODESIGN_USERLAND)
478         $(SYMSTORE_IMPORT)
479
480
481 # afsd.exe
482 AFSD_EXEFILE = $(EXEDIR)\afsd.exe
483
484 AFSD_EXELIBS =\
485         $(DESTDIR)\lib\libosi.lib \
486         $(DESTDIR)\lib\afs\mtafsvldb.lib \
487         $(DESTDIR)\lib\afs\mtafsint.lib \
488         $(DESTDIR)\lib\afsrpc.lib \
489         $(DESTDIR)\lib\afsrxkad.lib \
490         $(DESTDIR)\lib\afs\mtafsutil.lib \
491         $(DESTDIR)\lib\afsauthent.lib \
492         $(DESTDIR)\lib\libafsconf.lib \
493         $(DESTDIR)\lib\afs\afsreg.lib \
494         $(DESTDIR)\lib\afspthread.lib \
495         $(DESTDIR)\lib\opr.lib \
496         $(DESTDIR)\lib\afsroken.lib \
497         $(DESTDIR)\lib\afshcrypto.lib \
498         $(LANAHELPERLIB)
499
500 $(AFSD_EXEFILE): $(OUT)\afsd.obj $(AFSDOBJS) $(OUT)\afsd.res  $(RXOBJS) $(AFSD_EXELIBS)
501         $(EXEGUILINK) $(AFSD_SDKLIBS)
502         $(_VC_MANIFEST_EMBED_EXE)
503         $(EXEPREP)
504         $(CODESIGN_USERLAND)
505         $(SYMSTORE_IMPORT)
506
507 # afsd_service.exe
508 $(EXEDIR)\afsd_service.exe: $(OUT)\afsd_service.obj $(AFSDOBJS) $(OUT)\afsd_service.res  $(RXOBJS) $(AFSD_EXELIBS)
509         $(EXECONLINK) $(AFSD_SDKLIBS) /MAP /LARGEADDRESSAWARE
510         $(_VC_MANIFEST_EMBED_EXE)
511         $(EXEPREP)
512         $(CODESIGN_USERLAND)
513         $(SYMSTORE_IMPORT)
514
515 # fs.exe
516 $(EXEDIR)\fs.exe: $(FSOBJS) $(OUT)\fs.res $(EXELIBS) $(HEIMDEPS)
517         $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib $(HEIMLINKOPTS)
518         $(_VC_MANIFEST_EMBED_EXE)
519         $(EXEPREP)
520         $(CODESIGN_USERLAND)
521         $(SYMSTORE_IMPORT)
522
523 # cmdebug.exe
524 $(EXEDIR)\cmdebug.exe: $(CMDBGOBJS) $(OUT)\cmdebug.res
525         $(EXECONLINK) $(EXELIBS2) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib rpcrt4.lib
526         $(_VC_MANIFEST_EMBED_EXE)
527         $(EXEPREP)
528         $(CODESIGN_USERLAND)
529         $(SYMSTORE_IMPORT)
530
531 # afsio.exe
532 AFSCPLIB = \
533         $(DESTDIR)\lib\afs\afscp.lib
534
535 !IF "$(CPU)" == "IA64" || "$(CPU)" == "AMD64" || "$(CPU)" == "ALPHA64"
536 KFWLIBS = \
537     ..\kfw\lib\$(CPU)\krb5_64.lib \
538     ..\kfw\lib\$(CPU)\comerr64.lib \
539     dnsapi.lib mpr.lib delayimp.lib
540 LINKOPTS = /DELAYLOAD:krb5_64.dll /DELAYLOAD:comerr64.dll
541 !else
542 KFWLIBS = \
543     ..\kfw\lib\$(CPU)\krb5_32.lib \
544     ..\kfw\lib\$(CPU)\comerr32.lib \
545     dnsapi.lib mpr.lib delayimp.lib
546 LINKOPTS = /DELAYLOAD:krbv4w32.dll /DELAYLOAD:krb5_32.dll /DELAYLOAD:comerr32.dll
547 !endif
548
549 $(EXEDIR)\afsio.exe: $(AFSIOOBJS) $(OUT)\afsio.res $(RXOBJS) $(AFSD_EXELIBS) $(EXELIBS3) $(AFSCPLIB)
550         $(EXECONLINK) $(KFWLIBS) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib rpcrt4.lib
551         $(_VC_MANIFEST_EMBED_EXE)
552         $(EXEPREP)
553         $(CODESIGN_USERLAND)
554         $(SYMSTORE_IMPORT)
555
556 # symlink.exe
557 $(EXEDIR)\symlink.exe: $(SLOBJS) $(OUT)\symlink.res  $(EXELIBS) $(HEIMDEPS)
558         $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib $(HEIMLINKOPTS)
559         $(_VC_MANIFEST_EMBED_EXE)
560         $(EXEPREP)
561         $(CODESIGN_USERLAND)
562         $(SYMSTORE_IMPORT)
563
564 # afsshare.exe
565 $(EXEDIR)\afsshare.exe: $(OUT)\afsshare.obj $(OUT)\afsshare.res $(EXELIBS)
566         $(EXECONLINK)
567         $(_VC_MANIFEST_EMBED_EXE)
568         $(EXEPREP)
569         $(CODESIGN_USERLAND)
570         $(SYMSTORE_IMPORT)
571
572 # afsdacl.exe
573 $(EXEDIR)\afsdacl.exe: $(OUT)\afsdacl.obj $(OUT)\afsdacl.res
574         $(EXECONLINK)
575         $(_VC_MANIFEST_EMBED_EXE)
576         $(EXEPREP)
577         $(CODESIGN_USERLAND)
578         $(SYMSTORE_IMPORT)
579
580 # kpasswd.exe - built in kauth, but rebuild here to make pthread-based,
581 #    which is required for Windows 95.  At some point it would be nice
582 #    for all commands to be pthread based, in which case they should
583 #    be built in a separate directory (perhaps tbin ala tviced) or
584 #    libafsauthent should be built earlier so that each command can
585 #    be built in its native directory.
586
587 KAUTH = ..\..\kauth
588
589 KPASSWD_OBJS =\
590         $(OUT)\kpasswd.obj \
591         $(OUT)\kkids.obj \
592         $(OUT)\kautils.obj \
593         $(OUT)\$(KAUTH)\kpasswd.res
594
595 KPASSWD_LIBS =\
596         $(DESTDIR)\lib\afsauthent.lib \
597         $(DESTDIR)\lib\afsrpc.lib \
598         $(DESTDIR)\lib\afs\afscmd.lib \
599         $(DESTDIR)\lib\afs\mtafsutil.lib \
600         $(DESTDIR)\lib\opr.lib \
601         $(DESTDIR)\lib\afshcrypto.lib \
602         $(DESTDIR)\lib\afsroken.lib
603
604 $(OUT)\kpasswd.obj: $(KAUTH)/kpasswd.c
605         $(C2OBJ) -DAFS_PTHREAD_ENV /Fo$@ $**
606
607 $(OUT)\kkids.obj: $(KAUTH)/kkids.c
608         $(C2OBJ) -DAFS_PTHREAD_ENV /Fo$@ $**
609
610 $(OUT)\kautils.obj: $(KAUTH)/kautils.c
611         $(C2OBJ) -DAFS_PTHREAD_ENV /Fo$@ $**
612
613 $(OUT)\kpasswd.res: $(KAUTH)\kpasswd.rc
614     $(RC) /Fo$@ $**
615
616 $(DESTDIR)\bin\kpasswd.exe: $(KPASSWD_OBJS) $(KPASSWD_LIBS)
617         $(DEL) $(DESTDIR)\bin\kpasswd.exe
618         $(EXECONLINK)
619         $(_VC_MANIFEST_EMBED_EXE)
620         $(EXEPREP)
621         $(CODESIGN_USERLAND)
622         $(SYMSTORE_IMPORT)
623
624 {$(HEIMDALSDKDIR)\src\}.c{$(OUT)}.obj:
625         $(C2OBJ) /Fo$@ $**
626
627 {$(HEIMDALSDKDIR)\inc\}.h{$(INCFILEDIR)}.h:
628         copy /y $< $@
629
630 ############################################################################
631 # generate versioninfo resources
632
633 $(OUT)\afsshare.res: afsshare.rc AFS_component_version_number.h
634
635 $(OUT)\fs.res: fs.rc AFS_component_version_number.h
636
637 $(OUT)\symlink.res: symlink.rc AFS_component_version_number.h
638
639 $(OUT)\klog.res: klog.rc AFS_component_version_number.h
640
641 $(OUT)\tokens.res: tokens.rc AFS_component_version_number.h
642
643 $(OUT)\unlog.res: unlog.rc AFS_component_version_number.h
644
645 $(OUT)\afscpcc.res: afscpcc.rc AFS_component_version_number.h
646
647 afsd_eventmessages.rc: $(INCFILEDIR)\afsd_eventmessages.h
648
649 $(OUT)\afsd_service.res: afsd_service.rc afsd_eventmessages.rc AFS_component_version_number.h
650
651 $(OUT)\afslogon.res: afslogon.rc AFS_component_version_number.h
652
653 $(OUT)\libafsconf.res: libafsconf.rc AFS_component_version_number.h
654
655 ############################################################################
656 clean::
657         $(DEL) $(OUT)\*.res
658         $(DEL) afsrpc.h
659         $(DEL) afsrpc_?.*
660         $(DEL) ms-srvsvc.h
661         $(DEL) ms-srvsvc_?.*
662         $(DEL) ms-wkssvc.h
663         $(DEL) ms-wkssvc_?.*
664         $(DEL) afsd_eventmessages.h
665         $(DEL) afsd_eventmessages.rc
666         $(DEL) MSG?????.bin
667         $(DEL) $(CONF_DLLFILE)
668         $(DEL) $(LOGON_DLLFILE)
669
670 mkdir:
671
672 ############################################################################
673 # Tests
674
675 {test}.c{$(OUT)\}.obj:
676         $(C2OBJ) $<
677
678 test::
679
680 test:: btreetest
681
682 btreetest: "$(OUT)\btreetest.exe"
683         "$(OUT)\btreetest.exe"
684
685 $(OUT)\btreetest.exe: \
686                 $(OUT)\btreetest.obj \
687                 $(OUT)\cm_btree.obj \
688                 $(OUT)\cm_nls.obj \
689                 $(OUT)\cm_utils.obj \
690                 $(DESTDIR)\lib\libosi.lib
691         $(EXECONLINK)
692         $(_VC_MANIFEST_EMBED_EXE)
693         $(EXEPREP)