1 # Copyright (c) 2008, 2009, 2010, 2011 Kernel Drivers, LLC.
2 # Copyright (c) 2009, 2010, 2011 Your File System, Inc.
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions
9 # - Redistributions of source code must retain the above copyright notice,
10 # this list of conditions and the following disclaimer.
11 # - Redistributions in binary form must reproduce the above copyright
13 # this list of conditions and the following disclaimer in the
15 # and/or other materials provided with the distribution.
16 # - Neither the names of Kernel Drivers, LLC and Your File System, Inc.
17 # nor the names of their contributors may be used to endorse or promote
18 # products derived from this software without specific prior written
19 # permission from Kernel Drivers, LLC and Your File System, Inc.
21 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
23 # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
24 # PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
25 # OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29 # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 # This file requires Microsoft Windows DDK/WDK 6001 or higher
36 !IF ("$(CPU)" == "x86")
41 !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME)
42 !INCLUDE ..\..\config\NTMakefile.version
44 TARGETPATH = $(DESTDIR)\root.client\usr\vice\etc
46 !IF ("$(CPU)" == "i386")
49 !ELSE IF ("$(CPU)" == "AMD64")
54 !IF ("$(AFSDEV_BUILDTYPE)" == "FREE")
60 !IF ("$(_RunOacr)" == "TRUE")
66 $(OUT)\ddkbuild.cmd: NTMakefile
67 echo CALL "$(NTDDKDIR)\bin\setenv.bat" $(NTDDKDIR) $(DDK_ARCH) $(DDK_PLATFORM) $(DDK_BUILDTYPE) $(OACR) > $@
68 echo cd /d $(AFSROOT)\src\WINNT\afsrdr >> $@
69 echo cd kernel\fs >> $@
70 echo build.exe -M >> $@
71 echo if errorlevel neq 0 exit 1 >> $@
72 echo cd ..\..\kernel\lib >> $@
73 echo build.exe -M >> $@
74 echo if errorlevel neq 0 exit 1 >> $@
75 echo cd ..\..\npdll >> $@
76 echo build.exe -M >> $@
77 echo if errorlevel neq 0 exit 1 >> $@
78 echo cd ..\build\$(CPU) >> $@
79 !IFDEF CODESIGN_KERNEL
80 echo $(CODESIGN_KERNEL) AFSRedir.sys >> $@
81 echo $(CODESIGN_KERNEL) AFSRedirLib.sys >> $@
83 !IFDEF CODESIGN_USERLAND
84 echo $(CODESIGN_USERLAND) AFSRDFSProvider.dll >> $@
88 echo $(SYMSTORE_EXE) add /s $(SYMSTORE_ROOT) /t "OpenAFS for Windows" /v "$(AFSBLD_TYPE)-$(CPU)-$(AFSPRODUCT_VERSION)" /c "AFSRedir.sys$(SYMSTORE_COMMENT)" /f AFSRedir.* >> $@
89 echo $(SYMSTORE_EXE) add /s $(SYMSTORE_ROOT) /t "OpenAFS for Windows" /v "$(AFSBLD_TYPE)-$(CPU)-$(AFSPRODUCT_VERSION)" /c "AFSRedirLib.sys$(SYMSTORE_COMMENT)" /f AFSRedirLib.* >> $@
90 echo $(SYMSTORE_EXE) add /s $(SYMSTORE_ROOT) /t "OpenAFS for Windows" /v "$(AFSBLD_TYPE)-$(CPU)-$(AFSPRODUCT_VERSION)" /c "AFSRDFSProvider.dll$(SYMSTORE_COMMENT)" /f AFSRDRFSProvider.* >> $@
95 $(OUT)\ddkclean.cmd: NTMakefile
96 echo CALL "$(NTDDKDIR)\bin\setenv.bat" $(NTDDKDIR) $(DDK_ARCH) $(DDK_PLATFORM) $(DDK_BUILDTYPE) $(OACR) > $@
97 echo cd /d $(AFSROOT)\src\WINNT\afsrdr >> $@
98 echo cd kernel\fs >> $@
99 echo build.exe -c -0 >> $@
101 echo build.exe -c -0 >> $@
102 echo cd ..\..\npdll >> $@
103 echo build.exe -c -0 >> $@
106 install: clean-build clean-kernel-fs clean-kernel-lib clean-npdll \
107 AFS_component_version_number.h $(OUT)\ddkbuild.cmd $(OUT)\ddkclean.cmd \
108 kernel\fs\AFSRedirInstall.inf \
109 kernel\lib\AFSRedirLibInstall.inf
110 !IF !EXIST(build\$(CPU))
111 $(MKDIR) build\$(CPU)
114 $(MAKE) -f ntmakefile install
116 $(MAKE) -f ntmakefile install
118 $(MAKE) -f ntmakefile install
120 $(MAKE) -f ntmakefile install
122 $(MAKE) -f ntmakefile install
124 type $(OUT)\ddkbuild.cmd
125 -$(DEL) build\$(CPU)\AFSRedir.sys
126 -$(DEL) build\$(CPU)\AFSRedirLib.sys
127 -$(DEL) build\$(CPU)\AFSRDFSProvider.dll
128 cmd /c start /wait $(OUT)\ddkbuild.cmd
129 cmd /c if not exist build\$(CPU)\AFSRedir.sys exit 1
130 cmd /c if not exist build\$(CPU)\AFSRedirLib.sys exit 1
131 cmd /c if not exist build\$(CPU)\AFSRDFSProvider.dll exit 1
132 $(COPY) kernel\fs\AFSRedirInstall.inf build\$(CPU)\AFSRedirInstall.inf
133 $(COPY) kernel\lib\AFSRedirLibInstall.inf build\$(CPU)\AFSRedirLibInstall.inf
134 $(COPY) build\$(CPU)\* $(TARGETPATH)
137 !IF EXIST(build\$(CPU))
172 clean:: clean-build clean-kernel-fs clean-kernel-lib clean-npdll
173 -$(DEL) $(OUT)\ddkbuild.cmd
174 -type $(OUT)\ddkclean.cmd
175 if exist $(OUT)\ddkclean.cmd start /wait $(OUT)\ddkclean.cmd
176 -$(DEL) $(OUT)\ddkclean.cmd
177 -$(DEL) AFS_component_version_number.h
179 $(MAKE) -f ntmakefile clean
181 $(MAKE) -f ntmakefile clean
183 $(MAKE) -f ntmakefile clean
185 $(MAKE) -f ntmakefile clean
187 $(MAKE) -f ntmakefile clean