Author: tkreuzer
Date: Tue Dec 28 16:28:57 2010
New Revision: 50192
URL:
http://svn.reactos.org/svn/reactos?rev=50192&view=rev
Log:
[CMAKE/NCI]
Handle different versions of asm include files
Modified:
branches/cmake-bringup/tools/nci/ncitool.c
Modified: branches/cmake-bringup/tools/nci/ncitool.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/tools/nci/ncitool…
==============================================================================
--- branches/cmake-bringup/tools/nci/ncitool.c [iso-8859-1] (original)
+++ branches/cmake-bringup/tools/nci/ncitool.c [iso-8859-1] Tue Dec 28 16:28:57 2010
@@ -418,7 +418,7 @@
SyscallId++;
}
}
-
+
#if defined(_MSC_VER)
for (i= 0; i < UserFiles; i++) fprintf(UserModeFiles[i], "END\n");
fprintf(KernelModeFile, "END\n");
@@ -688,16 +688,27 @@
WriteFileHeader(Files[NtosUserStubs],
"System Call Stubs for Native API",
argv[NtosUserStubs + ArgOffset]);
- fputs("#include <asm.inc>\n"
- "#include <ks386.inc>\n"
- ".code\n\n", Files[NtosUserStubs]);
+ fputs("#include <asm.inc>\n", Files[NtosUserStubs]);
+ if (strcmp(ncitool_data[arch_sel].arch, "i386") == 0)
+ fputs("#include <ks386.inc>\n", Files[NtosUserStubs]);
+ else if (strcmp(ncitool_data[arch_sel].arch, "amd64") == 0)
+ fputs("#include <ksamd64.inc>\n", Files[NtosUserStubs]);
+ else if (strcmp(ncitool_data[arch_sel].arch, "arm") == 0)
+ fputs("#include <ksarm.inc>\n", Files[NtosUserStubs]);
+ fputs(".code\n\n", Files[NtosUserStubs]);
WriteFileHeader(Files[NtosKernelStubs],
"System Call Stubs for Native API",
argv[NtosKernelStubs + ArgOffset]);
- fputs("#include <asm.inc>\n"
- "#include <ks386.inc>\n"
- ".code\n"
+
+ fputs("#include <asm.inc>\n", Files[NtosKernelStubs]);
+ if (strcmp(ncitool_data[arch_sel].arch, "i386") == 0)
+ fputs("#include <ks386.inc>\n", Files[NtosKernelStubs]);
+ else if (strcmp(ncitool_data[arch_sel].arch, "amd64") == 0)
+ fputs("#include <ksamd64.inc>\n", Files[NtosKernelStubs]);
+ else if (strcmp(ncitool_data[arch_sel].arch, "arm") == 0)
+ fputs("#include <ksarm.inc>\n", Files[NtosKernelStubs]);
+ fputs(".code\n"
"EXTERN _KiSystemService:PROC\n\n", Files[NtosKernelStubs]);
WriteFileHeader(Files[Win32kStubs],