5 # subdirectories containing special-purpose drivers
7 add_subdirectory(example)
8 add_subdirectory(ntos_io)
10 list(APPEND COMMON_SOURCE
11 example/GuardedMemory.c
16 rtl/RtlUnicodeString.c)
19 # kmtest_drv.sys driver
21 list(APPEND KMTEST_DRV_SOURCE
22 kmtest_drv/kmtest_drv.c
28 ntos_ex/ExDoubleList.c
31 ntos_ex/ExInterlocked.c
34 ntos_ex/ExSequencedList.c
35 ntos_ex/ExSingleList.c
37 ntos_fsrtl/FsRtlExpression.c
38 ntos_io/IoDeviceInterface.c
46 ntos_ke/KeGuardedMutex.c
59 kmtest_drv/kmtest_drv.rc)
61 add_library(kmtest_drv SHARED ${KMTEST_DRV_SOURCE})
63 set_module_type(kmtest_drv kernelmodedriver)
64 target_link_libraries(kmtest_drv kmtest_printf chkstk ${PSEH_LIB})
65 add_importlibs(kmtest_drv ntoskrnl hal)
66 add_target_compile_definitions(kmtest_drv KMT_KERNEL_MODE NTDDI_VERSION=NTDDI_WS03SP1)
67 #add_pch(kmtest_drv include/kmt_test.h)
69 add_cd_file(TARGET kmtest_drv DESTINATION reactos/bin FOR all)
71 add_library(kmtest_printf
72 kmtest_drv/printf_stubs.c
73 ${REACTOS_SOURCE_DIR}/lib/sdk/crt/string/strnlen.c
74 ${REACTOS_SOURCE_DIR}/lib/sdk/crt/string/wcsnlen.c
75 ${REACTOS_SOURCE_DIR}/lib/sdk/crt/printf/streamout.c)
76 add_target_compile_definitions(kmtest_printf _LIBCNT_ _USER32_WSPRINTF wctomb=KmtWcToMb)
77 add_target_include_directories(kmtest_printf ${REACTOS_SOURCE_DIR}/lib/sdk/crt/include)
80 # kmtest.exe loader application
83 list(APPEND KMTEST_SOURCE
89 example/Example_user.c
90 ntos_io/IoDeviceObject_user.c
95 add_executable(kmtest ${KMTEST_SOURCE})
96 set_module_type(kmtest win32cui)
97 target_link_libraries(kmtest ${PSEH_LIB})
98 add_importlibs(kmtest advapi32 msvcrt kernel32 ntdll)
99 add_target_compile_definitions(kmtest KMT_USER_MODE)
100 #add_pch(kmtest include/kmt_test.h)
102 set_target_properties(kmtest PROPERTIES OUTPUT_NAME "kmtest_")
103 add_cd_file(TARGET kmtest DESTINATION reactos/bin FOR all)
108 add_custom_target(kmtest_drivers)
109 add_dependencies(kmtest_drivers
115 add_custom_target(kmtest_all)
116 add_dependencies(kmtest_all kmtest_drivers kmtest)