7de1ceffafdc2c7f03e83908aafc97b6543e60c4
[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 ############################################################################
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 $(VLSERVER): $(VLSERVER_EXEOBJS) $(LIBFILE) $(VLSERVER_EXECLIBS)
91         $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
92         $(_VC_MANIFEST_EMBED_EXE)
93         $(EXEPREP) 
94
95 ############################################################################
96 # generate versioninfo resources
97 $(OUT)\vlserver.res: AFS_component_version_number.h
98 #       $(RC) $*.rc
99
100 ############################################################################
101 # rxgen on vldbint.xg
102
103 $(INCFILES):$$(@F)
104          $(COPY)  $** $(INCFILEDIR)\.
105
106 vldbint.cs.c: vldbint.xg vldbint.h
107         $(RXGEN) -u -x -C -o $@ vldbint.xg
108
109 vldbint.ss.c: vldbint.xg vldbint.h
110         $(RXGEN) -x -S -o $@ vldbint.xg
111
112 vldbint.xdr.c: vldbint.xg vldbint.h
113         $(RXGEN) -x -c -o $@ vldbint.xg
114
115 vldbint.h: vldbint.xg
116         $(RXGEN) -u -x -h -o $@ vldbint.xg
117         $(COPY) vldbint.h $(INCFILEDIR)\vldbint.h
118
119 ############################################################################
120 # Definitions for generating files via COMPILE_ET
121 # Need an explicit copy here, since we've fussed with the general rule.
122
123 vlserver.h vl_errors.c: vl_errors.et vlserver.p.h
124         $(DEL) vlserver.h vl_errors.c
125         $(COMPILE_ET) vl_errors  -h vlserver
126         $(COPY) vlserver.h $(INCFILEDIR)\vlserver.h
127
128 ############################################################################
129 # build local vldb_check
130
131 VLDB_CHECK_LIBS =\
132         $(DESTDIR)\lib\afs\afsutil.lib  \
133         $(DESTDIR)\lib\afs\afsreg.lib \
134         $(DESTDIR)\lib\afs\afseventlog.lib \
135         $(DESTDIR)\lib\afs\afscmd.lib
136
137 $(OUT)\vldb_check.exe: $(OUT)\vldb_check.obj $(VLDB_CHECK_LIBS)
138         $(EXECONLINK)
139         $(_VC_MANIFEST_EMBED_EXE)
140
141 ############################################################################
142 # build local vlclient
143 VLCLIENT_LIBS = \
144         $(DESTDIR)\lib\afs\afscmd.lib \
145         $(DESTDIR)\lib\afs\afspioctl.lib
146
147 $(OUT)\vlclient.exe: $(OUT)\vlclient.obj  $(LIBFILE) $(VLSERVER_EXECLIBS) $(VLCLIENT_LIBS)
148         $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
149         $(_VC_MANIFEST_EMBED_EXE)
150
151
152 ############################################################################
153 # install vlserver components
154
155 install: $(INCFILES) $(LIBFILE) $(VLSERVER) $(OUT)\vldb_check.exe $(OUT)\vlclient.exe \
156          $(MT_LIBFILE)
157
158 install9x: install
159
160 install_libutils: $(INCFILES) $(LIBFILE)
161
162 install_headers: $(INCFILES)
163
164 ############################################################################
165 # clean up
166
167 clean::
168         $(DEL) vldbint.cs.c vldbint.ss.c vldbint.xdr.c vldbint.h
169         $(DEL) vlserver.h vl_errors.c $(INCFILES)
170
171 mkdir:
172