2 include_directories(include)
5 # subdirectories containing special-purpose drivers
7 add_subdirectory(example)
8 add_subdirectory(kernel32)
9 add_subdirectory(ntos_cc)
10 add_subdirectory(ntos_io)
11 add_subdirectory(ntos_mm)
12 add_subdirectory(ntos_po)
13 add_subdirectory(tcpip)
15 list(APPEND COMMON_SOURCE
16 example/GuardedMemory.c
23 rtl/RtlUnicodeString.c)
26 # kmtest_drv.sys driver
28 list(APPEND KMTEST_DRV_SOURCE
30 kmtest_drv/kmtest_drv.c
41 novp_fsrtl/FsRtlRemoveDotsFromPath.c
44 ntos_ex/ExDoubleList.c
47 ntos_ex/ExInterlocked.c
50 ntos_ex/ExSequencedList.c
51 ntos_ex/ExSingleList.c
53 ntos_fsrtl/FsRtlDissect.c
54 ntos_fsrtl/FsRtlExpression.c
55 ntos_fsrtl/FsRtlLegal.c
57 ntos_fsrtl/FsRtlTunnel.c
58 ntos_io/IoCreateFile.c
59 ntos_io/IoDeviceInterface.c
61 ntos_io/IoFilesystem.c
69 ntos_ke/KeGuardedMutex.c
76 ntos_mm/MmReservedMapping.c
78 ntos_mm/ZwAllocateVirtualMemory.c
79 ntos_mm/ZwCreateSection.c
80 ntos_mm/ZwMapViewOfSection.c
84 ntos_ob/ObSymbolicLink.c
90 ntos_se/SeInheritance.c
91 ntos_se/SeQueryInfoToken.c
92 rtl/RtlIsValidOemCharacter.c
95 kmtest_drv/kmtest_drv.rc)
97 add_library(kmtest_drv SHARED ${KMTEST_DRV_SOURCE})
98 set_module_type(kmtest_drv kernelmodedriver)
99 target_link_libraries(kmtest_drv kmtest_printf chkstk memcmp ntoskrnl_vista ${PSEH_LIB})
100 add_importlibs(kmtest_drv ntoskrnl hal)
101 add_dependencies(kmtest_drv bugcodes xdk)
102 add_target_compile_definitions(kmtest_drv KMT_KERNEL_MODE NTDDI_VERSION=NTDDI_WS03SP1)
103 #add_pch(kmtest_drv include/kmt_test.h)
104 add_rostests_file(TARGET kmtest_drv)
106 add_library(kmtest_printf
107 kmtest_drv/printf_stubs.c
108 ${REACTOS_SOURCE_DIR}/sdk/lib/crt/string/strnlen.c
109 ${REACTOS_SOURCE_DIR}/sdk/lib/crt/string/wcsnlen.c
110 ${REACTOS_SOURCE_DIR}/sdk/lib/crt/printf/streamout.c)
111 add_target_compile_definitions(kmtest_printf _LIBCNT_ _USER32_WSPRINTF wctomb=KmtWcToMb)
112 add_target_include_directories(kmtest_printf ${REACTOS_SOURCE_DIR}/sdk/lib/crt/include)
115 # kmtest.exe loader application
118 list(APPEND KMTEST_SOURCE
124 example/Example_user.c
125 kernel32/FindFile_user.c
126 ntos_cc/CcCopyRead_user.c
127 ntos_io/IoCreateFile_user.c
128 ntos_io/IoDeviceObject_user.c
129 ntos_io/IoReadWrite_user.c
130 ntos_mm/NtCreateSection_user.c
137 add_executable(kmtest ${KMTEST_SOURCE})
138 set_module_type(kmtest win32cui)
139 target_link_libraries(kmtest ${PSEH_LIB})
140 add_importlibs(kmtest advapi32 ws2_32 msvcrt kernel32 ntdll)
141 add_target_compile_definitions(kmtest KMT_USER_MODE)
142 #add_pch(kmtest include/kmt_test.h)
143 set_target_properties(kmtest PROPERTIES OUTPUT_NAME "kmtest_")
144 #add_rostests_file(TARGET kmtest)
145 add_cd_file(TARGET kmtest DESTINATION reactos/bin FOR all)
150 add_custom_target(kmtest_drivers)
151 add_dependencies(kmtest_drivers
164 add_custom_target(kmtest_all)
165 add_dependencies(kmtest_all kmtest_drivers kmtest)