Improve Windows Build System By Using MT-safe Versions of Libraries
[openafs.git] / src / util / 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 # General AFS utilities.
9
10 RELDIR=util
11 !INCLUDE ..\config\NTMakefile.$(SYS_NAME)
12
13 INCFILEDIR = $(DESTDIR)\include\afs  # header file install directory
14
15 INCFILES =\
16         $(INCFILEDIR)\afsutil.h \
17         $(INCFILEDIR)\assert.h \
18         $(INCFILEDIR)\dirent.h \
19         $(INCFILEDIR)\errors.h \
20         $(INCFILEDIR)\itc.h \
21         $(INCFILEDIR)\vice.h \
22         $(INCFILEDIR)\netutils.h \
23         $(INCFILEDIR)\pthread_glock.h \
24         $(INCFILEDIR)\pthread_nosigs.h \
25         $(INCFILEDIR)\errmap_nt.h \
26         $(INCFILEDIR)\dirpath.h \
27         $(INCFILEDIR)\ktime.h \
28         $(INCFILEDIR)\fileutil.h \
29         $(INCFILEDIR)\afsutil_prototypes.h \
30         $(INCFILEDIR)\secutil_nt.h \
31         $(INCFILEDIR)\softsig.h
32
33 $(DESTDIR)\include\afs\dirent.h: dirent_nt.h
34         $(COPY) $** $@
35
36 $(DESTDIR)\include\afs\dirpath.h: dirpath_nt.h
37         $(COPY) $** $@
38
39 LIBFILE = $(DESTDIR)\lib\afs\afsutil.lib
40
41 MT_LIBFILE = $(DESTDIR)\lib\afs\mtafsutil.lib
42
43 LIBOBJS = \
44         $(OUT)\assert.obj \
45         $(OUT)\base32.obj \
46         $(OUT)\casestrcpy.obj \
47         $(OUT)\get_krbrlm.obj \
48         $(OUT)\hostparse.obj \
49         $(OUT)\isathing.obj \
50         $(OUT)\kreltime.obj \
51         $(OUT)\ktime.obj \
52         $(OUT)\netutils.obj \
53         $(OUT)\regex.obj \
54         $(OUT)\readdir_nt.obj \
55         $(OUT)\serverLog.obj \
56         $(OUT)\snprintf.obj \
57         $(OUT)\strlcat.obj \
58         $(OUT)\uuid.obj \
59         $(OUT)\volparse.obj \
60         $(OUT)\winsock_nt.obj \
61         $(OUT)\errmap_nt.obj \
62         $(OUT)\dirpath.obj \
63         $(OUT)\strnlen.obj \
64         $(OUT)\strlcpy.obj \
65         $(OUT)\fileutil.obj \
66         $(OUT)\secutil_nt.obj
67
68 MT_LIBOBJS = \
69         $(OUT)\assert.obj \
70         $(OUT)\base32.obj \
71         $(OUT)\casestrcpy.obj \
72         $(OUT)\get_krbrlm.obj \
73         $(OUT)\hostparse.obj \
74         $(OUT)\isathing.obj \
75         $(OUT)\kreltime.obj \
76         $(OUT)\ktime.obj \
77         $(OUT)\netutils.obj \
78         $(OUT)\regex.obj \
79         $(OUT)\readdir_nt.obj \
80         $(OUT)\serverLog_mt.obj \
81         $(OUT)\snprintf.obj \
82         $(OUT)\strlcat.obj \
83         $(OUT)\uuid.obj \
84         $(OUT)\volparse.obj \
85         $(OUT)\winsock_nt.obj \
86         $(OUT)\errmap_nt.obj \
87         $(OUT)\dirpath_mt.obj \
88         $(OUT)\strnlen.obj \
89         $(OUT)\strlcpy.obj \
90         $(OUT)\fileutil.obj \
91         $(OUT)\secutil_nt.obj
92
93 $(LIBOBJS): $$(@B).c
94     $(C2OBJ) $**
95
96 $(OUT)\dirpath_mt.obj:dirpath.c
97         $(C2OBJ) $** -DAFS_PTHREAD_ENV
98
99 $(OUT)\serverLog_mt.obj:serverLog.c
100         $(C2OBJ) $** -DAFS_PTHREAD_ENV
101
102 $(LIBFILE): $(LIBOBJS)
103         $(LIBARCH)
104
105 $(MT_LIBFILE): $(MT_LIBOBJS)
106         $(LIBARCH)
107
108 install_headers: $(INCFILES) 
109
110 install: install_headers $(LIBOBJS) $(LIBFILE) $(MT_LIBFILE)
111
112 install9x: install
113
114 clean::
115         $(DEL) $(LIBFILE)
116
117 mkdir:
118