7346f4b04bf7fde9d327fb2e2411309b85a326ea
[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 !INCLUDE ..\config\NTMakefile.$(SYS_NAME)
9 !INCLUDE ..\config\NTMakefile.version
10
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         disk.obj \
30         remote.obj \
31         beacon.obj \
32         recovery.obj \
33         ubik.obj \
34         vote.obj \
35         lock.obj \
36         phys.obj \
37         ubik_int.cs.obj \
38         ubik_int.ss.obj \
39         ubik_int.xdr.obj \
40         ubikcmd.obj \
41         ubikclient.obj \
42         uerrors.obj     \
43         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         udebug.obj \
57         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 udebug.res: udebug.rc AFS_component_version_number.h
80         $(RC) $*.rc
81
82 ############################################################################
83 # rxgen on ubik_int.xg
84
85 ubik_int.ss.c ubik_int.cs.c ubik_int.xdr.c $(INCFILEDIR)\ubik_int.h: ubik_int.xg
86         $(RXGEN) -x $**
87         $(COPY) ubik_int.h $(INCFILEDIR)\ubik_int.h
88
89 ############################################################################
90 # compile_et on uerrors.et
91
92 uerrors.c $(INCFILEDIR)\ubik.h: uerrors.et ubik.p.h
93         $(DEL)  ubik.h uerrors.c
94         $(COMPILE_ET) uerrors -h ubik
95         $(COPY) ubik.h $(INCFILEDIR)\ubik.h
96
97 ############################################################################
98 # Install target; primary makefile target
99
100 install9X: $(INCFILES) $(LIBFILE)
101
102 install: $(INCFILES) $(LIBFILE)  $(CL_UDBG_EXEFILE)
103
104
105 clean::
106         $(DEL) ubik_int.ss.c ubik_int.cs.c ubik_int.xdr.c 
107         $(DEL) $(INCFILEDIR)\ubik_int.h uerrors.c $(INCFILEDIR)\ubik.h
108         $(DEL) ubik_int.h ubik.h
109
110 ############################################################################
111 # test ubik
112
113 test tests: utst_server utst_client $(EXEFILE) 
114
115 utst_server: utst_server.obj utst_int.ss.obj utst_int.xdr.obj  $(EXELIBS)
116         $(EXECONLINK) 
117         
118 utst_client: utst_client.obj utst_int.cs.obj utst_int.xdr.obj $(EXELIBS)
119         $(EXECONLINK) 
120         
121 # rxgen on utst_int.xg
122 utst_int.ss.c utst_int.cs.c utst_int.xdr.c utst_int.h: utst_int.xg
123         $(RXGEN)  utst_int.xg
124
125 utst_server.obj utst_client.obj : utst_int.h