2 include_directories(include)
5 # subdirectories containing special-purpose drivers
7 add_subdirectory(example)
8 add_subdirectory(kernel32)
9 add_subdirectory(ntos_io)
10 add_subdirectory(ntos_po)
11 add_subdirectory(tcpip)
13 list(APPEND COMMON_SOURCE
14 example/GuardedMemory.c
21 rtl/RtlUnicodeString.c)
24 # kmtest_drv.sys driver
26 list(APPEND KMTEST_DRV_SOURCE
28 kmtest_drv/kmtest_drv.c
41 ntos_ex/ExDoubleList.c
44 ntos_ex/ExInterlocked.c
47 ntos_ex/ExSequencedList.c
48 ntos_ex/ExSingleList.c
50 ntos_fsrtl/FsRtlDissect.c
51 ntos_fsrtl/FsRtlExpression.c
52 ntos_fsrtl/FsRtlLegal.c
54 ntos_fsrtl/FsRtlTunnel.c
55 ntos_io/IoCreateFile.c
56 ntos_io/IoDeviceInterface.c
58 ntos_io/IoFilesystem.c
66 ntos_ke/KeGuardedMutex.c
73 ntos_mm/MmReservedMapping.c
75 ntos_mm/ZwAllocateVirtualMemory.c
76 ntos_mm/ZwCreateSection.c
77 ntos_mm/ZwMapViewOfSection.c
85 ntos_se/SeInheritance.c
86 ntos_se/SeQueryInfoToken.c
89 kmtest_drv/kmtest_drv.rc)
91 add_library(kmtest_drv SHARED ${KMTEST_DRV_SOURCE})
92 set_module_type(kmtest_drv kernelmodedriver)
93 target_link_libraries(kmtest_drv kmtest_printf chkstk memcmp ${PSEH_LIB})
94 add_importlibs(kmtest_drv ntoskrnl hal)
95 add_dependencies(kmtest_drv bugcodes xdk)
96 add_target_compile_definitions(kmtest_drv KMT_KERNEL_MODE NTDDI_VERSION=NTDDI_WS03SP1)
97 #add_pch(kmtest_drv include/kmt_test.h)
98 add_cd_file(TARGET kmtest_drv DESTINATION reactos/bin FOR all)
100 add_library(kmtest_printf
101 kmtest_drv/printf_stubs.c
102 ${REACTOS_SOURCE_DIR}/lib/sdk/crt/string/strnlen.c
103 ${REACTOS_SOURCE_DIR}/lib/sdk/crt/string/wcsnlen.c
104 ${REACTOS_SOURCE_DIR}/lib/sdk/crt/printf/streamout.c)
105 add_target_compile_definitions(kmtest_printf _LIBCNT_ _USER32_WSPRINTF wctomb=KmtWcToMb)
106 add_target_include_directories(kmtest_printf ${REACTOS_SOURCE_DIR}/lib/sdk/crt/include)
109 # kmtest.exe loader application
112 list(APPEND KMTEST_SOURCE
118 example/Example_user.c
119 kernel32/FindFile_user.c
120 ntos_io/IoCreateFile_user.c
121 ntos_io/IoDeviceObject_user.c
122 ntos_io/IoReadWrite_user.c
129 add_executable(kmtest ${KMTEST_SOURCE})
130 set_module_type(kmtest win32cui)
131 target_link_libraries(kmtest ${PSEH_LIB})
132 add_importlibs(kmtest advapi32 ws2_32 msvcrt kernel32 ntdll)
133 add_target_compile_definitions(kmtest KMT_USER_MODE)
134 #add_pch(kmtest include/kmt_test.h)
135 set_target_properties(kmtest PROPERTIES OUTPUT_NAME "kmtest_")
136 add_cd_file(TARGET kmtest DESTINATION reactos/bin FOR all)
141 add_custom_target(kmtest_drivers)
142 add_dependencies(kmtest_drivers
153 add_custom_target(kmtest_all)
154 add_dependencies(kmtest_all kmtest_drivers kmtest)