1
2include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/drivers
3                    ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib
4                    inc)
5
6list(APPEND SOURCE
7    balance.c
8    blake2b-ref.c
9    boot.c
10    btrfs.c
11    cache.c
12    calcthread.c
13    compress.c
14    crc32c.c
15    create.c
16    devctrl.c
17    dirctrl.c
18    extent-tree.c
19    fastio.c
20    fileinfo.c
21    flushthread.c
22    free-space.c
23    fsctl.c
24    fsrtl.c
25    galois.c
26    guid.c
27    pnp.c
28    read.c
29    registry.c
30    reparse.c
31    scrub.c
32    search.c
33    security.c
34    sha256.c
35    send.c
36    treefuncs.c
37    volume.c
38    worker-thread.c
39    write.c
40    xxhash.c
41    zstd/entropy_common.c
42    zstd/fse_compress.c
43    zstd/hist.c
44    zstd/huf_decompress.c
45    zstd/zstd_common.c
46    zstd/zstd_decompress.c
47    zstd/zstd_fast.c
48    zstd/zstd_ldm.c
49    zstd/error_private.c
50    zstd/fse_decompress.c
51    zstd/huf_compress.c
52    zstd/zstd_compress.c
53    zstd/zstd_double_fast.c
54    zstd/zstd_lazy.c
55    zstd/zstd_opt.c
56    btrfs_drv.h)
57
58if(ARCH STREQUAL "i386")
59    list(APPEND ASM_SOURCE crc32c-x86.S)
60elseif(ARCH STREQUAL "amd64")
61    list(APPEND ASM_SOURCE crc32c-amd64.S)
62endif()
63
64add_asm_files(btrfs_asm ${ASM_SOURCE})
65
66add_library(btrfs MODULE ${SOURCE} ${btrfs_asm} btrfs.rc)
67
68add_definitions(-D__KERNEL__)
69set_module_type(btrfs kernelmodedriver)
70target_link_libraries(btrfs rtlver zlib_solo chkstk wdmguid ${PSEH_LIB})
71add_importlibs(btrfs ntoskrnl hal)
72add_cd_file(TARGET btrfs DESTINATION reactos/system32/drivers NO_CAB FOR all)
73add_driver_inf(btrfs btrfs.inf)
74