Windows: Build Demand Attach File Service
[openafs.git] / src / dvolser / 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 AFSDEV_AUXCDEFINES = -DAFS_PTHREAD_ENV -DRXDEBUG -DFSSYNC_BUILD_CLIENT -DAFS_DEMAND_ATTACH_FS
9
10 RELDIR=dvolser
11 !INCLUDE ..\config\NTMakefile.$(SYS_NAME)
12 !INCLUDE ..\config\NTMakefile.version
13
14 VOLSER = ..\volser
15 DVOLSER = .
16 VLSERVER = ..\vlserver
17 LWP = ..\lwp
18 LIBACL = ..\libacl
19 UTIL = ..\util
20 DIR = ..\dir
21 VOL = ..\vol
22 FSINT = ..\fsint
23 RX = ..\rx
24
25 ############################################################################
26 # Definitions for installing header files
27
28 INCFILEDIR = $(DESTDIR)\include\afs  # header file install directory
29
30 INCFILES = \
31         $(INCFILEDIR)\volser_prototypes.h \
32         $(INCFILEDIR)\volser.h \
33         $(INCFILEDIR)\volint.h
34
35 LOCAL_INCFILES = \
36         volser.h \
37         volint.h
38
39 ############################################################################
40 # Build afsdavolser.lib
41
42 LIBFILE = $(DESTDIR)\lib\afs\afsdvolser.lib
43
44 LIBOBJS = $(OUT)\volint.cs.obj  \
45           $(OUT)\volint.xdr.obj \
46           $(OUT)\volerr.obj  \
47           $(OUT)\volint.ss.obj  \
48           $(OUT)\AFS_component_version_number.obj 
49
50 LIBOBJS2 = $(OUT)\vsprocs.obj \
51           $(OUT)\vsutils.obj \
52           $(OUT)\lockprocs.obj
53
54 # $(LIBOBJS): $(DVOLSER)\$$(@B).c
55 #         $(C2OBJ) -I$(VOLSER) -I$(UTIL) $**
56
57 $(LIBOBJS2): $(VOLSER)\$$(@B).c
58         $(C2OBJ) -I$(VOLSER) -I$(UTIL) $**
59
60 $(LIBFILE): $(LIBOBJS) $(LIBOBJS2)
61         $(LIBARCH)
62
63
64 ############################################################################
65 # Build davolserver
66
67 VOLSERVER_EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\davolserver.exe
68
69 VOLSEROBJS=$(OUT)\volmain.obj $(OUT)\volprocs.obj $(OUT)\physio.obj $(OUT)\voltrans.obj $(OUT)\dumpstuff.obj
70
71 LWPOBJS=$(OUT)\lock.obj $(OUT)\threadname.obj $(OUT)\fasttime.obj
72
73 LIBACLOBJS=$(OUT)\aclprocs.obj $(OUT)\netprocs.obj
74
75 DIROBJS=$(OUT)\buffer.obj $(OUT)\dir.obj $(OUT)\salvage.obj
76
77 VOLSERVER_EXEOBJS = $(VOLSEROBJS) \
78         $(VLSERVEROBJS) \
79         $(LWPOBJS) \
80         $(LIBACLOBJS) \
81         $(DIROBJS) \
82         $(FSINTOBJS) \
83         $(OUT)\vscommon.obj \
84         $(OUT)\davolserver.res
85
86 VOLSERVER_EXELIBS = \
87         $(DESTDIR)\lib\afsauthent.lib \
88         $(DESTDIR)\lib\afsrpc.lib \
89         $(LIBFILE) \
90         $(DESTDIR)\lib\afs\daafsvol.lib \
91         $(DESTDIR)\lib\afs\afscmd.lib \
92         $(DESTDIR)\lib\afs\afsaudit.lib \
93         $(DESTDIR)\lib/afs/afscom_err.lib \
94         $(DESTDIR)\lib\afs\afsreg.lib \
95         $(DESTDIR)\lib\afs\afsprocmgmt.lib \
96         $(DESTDIR)\lib\afs\afseventlog.lib \
97         $(DESTDIR)\lib\afs\mtafsutil.lib \
98         $(DESTDIR)\lib\afspthread.lib
99
100 $(VOLSERVER_EXEFILE): $(VOLSERVER_EXEOBJS) $(VOLSERVER_EXELIBS)
101         $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
102         $(_VC_MANIFEST_EMBED_EXE)
103         $(EXEPREP) 
104         $(CODESIGN_USERLAND)
105         $(SYMSTORE_IMPORT)
106
107 $(OUT)\vscommon.obj: $(VOLSER)\common.c
108         $(C2OBJ) /Fo$(OUT)\vscommon.obj -I$(VOLSER) -I$(UTIL) $**
109
110 $(VOLSEROBJS): $(VOLSER)\$$(@B).c
111         $(C2OBJ) -I$(VOLSER) -I$(UTIL) $**
112
113 $(LWPOBJS): $(LWP)\$$(@B).C
114         $(C2OBJ) -I$(LWP) $**
115
116 $(LIBACLOBJS): $(LIBACL)\$$(@B).C
117         $(C2OBJ) -I$(LIBACL) $**
118
119 $(DIROBJS): $(DIR)\$$(@B).C
120         $(C2OBJ) -I$(DIR) $**
121
122 ############################################################################
123 # Generate versioninfo resources
124 $(OUT)\davolserver.res: AFS_component_version_number.h
125
126 ############################################################################
127 # Definitions for generating files via RXGEN
128
129 volint.cs.c: $(VOLSER)\volint.xg volint.h
130         $(RXGEN) -x -C -o $@ $(VOLSER)\volint.xg
131
132 volint.ss.c: $(VOLSER)\volint.xg volint.h
133         $(RXGEN) -x -S -o $@ $(VOLSER)\volint.xg
134
135 volint.xdr.c: $(VOLSER)\volint.xg volint.h
136         $(RXGEN) -x -c -o $@ $(VOLSER)\volint.xg
137
138 volint.h: $(VOLSER)\volint.xg
139         $(RXGEN) -x -h -o $@ $(VOLSER)\volint.xg
140
141 ############################################################################
142 # Definitions for generating files via COMPILE_ET
143
144 volser.h volerr.c: $(VOLSER)\volerr.et $(VOLSER)\volser.p.h
145         $(DEL) volerr.c volser.h
146         $(COPY) $(VOLSER)\volerr.et .
147         $(COPY) $(VOLSER)\volser.p.h .
148         $(COMPILE_ET) volerr -h volser
149
150 ############################################################################
151 # Install target; primary makefile target
152
153 install_lib: $(LIBFILE) 
154
155 install: install_lib $(VOLSERVER_EXEFILE) $(CL_VOS_EXEFILE) \
156                 $(INCFILES)
157
158
159 ############################################################################
160 # Local clean target; augments predefined clean target
161
162 clean::
163       - -$(DEL) volerr.c volser.h volerr.et volser.p.h $(INCFILES)
164         -$(DEL) volint.cs.c volint.h volint.ss.c volint.xdr.c
165         -$(DEL) $(OUT)\davolserver.res
166         -$(DEL) $(VOLSERVER_EXEFILE)
167
168 mkdir: