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