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