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