bbc0b61c69f2553ef4b78f5fdb9f63f86bbbab2b
[openafs.git] / src / config / 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 !INCLUDE NTMakefile.$(SYS_NAME)
9
10 # Relative path to src directory depends on how we got to current directory.
11
12 INCFILEDIR = $(DESTDIR)\include\afs
13
14
15 INCFILES =\
16         $(INCFILEDIR)\debug.h \
17         $(INCFILEDIR)\afsconfig.h \
18         $(INCFILEDIR)\stds.h \
19         $(INCFILEDIR)\param.h \
20         $(INCFILEDIR)\afs_sysnames.h \
21         $(INCFILEDIR)\afs_args.h \
22         $(INCFILEDIR)\debug.h \
23         $(INCFILEDIR)\param.h \
24         $(INCFILEDIR)\afsconfig.h \
25         $(INCFILEDIR)\afs_sysnames.h \
26         $(INCFILEDIR)\stds.h \
27         $(INCFILEDIR)\icl.h 
28
29
30 $(INCFILEDIR)\param.h: param.$(SYS_NAME).h
31         $(COPY) $? $@
32
33 $(INCFILEDIR)\afsconfig.h: afsconfig-windows.h
34         $(COPY) $? $@
35
36 idirs: doclink
37 !       IF (!EXIST($(DESTDIR)))
38                 $(MKDIR) $(DESTDIR)
39 !       ENDIF
40 !       IF (!EXIST($(DESTDIR)\include))
41                 $(MKDIR) $(DESTDIR)\include
42 !       ENDIF
43 !       IF (!EXIST($(DESTDIR)\include\afs))
44                 $(MKDIR) $(DESTDIR)\include\afs
45 !       ENDIF
46 !       IF (!EXIST($(DESTDIR)\include\rx))
47                 $(MKDIR) $(DESTDIR)\include\rx
48 !       ENDIF
49 !       IF (!EXIST($(DESTDIR)\include\WINNT))
50                 $(MKDIR) $(DESTDIR)\include\WINNT
51 !       ENDIF
52 !       IF (!EXIST($(DESTDIR)\lib))
53                 $(MKDIR) $(DESTDIR)\lib
54 !       ENDIF
55 !       IF (!EXIST($(DESTDIR)\lib\afs))
56                 $(MKDIR) $(DESTDIR)\lib\afs
57 !       ENDIF
58 !       IF (!EXIST($(DESTDIR)\lib\win95))
59                 $(MKDIR) $(DESTDIR)\lib\win95
60 !       ENDIF
61 !       IF (!EXIST($(DESTDIR)\bin))
62                 $(MKDIR) $(DESTDIR)\bin
63 !       ENDIF
64 !       IF (!EXIST($(DESTDIR)\etc))
65                 $(MKDIR) $(DESTDIR)\etc
66 !       ENDIF
67 !       IF (!EXIST($(DESTDIR)\WinInstall))
68                 $(MKDIR) $(DESTDIR)\WinInstall
69 !       ENDIF
70 !       IF (!EXIST($(DESTDIR)\WinInstall\Config))
71                 $(MKDIR) $(DESTDIR)\WinInstall\Config
72 !       ENDIF
73 !       IF (!EXIST($(DESTDIR)\WinInstall\Dll))
74                 $(MKDIR) $(DESTDIR)\WinInstall\Dll
75 !       ENDIF
76 !       IF (!EXIST($(DESTDIR)\root.server))
77                 $(MKDIR) $(DESTDIR)\root.server
78 !       ENDIF
79 !       IF (!EXIST($(DESTDIR)\root.server\usr))
80                 $(MKDIR) $(DESTDIR)\root.server\usr
81 !       ENDIF
82 !       IF (!EXIST($(DESTDIR)\root.server\usr\afs))
83                 $(MKDIR) $(DESTDIR)\root.server\usr\afs
84 !       ENDIF
85 !       IF (!EXIST($(DESTDIR)\root.server\usr\afs\bin))
86                 $(MKDIR) $(DESTDIR)\root.server\usr\afs\bin
87 !       ENDIF
88 !       IF (!EXIST($(DESTDIR)\root.client))
89                 $(MKDIR) $(DESTDIR)\root.client
90 !       ENDIF
91 !       IF (!EXIST($(DESTDIR)\root.client\usr))
92                 $(MKDIR) $(DESTDIR)\root.client\usr
93 !       ENDIF
94 !       IF (!EXIST($(DESTDIR)\root.client\usr\vice))
95                 $(MKDIR) $(DESTDIR)\root.client\usr\vice
96 !       ENDIF
97 !       IF (!EXIST($(DESTDIR)\root.client\usr\vice\etc))
98                 $(MKDIR) $(DESTDIR)\root.client\usr\vice\etc
99 !       ENDIF
100         $(COPY) AFSCONFIG-WINDOWS.H $(DESTDIR)\include\afs\afsconfig.h
101
102 INCCOPY = \
103         $(DESTDIR)\bin\NTBUILD.bat
104
105 $(DESTDIR)\bin\NTBUILD.bat:..\NTBUILD.bat
106         $(COPY) $? $@
107         $(UTIL_CR) + $@
108
109 $(DESTDIR)\bin\NTLang.bat: NTLang.bat $(OJT)\util_cr.exe 
110         $(COPY) NTLang.bat $(DESTDIR)\bin
111         $(UTIL_CR) + $(DESTDIR)\bin\NTLang.bat
112
113 $(DESTDIR)\NTDllmap.txt:NTDllmap.txt
114         $(COPY) $? $@
115
116 # Create link to docs needed for media build; allow to fail in case
117 # symlink not available, e.g. if using a 3.4a client, since most builds
118 # aren't media builds.
119 doclink:
120 !       IF (EXIST($(DESTDIR)\doc))
121                 - symlink rm $(DESTDIR)\doc
122 !       ENDIF
123         - symlink make $(DESTDIR)\doc doc-pathname
124
125
126 version: $(DESTDIR)\bin\mkvers.exe NTMakefile.version 
127
128 NTMakefile.version: NTMakefile.version-CML NTMakefile.version-NOCML
129         $(DEL) NTMakefile.version
130 !       IF (EXIST(..\..\src\CML\state) || EXIST(..\..\..\src\CML\state))
131                 $(COPY) NTMakefile.version-CML NTMakefile.version
132 !       ELSE
133                 $(COPY) NTMakefile.version-NOCML NTMakefile.version
134 !       ENDIF
135
136 INCTOOLS = \
137         $(DESTDIR)\bin\mkvers.exe \
138         $(DESTDIR)\bin\util_cr.exe \
139         $(DESTDIR)\bin\touch.exe
140
141 $(INCTOOLS):$(OJT)\$$(@F)
142         $(COPY) $** $(DESTDIR)\bin\.
143
144 $(OJT)\mkvers.exe : $(OJT)\mkvers.obj
145         $(EXECONLINK)
146
147 $(OJT)\touch.exe : $(OJT)\touch.obj
148         $(EXECONLINK)
149
150 $(OJT)\util_cr.exe : $(OJT)\util_cr.obj
151         $(EXECONLINK)
152
153 langsetup: $(DESTDIR)\bin\NTLang.bat
154
155 install: idirs $(INCTOOLS) $(INCCOPY) version $(INCFILES) $(DESTDIR)\NTDllmap.txt langsetup
156
157 install9x: install
158
159 # This clean target must be named something different than the universal
160 # 'clean' so that the version file can be removed last.
161 clean_version:
162         $(DEL) NTMakefile.version
163
164 clean::
165         $(DEL) $(DESTDIR)\LIB\*.DLL
166         $(DEL) $(DESTDIR)\bin\mkver.exe
167         $(DEL) $(DESTDIR)\bin\touch.exe
168         $(DEL) $(DESTDIR)\bin\util_cr.exe
169         $(DEL) mkver.exe
170         $(DEL) touch.exe
171         $(DEL) util_cr.exe