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