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