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 >> $@
82 echo $(CODESIGN_KERNEL) AFSRDFSProvider.dll >> $@
87 $(OUT)\ddkclean.cmd: NTMakefile
88 echo CALL "$(NTDDKDIR)\bin\setenv.bat" $(NTDDKDIR) $(DDK_ARCH) $(DDK_PLATFORM) $(DDK_BUILDTYPE) $(OACR) > $@
89 echo cd /d $(AFSROOT)\src\WINNT\afsrdr >> $@
90 echo cd kernel\fs >> $@
91 echo build.exe -c -0 >> $@
93 echo build.exe -c -0 >> $@
94 echo cd ..\..\npdll >> $@
95 echo build.exe -c -0 >> $@
98 install: clean-build clean-kernel-fs clean-kernel-lib clean-npdll \
99 AFS_component_version_number.h $(OUT)\ddkbuild.cmd $(OUT)\ddkclean.cmd \
100 kernel\fs\AFSRedirInstall.inf \
101 kernel\lib\AFSRedirLibInstall.inf
102 !IF !EXIST(build\$(CPU))
103 $(MKDIR) build\$(CPU)
106 $(MAKE) -f ntmakefile install
108 $(MAKE) -f ntmakefile install
110 $(MAKE) -f ntmakefile install
112 $(MAKE) -f ntmakefile install
114 $(MAKE) -f ntmakefile install
116 type $(OUT)\ddkbuild.cmd
117 -$(DEL) build\$(CPU)\AFSRedir.sys
118 -$(DEL) build\$(CPU)\AFSRedirLib.sys
119 -$(DEL) build\$(CPU)\AFSRDFSProvider.dll
120 cmd /c start /wait $(OUT)\ddkbuild.cmd
121 cmd /c if not exist build\$(CPU)\AFSRedir.sys exit 1
122 cmd /c if not exist build\$(CPU)\AFSRedirLib.sys exit 1
123 cmd /c if not exist build\$(CPU)\AFSRDFSProvider.dll exit 1
124 $(COPY) kernel\fs\AFSRedirInstall.inf build\$(CPU)\AFSRedirInstall.inf
125 $(COPY) kernel\lib\AFSRedirLibInstall.inf build\$(CPU)\AFSRedirLibInstall.inf
126 $(COPY) build\$(CPU)\* $(TARGETPATH)
129 !IF EXIST(build\$(CPU))
164 clean:: clean-build clean-kernel-fs clean-kernel-lib clean-npdll
165 -$(DEL) $(OUT)\ddkbuild.cmd
166 -type $(OUT)\ddkclean.cmd
167 if exist $(OUT)\ddkclean.cmd start /wait $(OUT)\ddkclean.cmd
168 -$(DEL) $(OUT)\ddkclean.cmd
169 -$(DEL) AFS_component_version_number.h
171 $(MAKE) -f ntmakefile clean
173 $(MAKE) -f ntmakefile clean
175 $(MAKE) -f ntmakefile clean
177 $(MAKE) -f ntmakefile clean
179 $(MAKE) -f ntmakefile clean