4 add_definitions(-D_NTOSKRNL_)
5 add_definitions(-DNO_RTL_INLINES)
6 add_definitions(-D_NTSYSTEM_)
7 add_definitions(-D_NTDLLBUILD_)
9 file(GLOB_RECURSE ARCH_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/${ARCH}/*.c ${CMAKE_CURRENT_SOURCE_DIR}/${ARCH}/*.S)
11 get_directory_property(defines COMPILE_DEFINITIONS)
13 foreach(arg ${defines})
14 set(result_defs "${result_defs} -D${arg}")
15 endforeach(arg ${defines})
17 set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -x assembler-with-cpp -o <OBJECT> ${result_defs} -D__ASM__ <FLAGS> -c <SOURCE>")
19 file(GLOB SOURCE "*.c")
21 list(REMOVE_ITEM SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/avlsupp.c
22 ${CMAKE_CURRENT_SOURCE_DIR}/mem.c
23 ${CMAKE_CURRENT_SOURCE_DIR}/memgen.c
26 add_library(rtl ${ARCH_SOURCE} ${SOURCE})
27 add_dependencies(rtl psdk)