c1654d720063191824702ad38d53ad50dfd5e843
[openafs.git] / src / vlserver / 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 # Override default definitions in NTMakefile.$(SYS_NAME) before including.
9
10 RELDIR=vlserver
11 !INCLUDE ..\config\NTMakefile.$(SYS_NAME)
12 !include ..\config\NTMakefile.version
13
14 ############################################################################
15 # Definitions for installing header files
16
17 INCFILEDIR = $(DESTDIR)\include\afs
18
19 INCFILES = \
20         $(INCFILEDIR)\vl_opcodes.h \
21         $(INCFILEDIR)\vlserver.h \
22         $(INCFILEDIR)\vldbint.h
23
24 $(INCFILEDIR)\vl_opcodes.h: vl_opcodes.h
25         $(COPY) vl_opcodes.h $(INCFILEDIR)\vl_opcodes.h
26         
27 ############################################################################
28 # build afsvldb.lib
29
30 LIBFILE = $(DESTDIR)\lib\afs\afsvldb.lib
31
32 LIBOBJS =\
33         $(OUT)\vl_errors.obj \
34         $(OUT)\vldbint.cs.obj \
35         $(OUT)\vldbint.xdr.obj \
36         $(OUT)\AFS_component_version_number.obj
37
38 $(LIBFILE): $(LIBOBJS)  
39         $(LIBARCH) 
40
41 ############################################################################
42 # build mtafsvldb.lib
43
44 MT_LIBFILE = $(DESTDIR)\lib\afs\mtafsvldb.lib
45
46 MT_LIBOBJS =\
47         $(OUT)\vl_errors_mt.obj \
48         $(OUT)\vldbint.cs_mt.obj \
49         $(OUT)\vldbint.xdr_mt.obj \
50         $(OUT)\AFS_component_version_number.obj
51
52 $(OUT)\vl_errors_mt.obj:vl_errors.c
53         $(C2OBJ) $** -DAFS_PTHREAD_ENV
54
55 $(OUT)\vldbint.cs_mt.obj:vldbint.cs.c
56         $(C2OBJ) $** -DAFS_PTHREAD_ENV
57
58 $(OUT)\vldbint.xdr_mt.obj:vldbint.xdr.c
59         $(C2OBJ) $** -DAFS_PTHREAD_ENV
60
61 $(MT_LIBFILE): $(MT_LIBOBJS)  
62         $(LIBARCH) 
63
64 ############################################################################
65 # build vlserver.exe
66
67 VLSERVER = $(DESTDIR)\root.server\usr\afs\bin\vlserver.exe
68
69 VLSERVER_EXEOBJS =\
70         $(OUT)\vldbint.ss.obj \
71         $(OUT)\vldbint.xdr.obj \
72         $(OUT)\vlprocs.obj \
73         $(OUT)\vlserver.obj \
74         $(OUT)\vlutils.obj \
75         $(OUT)\vlserver.res
76
77 VLSERVER_EXECLIBS = \
78         $(DESTDIR)\lib\afsubik.lib \
79         $(DESTDIR)\lib\afs\afsauth.lib \
80         $(DESTDIR)\lib\afsrxkad.lib \
81         $(DESTDIR)\lib\afsrxstat.lib \
82         $(DESTDIR)\lib\afsrx.lib \
83         $(DESTDIR)\lib\afslwp.lib \
84         $(DESTDIR)\lib\afsdes.lib \
85         $(DESTDIR)\lib\afs\afscom_err.lib \
86         $(DESTDIR)\lib\afs\afsutil.lib \
87         $(DESTDIR)\lib\afs\afsaudit.lib \
88         $(DESTDIR)\lib\afs\afseventlog.lib \
89         $(DESTDIR)\lib\afs\afsreg.lib \
90         $(DESTDIR)\lib\afs\afsprocmgmt.lib \
91         $(DESTDIR)\lib\cm_dns.obj \
92         $(DESTDIR)\lib\cm_nls.obj
93
94 $(VLSERVER): $(VLSERVER_EXEOBJS) $(LIBFILE) $(VLSERVER_EXECLIBS)
95         $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
96         $(_VC_MANIFEST_EMBED_EXE)
97         $(EXEPREP) 
98
99 ############################################################################
100 # generate versioninfo resources
101 $(OUT)\vlserver.res: AFS_component_version_number.h
102 #       $(RC) $*.rc
103
104 ############################################################################
105 # rxgen on vldbint.xg
106
107 vldbint.cs.c: vldbint.xg vldbint.h
108         $(RXGEN) -u -x -C -o $@ vldbint.xg
109
110 vldbint.ss.c: vldbint.xg vldbint.h
111         $(RXGEN) -x -S -o $@ vldbint.xg
112
113 vldbint.xdr.c: vldbint.xg vldbint.h
114         $(RXGEN) -x -c -o $@ vldbint.xg
115
116 vldbint.h: vldbint.xg
117         $(RXGEN) -u -x -h -o $@ vldbint.xg
118
119 $(INCFILEDIR)\vldbint.h: vldbint.h
120         $(COPY) vldbint.h $(INCFILEDIR)\vldbint.h
121
122 ############################################################################
123 # Definitions for generating files via COMPILE_ET
124 # Need an explicit copy here, since we've fussed with the general rule.
125
126 $(INCFILEDIR)\vlserver.h vlserver.h vl_errors.c: vl_errors.et vlserver.p.h
127         $(DEL) vlserver.h vl_errors.c
128         $(COMPILE_ET) vl_errors  -h vlserver
129         $(COPY) vlserver.h $(INCFILEDIR)\vlserver.h
130
131 ############################################################################
132 # build local vldb_check
133
134 VLDB_CHECK_LIBS =\
135         $(DESTDIR)\lib\afs\afsutil.lib  \
136         $(DESTDIR)\lib\afs\afsreg.lib \
137         $(DESTDIR)\lib\afs\afseventlog.lib \
138         $(DESTDIR)\lib\afs\afscmd.lib
139
140 $(OUT)\vldb_check.exe: $(OUT)\vldb_check.obj $(VLDB_CHECK_LIBS)
141         $(EXECONLINK)
142         $(_VC_MANIFEST_EMBED_EXE)
143
144 ############################################################################
145 # build local vlclient
146 VLCLIENT_LIBS = \
147         $(DESTDIR)\lib\afs\afscmd.lib \
148         $(DESTDIR)\lib\afs\afspioctl.lib
149
150 $(OUT)\vlclient.exe: $(OUT)\vlclient.obj  $(LIBFILE) $(VLSERVER_EXECLIBS) $(VLCLIENT_LIBS)
151         $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
152         $(_VC_MANIFEST_EMBED_EXE)
153
154
155 ############################################################################
156 # install vlserver components
157
158 install: $(INCFILES) $(LIBFILE) $(VLSERVER) $(OUT)\vldb_check.exe $(OUT)\vlclient.exe \
159          $(MT_LIBFILE)
160
161 install9x: install
162
163 install_libutils: $(INCFILES) $(LIBFILE)
164
165 install_headers: $(INCFILES)
166
167 ############################################################################
168 # clean up
169
170 clean::
171         $(DEL) vldbint.cs.c vldbint.ss.c vldbint.xdr.c vldbint.h
172         $(DEL) vlserver.h vl_errors.c $(INCFILES)
173
174 mkdir:
175