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
82 ntos_ob/ObSymbolicLink.c
88 ntos_se/SeInheritance.c
89 ntos_se/SeQueryInfoToken.c
90 rtl/RtlIsValidOemCharacter.c
93 kmtest_drv/kmtest_drv.rc)
95 add_library(kmtest_drv SHARED ${KMTEST_DRV_SOURCE})
96 set_module_type(kmtest_drv kernelmodedriver)
97 target_link_libraries(kmtest_drv kmtest_printf chkstk memcmp ntoskrnl_vista ${PSEH_LIB})
98 add_importlibs(kmtest_drv ntoskrnl hal)
99 add_dependencies(kmtest_drv bugcodes xdk)
100 add_target_compile_definitions(kmtest_drv KMT_KERNEL_MODE NTDDI_VERSION=NTDDI_WS03SP1)
101 #add_pch(kmtest_drv include/kmt_test.h)
102 add_cd_file(TARGET kmtest_drv DESTINATION reactos/bin FOR all)
104 add_library(kmtest_printf
105 kmtest_drv/printf_stubs.c
106 ${REACTOS_SOURCE_DIR}/sdk/lib/crt/string/strnlen.c
107 ${REACTOS_SOURCE_DIR}/sdk/lib/crt/string/wcsnlen.c
108 ${REACTOS_SOURCE_DIR}/sdk/lib/crt/printf/streamout.c)
109 add_target_compile_definitions(kmtest_printf _LIBCNT_ _USER32_WSPRINTF wctomb=KmtWcToMb)
110 add_target_include_directories(kmtest_printf ${REACTOS_SOURCE_DIR}/sdk/lib/crt/include)
113 # kmtest.exe loader application
116 list(APPEND KMTEST_SOURCE
122 example/Example_user.c
123 kernel32/FindFile_user.c
124 ntos_cc/CcCopyRead_user.c
125 ntos_io/IoCreateFile_user.c
126 ntos_io/IoDeviceObject_user.c
127 ntos_io/IoReadWrite_user.c
134 add_executable(kmtest ${KMTEST_SOURCE})
135 set_module_type(kmtest win32cui)
136 target_link_libraries(kmtest ${PSEH_LIB})
137 add_importlibs(kmtest advapi32 ws2_32 msvcrt kernel32 ntdll)
138 add_target_compile_definitions(kmtest KMT_USER_MODE)
139 #add_pch(kmtest include/kmt_test.h)
140 set_target_properties(kmtest PROPERTIES OUTPUT_NAME "kmtest_")
141 add_cd_file(TARGET kmtest DESTINATION reactos/bin FOR all)
146 add_custom_target(kmtest_drivers)
147 add_dependencies(kmtest_drivers
159 add_custom_target(kmtest_all)
160 add_dependencies(kmtest_all kmtest_drivers kmtest)