patch-from-shadow-to-jaltman-bkbox-20031120
[openafs.git] / src / ubik / 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 RELDIR=ubik
9 !INCLUDE ..\config\NTMakefile.$(SYS_NAME)
10 !INCLUDE ..\config\NTMakefile.version
11
12 ############################################################################
13 # Install header files
14
15 INCFILEDIR = $(DESTDIR)\include 
16
17 INCFILES =\
18         $(INCFILEDIR)\ubik.h \
19         $(INCFILEDIR)\ubik_int.h 
20
21
22
23 ############################################################################
24 # install afsubik.lib
25
26 LIBFILE = $(DESTDIR)\lib\afsubik.lib
27
28 LIBOBJS =\
29         $(OUT)\disk.obj \
30         $(OUT)\remote.obj \
31         $(OUT)\beacon.obj \
32         $(OUT)\recovery.obj \
33         $(OUT)\ubik.obj \
34         $(OUT)\vote.obj \
35         $(OUT)\lock.obj \
36         $(OUT)\phys.obj \
37         $(OUT)\ubik_int.cs.obj \
38         $(OUT)\ubik_int.ss.obj \
39         $(OUT)\ubik_int.xdr.obj \
40         $(OUT)\ubikcmd.obj \
41         $(OUT)\ubikclient.obj \
42         $(OUT)\uerrors.obj      \
43         $(OUT)\AFS_component_version_number.obj
44
45
46 $(LIBFILE): $(LIBOBJS)
47         $(LIBARCH) 
48
49 ############################################################################
50 # Definitions for building a EXE.
51
52 RS_UDBG_EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\udebug.exe
53 CL_UDBG_EXEFILE = $(DESTDIR)\bin\udebug.exe
54
55 UDBG_EXEOBJS =\
56         $(OUT)\udebug.obj \
57         $(OUT)\udebug.res
58
59 UDBG_EXELIBS =\
60         $(DESTDIR)\lib\afsubik.lib \
61         $(DESTDIR)\lib\afsrx.lib \
62         $(DESTDIR)\lib\afs\afsreg.lib \
63         $(DESTDIR)\lib\afslwp.lib \
64         $(DESTDIR)\lib\afs\afscom_err.lib \
65         $(DESTDIR)\lib\afs\afscmd.lib \
66         $(DESTDIR)\lib\afs\afsutil.lib
67
68
69 $(RS_UDBG_EXEFILE): $(UDBG_EXEOBJS) $(UDBG_EXELIBS)  
70         $(EXECONLINK)
71         $(EXEPREP)  
72
73 $(CL_UDBG_EXEFILE): $(RS_UDBG_EXEFILE)
74         $(COPY) $** $@
75
76 ############################################################################
77 # generate versioninfo resources
78
79 $(OUT)\udebug.res: AFS_component_version_number.h
80 #       $(RC) $*.rc
81
82 ############################################################################
83 # rxgen on ubik_int.xg
84
85 $(INCFILES):$$(@F)
86          $(COPY)  $** $(INCFILEDIR)\.
87
88 ubik_int.ss.c ubik_int.cs.c ubik_int.xdr.c ubik_int.h: ubik_int.xg
89         $(RXGEN) -x $**
90
91 ############################################################################
92 # compile_et on uerrors.et
93
94 uerrors.c ubik.h: uerrors.et ubik.p.h
95         $(DEL)  ubik.h uerrors.c
96         $(COMPILE_ET) uerrors -h ubik
97
98 ############################################################################
99 # Install target; primary makefile target
100
101 install9X: $(INCFILES) $(LIBFILE)
102
103 install: $(INCFILES) $(LIBFILE)  $(CL_UDBG_EXEFILE)
104
105
106 clean::
107         $(DEL) ubik_int.ss.c ubik_int.cs.c ubik_int.xdr.c 
108         $(DEL) uerrors.c $(INCFILES)
109         $(DEL) ubik_int.h ubik.h
110
111 ############################################################################
112 # test ubik
113
114 test tests: utst_server utst_client $(EXEFILE) 
115
116 utst_server: $(OUT)\utst_server.obj $(OUT)\utst_int.ss.obj $(OUT)\utst_int.xdr.obj  $(EXELIBS)
117         $(EXECONLINK) 
118         
119 utst_client: $(OUT)\utst_client.obj $(OUT)\utst_int.cs.obj $(OUT)\utst_int.xdr.obj $(EXELIBS)
120         $(EXECONLINK) 
121         
122 # rxgen on utst_int.xg
123 utst_int.ss.c utst_int.cs.c utst_int.xdr.c utst_int.h: utst_int.xg
124         $(RXGEN)  utst_int.xg
125
126 $(OUT)\utst_server.obj $(OUT)\utst_client.obj : utst_int.h 
127
128 mkdir:
129