LICENSE MIT
Add support for dynamically determining which ddk include
path should be used. The NTDDKDIR variable used to be set
to the specific directory in which netcfgx.h was located.
Now it is set to the top-level of the DDK install tree.
The specific directory that contains netcfgx.h varies based
upon whether the DDK is 3790.1830 or 6000. Test for file
existence and specify the one that works.
(cherry picked from commit
4f5b808414c958e7629c83f93d610b57c54274ac)
LINK=link
+# Figure out which DDK include path we require
+!IF EXIST ($(NTDDKDIR)\netcfgx.h)
+DDK_INCL = $(NTDDKDIR)
+!ELSEIF EXIST ($(NTDDKDIR)\INC\WNET\netcfgx.h)
+DDK_INCL = $(NTDDKDIR)\INC\WNET
+!ELSEIF EXIST ($(NTDDKDIR)\INC\API\netcfgx.h)
+DDK_INCL = $(NTDDKDIR)\INC\API
+!ELSE
+!ERROR netcfgx.h header file cannot be found. DDK improperly configured.
+!ENDIF
+
# afsloopback.dll
DLLSOURCEFILES = loopbackutils.cpp renameconnection.cpp wmi.cpp
$(STATICC2OBJ) -c -DUNICODE -D_UNICODE /Fo$@ $**
$(OUT)\wmi.obj: wmi.cpp
- $(STATICC2OBJ) -I$(NTDDKDIR) -c -DUNICODE -D_UNICODE /Fo$@ $**
+ $(STATICC2OBJ) -I$(DDK_INCL) -c -DUNICODE -D_UNICODE /Fo$@ $**
$(DLLFILE): $(DLLOBJFILES) $(DLLRES)
$(LINK) -DLL $(DLLEXPORTS) -OUT:$@ $** $(DLLLIBFILES)