14d916ac57fd8e6b8bf184aa828678377cca244c
[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)\uinit.obj \
35         $(OUT)\vote.obj \
36         $(OUT)\lock.obj \
37         $(OUT)\phys.obj \
38         $(OUT)\ubik_int.cs.obj \
39         $(OUT)\ubik_int.ss.obj \
40         $(OUT)\ubik_int.xdr.obj \
41         $(OUT)\ubikcmd.obj \
42         $(OUT)\ubikclient.obj \
43         $(OUT)\uerrors.obj      \
44         $(OUT)\AFS_component_version_number.obj
45
46
47 $(LIBFILE): $(LIBOBJS)
48         $(LIBARCH) 
49
50 ############################################################################
51 # Definitions for building a EXE.
52
53 RS_UDBG_EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\udebug.exe
54 CL_UDBG_EXEFILE = $(DESTDIR)\bin\udebug.exe
55
56 UDBG_EXEOBJS =\
57         $(OUT)\udebug.obj \
58         $(OUT)\udebug.res
59
60 UDBG_EXELIBS =\
61         $(DESTDIR)\lib\afsubik.lib \
62         $(DESTDIR)\lib\afsrx.lib \
63         $(DESTDIR)\lib\afs\afsreg.lib \
64         $(DESTDIR)\lib\afslwp.lib \
65         $(DESTDIR)\lib\afs\afscom_err.lib \
66         $(DESTDIR)\lib\afs\afscmd.lib \
67         $(DESTDIR)\lib\afs\afsutil.lib
68
69
70 $(RS_UDBG_EXEFILE): $(UDBG_EXEOBJS) $(UDBG_EXELIBS)  
71         $(EXECONLINK) iphlpapi.lib
72         $(_VC_MANIFEST_EMBED_EXE)
73         $(EXEPREP)  
74
75 $(CL_UDBG_EXEFILE): $(RS_UDBG_EXEFILE)
76         $(COPY) $** $@
77
78 ############################################################################
79 # generate versioninfo resources
80
81 $(OUT)\udebug.res: AFS_component_version_number.h
82 #       $(RC) $*.rc
83
84 ############################################################################
85 # rxgen on ubik_int.xg
86
87 $(INCFILES):$$(@F)
88          $(COPY)  $** $(INCFILEDIR)\.
89
90 ubik_int.ss.c ubik_int.cs.c ubik_int.xdr.c ubik_int.h: ubik_int.xg
91         $(RXGEN) -x $**
92
93 ############################################################################
94 # compile_et on uerrors.et
95
96 uerrors.c ubik.h: uerrors.et ubik.p.h
97         $(DEL)  ubik.h uerrors.c
98         $(COMPILE_ET) uerrors -h ubik
99
100 ############################################################################
101 # Install target; primary makefile target
102
103 install9X: $(INCFILES) $(LIBFILE)
104
105 install: $(INCFILES) $(LIBFILE)  $(CL_UDBG_EXEFILE)
106
107
108 clean::
109         $(DEL) ubik_int.ss.c ubik_int.cs.c ubik_int.xdr.c 
110         $(DEL) uerrors.c $(INCFILES)
111         $(DEL) ubik_int.h ubik.h
112
113 ############################################################################
114 # test ubik
115
116 test tests: utst_server utst_client $(EXEFILE) 
117
118 utst_server: $(OUT)\utst_server.obj $(OUT)\utst_int.ss.obj $(OUT)\utst_int.xdr.obj  $(EXELIBS)
119         $(EXECONLINK) 
120         $(_VC_MANIFEST_EMBED_EXE)
121         
122 utst_client: $(OUT)\utst_client.obj $(OUT)\utst_int.cs.obj $(OUT)\utst_int.xdr.obj $(EXELIBS)
123         $(EXECONLINK) 
124         $(_VC_MANIFEST_EMBED_EXE)
125         
126 # rxgen on utst_int.xg
127 utst_int.ss.c utst_int.cs.c utst_int.xdr.c utst_int.h: utst_int.xg
128         $(RXGEN)  utst_int.xg
129
130 $(OUT)\utst_server.obj $(OUT)\utst_client.obj : utst_int.h 
131
132 mkdir:
133