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