5 # subdirectories containing special-purpose drivers
7 add_subdirectory(example)
8 add_subdirectory(ntos_io)
10 list(APPEND COMMON_SOURCE
11 example/GuardedMemory.c
15 rtl/RtlUnicodeString.c)
18 # kmtest_drv.sys driver
20 list(APPEND KMTEST_DRV_SOURCE
21 kmtest_drv/kmtest_drv.c
26 ntos_ex/ExDoubleList.c
29 ntos_ex/ExInterlocked.c
32 ntos_ex/ExSequencedList.c
33 ntos_ex/ExSingleList.c
35 ntos_fsrtl/FsRtlExpression.c
36 ntos_io/IoDeviceInterface.c
43 ntos_ke/KeGuardedMutex.c
54 kmtest_drv/kmtest_drv.rc)
56 add_library(kmtest_drv SHARED ${KMTEST_DRV_SOURCE})
58 set_module_type(kmtest_drv kernelmodedriver)
59 target_link_libraries(kmtest_drv kmtest_printf ${PSEH_LIB})
60 add_importlibs(kmtest_drv ntoskrnl hal)
61 add_target_compile_definitions(kmtest_drv KMT_KERNEL_MODE NTDDI_VERSION=NTDDI_WS03SP1)
62 #add_pch(kmtest_drv include/kmt_test.h)
64 add_cd_file(TARGET kmtest_drv DESTINATION reactos/bin FOR all)
66 add_library(kmtest_printf
67 kmtest_drv/printf_stubs.c
68 ${REACTOS_SOURCE_DIR}/lib/sdk/crt/printf/streamout.c)
69 add_target_compile_definitions(kmtest_printf _LIBCNT_ _USER32_WSPRINTF wctomb=KmtWcToMb)
70 add_target_include_directories(kmtest_printf ${REACTOS_SOURCE_DIR}/lib/sdk/crt/include)
73 # kmtest.exe loader application
77 list(APPEND KMTEST_SOURCE
83 example/Example_user.c
84 ntos_io/IoDeviceObject_user.c
89 add_executable(kmtest ${KMTEST_SOURCE})
90 set_module_type(kmtest win32cui)
91 target_link_libraries(kmtest ${PSEH_LIB})
92 add_importlibs(kmtest advapi32 msvcrt kernel32 ntdll)
93 add_target_compile_definitions(kmtest KMT_USER_MODE)
94 #add_pch(kmtest include/kmt_test.h)
96 set_target_properties(kmtest PROPERTIES OUTPUT_NAME "kmtest_")
97 add_cd_file(TARGET kmtest DESTINATION reactos/bin FOR all)
102 add_custom_target(kmtest_drivers)
103 add_dependencies(kmtest_drivers
109 add_custom_target(kmtest_all)
110 add_dependencies(kmtest_all kmtest_drivers kmtest)