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
53 kmtest_drv/kmtest_drv.rc)
55 add_library(kmtest_drv SHARED ${KMTEST_DRV_SOURCE})
57 set_module_type(kmtest_drv kernelmodedriver)
58 target_link_libraries(kmtest_drv kmtest_printf ${PSEH_LIB})
59 add_importlibs(kmtest_drv ntoskrnl hal)
60 add_target_compile_definitions(kmtest_drv KMT_KERNEL_MODE NTDDI_VERSION=NTDDI_WS03SP1)
61 #add_pch(kmtest_drv include/kmt_test.h)
63 add_cd_file(TARGET kmtest_drv DESTINATION reactos/bin FOR all)
65 add_library(kmtest_printf
66 kmtest_drv/printf_stubs.c
67 ${REACTOS_SOURCE_DIR}/lib/sdk/crt/printf/streamout.c)
68 add_target_compile_definitions(kmtest_printf _LIBCNT_ _USER32_WSPRINTF wctomb=KmtWcToMb)
69 add_target_include_directories(kmtest_printf ${REACTOS_SOURCE_DIR}/lib/sdk/crt/include)
72 # kmtest.exe loader application
76 list(APPEND KMTEST_SOURCE
82 example/Example_user.c
83 ntos_io/IoDeviceObject_user.c
88 add_executable(kmtest ${KMTEST_SOURCE})
89 set_module_type(kmtest win32cui)
90 target_link_libraries(kmtest ${PSEH_LIB})
91 add_importlibs(kmtest advapi32 msvcrt kernel32 ntdll)
92 add_target_compile_definitions(kmtest KMT_USER_MODE)
93 #add_pch(kmtest include/kmt_test.h)
95 set_target_properties(kmtest PROPERTIES OUTPUT_NAME "kmtest_")
96 add_cd_file(TARGET kmtest DESTINATION reactos/bin FOR all)
101 add_custom_target(kmtest_drivers)
102 add_dependencies(kmtest_drivers
108 add_custom_target(kmtest_all)
109 add_dependencies(kmtest_all kmtest_drivers kmtest)