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_po)
12 add_subdirectory(tcpip)
14 list(APPEND COMMON_SOURCE
15 example/GuardedMemory.c
22 rtl/RtlUnicodeString.c)
25 # kmtest_drv.sys driver
27 list(APPEND KMTEST_DRV_SOURCE
29 kmtest_drv/kmtest_drv.c
40 novp_fsrtl/FsRtlRemoveDotsFromPath.c
43 ntos_ex/ExDoubleList.c
46 ntos_ex/ExInterlocked.c
49 ntos_ex/ExSequencedList.c
50 ntos_ex/ExSingleList.c
52 ntos_fsrtl/FsRtlDissect.c
53 ntos_fsrtl/FsRtlExpression.c
54 ntos_fsrtl/FsRtlLegal.c
56 ntos_fsrtl/FsRtlTunnel.c
57 ntos_io/IoCreateFile.c
58 ntos_io/IoDeviceInterface.c
60 ntos_io/IoFilesystem.c
68 ntos_ke/KeGuardedMutex.c
75 ntos_mm/MmReservedMapping.c
77 ntos_mm/ZwAllocateVirtualMemory.c
78 ntos_mm/ZwCreateSection.c
79 ntos_mm/ZwMapViewOfSection.c
87 ntos_se/SeInheritance.c
88 ntos_se/SeQueryInfoToken.c
91 kmtest_drv/kmtest_drv.rc)
93 add_library(kmtest_drv SHARED ${KMTEST_DRV_SOURCE})
94 set_module_type(kmtest_drv kernelmodedriver)
95 target_link_libraries(kmtest_drv kmtest_printf chkstk memcmp ntoskrnl_vista ${PSEH_LIB})
96 add_importlibs(kmtest_drv ntoskrnl hal)
97 add_dependencies(kmtest_drv bugcodes xdk)
98 add_target_compile_definitions(kmtest_drv KMT_KERNEL_MODE NTDDI_VERSION=NTDDI_WS03SP1)
99 #add_pch(kmtest_drv include/kmt_test.h)
100 add_cd_file(TARGET kmtest_drv DESTINATION reactos/bin FOR all)
102 add_library(kmtest_printf
103 kmtest_drv/printf_stubs.c
104 ${REACTOS_SOURCE_DIR}/sdk/lib/crt/string/strnlen.c
105 ${REACTOS_SOURCE_DIR}/sdk/lib/crt/string/wcsnlen.c
106 ${REACTOS_SOURCE_DIR}/sdk/lib/crt/printf/streamout.c)
107 add_target_compile_definitions(kmtest_printf _LIBCNT_ _USER32_WSPRINTF wctomb=KmtWcToMb)
108 add_target_include_directories(kmtest_printf ${REACTOS_SOURCE_DIR}/sdk/lib/crt/include)
111 # kmtest.exe loader application
114 list(APPEND KMTEST_SOURCE
120 example/Example_user.c
121 kernel32/FindFile_user.c
122 ntos_cc/CcCopyRead_user.c
123 ntos_io/IoCreateFile_user.c
124 ntos_io/IoDeviceObject_user.c
125 ntos_io/IoReadWrite_user.c
132 add_executable(kmtest ${KMTEST_SOURCE})
133 set_module_type(kmtest win32cui)
134 target_link_libraries(kmtest ${PSEH_LIB})
135 add_importlibs(kmtest advapi32 ws2_32 msvcrt kernel32 ntdll)
136 add_target_compile_definitions(kmtest KMT_USER_MODE)
137 #add_pch(kmtest include/kmt_test.h)
138 set_target_properties(kmtest PROPERTIES OUTPUT_NAME "kmtest_")
139 add_cd_file(TARGET kmtest DESTINATION reactos/bin FOR all)
144 add_custom_target(kmtest_drivers)
145 add_dependencies(kmtest_drivers
156 add_custom_target(kmtest_all)
157 add_dependencies(kmtest_all kmtest_drivers kmtest)