5 # subdirectories containing special-purpose drivers
7 add_subdirectory(example)
8 add_subdirectory(kernel32)
9 add_subdirectory(ntos_io)
11 list(APPEND COMMON_SOURCE
12 example/GuardedMemory.c
17 rtl/RtlUnicodeString.c)
20 # kmtest_drv.sys driver
22 list(APPEND KMTEST_DRV_SOURCE
23 kmtest_drv/kmtest_drv.c
29 ntos_ex/ExDoubleList.c
32 ntos_ex/ExInterlocked.c
35 ntos_ex/ExSequencedList.c
36 ntos_ex/ExSingleList.c
38 ntos_fsrtl/FsRtlExpression.c
39 ntos_io/IoDeviceInterface.c
47 ntos_ke/KeGuardedMutex.c
60 kmtest_drv/kmtest_drv.rc)
62 add_library(kmtest_drv SHARED ${KMTEST_DRV_SOURCE})
64 set_module_type(kmtest_drv kernelmodedriver)
65 target_link_libraries(kmtest_drv kmtest_printf chkstk ${PSEH_LIB})
66 add_importlibs(kmtest_drv ntoskrnl hal)
67 add_target_compile_definitions(kmtest_drv KMT_KERNEL_MODE NTDDI_VERSION=NTDDI_WS03SP1)
68 #add_pch(kmtest_drv include/kmt_test.h)
70 add_cd_file(TARGET kmtest_drv DESTINATION reactos/bin FOR all)
72 add_library(kmtest_printf
73 kmtest_drv/printf_stubs.c
74 ${REACTOS_SOURCE_DIR}/lib/sdk/crt/string/strnlen.c
75 ${REACTOS_SOURCE_DIR}/lib/sdk/crt/string/wcsnlen.c
76 ${REACTOS_SOURCE_DIR}/lib/sdk/crt/printf/streamout.c)
77 add_target_compile_definitions(kmtest_printf _LIBCNT_ _USER32_WSPRINTF wctomb=KmtWcToMb)
78 add_target_include_directories(kmtest_printf ${REACTOS_SOURCE_DIR}/lib/sdk/crt/include)
81 # kmtest.exe loader application
84 list(APPEND KMTEST_SOURCE
90 example/Example_user.c
91 kernel32/FindFile_user.c
92 ntos_io/IoDeviceObject_user.c
97 add_executable(kmtest ${KMTEST_SOURCE})
98 set_module_type(kmtest win32cui)
99 target_link_libraries(kmtest ${PSEH_LIB})
100 add_importlibs(kmtest advapi32 msvcrt kernel32 ntdll)
101 add_target_compile_definitions(kmtest KMT_USER_MODE)
102 #add_pch(kmtest include/kmt_test.h)
104 set_target_properties(kmtest PROPERTIES OUTPUT_NAME "kmtest_")
105 add_cd_file(TARGET kmtest DESTINATION reactos/bin FOR all)
110 add_custom_target(kmtest_drivers)
111 add_dependencies(kmtest_drivers
117 add_custom_target(kmtest_all)
118 add_dependencies(kmtest_all kmtest_drivers kmtest)