xref: /reactos/boot/rtl/blrtl.cmake (revision 57b9c6b2)
1
2add_definitions(
3    -DNO_RTL_INLINES
4    -D_BLDR_
5    -D_NTSYSTEM_)
6
7set(NTOS_RTL_SOURCE_DIR "${REACTOS_SOURCE_DIR}/sdk/lib/rtl")
8include_directories(${NTOS_RTL_SOURCE_DIR})
9
10if (GCC)
11    # Enable this again. CORE-17637
12    add_compile_options(-Wunused-result)
13endif()
14
15list(APPEND SOURCE
16    # ${NTOS_RTL_SOURCE_DIR}/assert.c   ## Requires a local implementation.
17    ${NTOS_RTL_SOURCE_DIR}/bitmap.c
18    # ${NTOS_RTL_SOURCE_DIR}/bootdata.c ## Requires a local implementation.
19    ${NTOS_RTL_SOURCE_DIR}/compress.c
20    ${NTOS_RTL_SOURCE_DIR}/crc32.c
21    # ${NTOS_RTL_SOURCE_DIR}/debug.c    ## Requires a local implementation.
22    ${NTOS_RTL_SOURCE_DIR}/image.c
23    ${NTOS_RTL_SOURCE_DIR}/largeint.c
24    ## message.c
25    # ${NTOS_RTL_SOURCE_DIR}/nls.c      ## Requires a local implementation.
26    nlsboot.c
27    ${NTOS_RTL_SOURCE_DIR}/random.c
28    ## res.c    ## Optional? Needs SEH
29    # ${NTOS_RTL_SOURCE_DIR}/time.c     ## Optional
30    ${NTOS_RTL_SOURCE_DIR}/unicode.c
31    ${NTOS_RTL_SOURCE_DIR}/rtl.h)
32
33if(ARCH STREQUAL "i386")
34    list(APPEND ASM_SOURCE
35        ${NTOS_RTL_SOURCE_DIR}/i386/debug_asm.S
36        ${NTOS_RTL_SOURCE_DIR}/i386/rtlmem.s
37        ${NTOS_RTL_SOURCE_DIR}/i386/rtlswap.S
38        ## ${NTOS_RTL_SOURCE_DIR}/i386/res_asm.s
39        )
40elseif(ARCH STREQUAL "amd64")
41    list(APPEND ASM_SOURCE
42        ${NTOS_RTL_SOURCE_DIR}/amd64/debug_asm.S
43        ${NTOS_RTL_SOURCE_DIR}/amd64/rtlmem.S)
44    list(APPEND SOURCE
45        ${NTOS_RTL_SOURCE_DIR}/bitmap64.c
46        ${NTOS_RTL_SOURCE_DIR}/byteswap.c
47        ${NTOS_RTL_SOURCE_DIR}/mem.c)
48elseif(ARCH STREQUAL "arm")
49    list(APPEND ASM_SOURCE arm/debug_asm.S)
50    list(APPEND SOURCE
51        ${NTOS_RTL_SOURCE_DIR}/byteswap.c
52        ${NTOS_RTL_SOURCE_DIR}/mem.c)
53endif()
54
55add_asm_files(blrtl_asm ${ASM_SOURCE})
56add_library(blrtl ${SOURCE} ${blrtl_asm})
57add_pch(blrtl ${NTOS_RTL_SOURCE_DIR}/rtl.h SOURCE)
58add_dependencies(blrtl psdk asm)
59