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