1c2c66affSColin Finck
293beefacSHermès Bélusca-Maïtoinclude_directories(${REACTOS_SOURCE_DIR}/boot/freeldr)
393beefacSHermès Bélusca-Maïto
4c2c66affSColin Finckif(ARCH STREQUAL "i386" OR ARCH STREQUAL "amd64")
5c2c66affSColin Finck
6c2c66affSColin Finck    CreateBootSectorTarget(dosmbr ${CMAKE_CURRENT_SOURCE_DIR}/dosmbr.S ${CMAKE_CURRENT_BINARY_DIR}/dosmbr.bin 7c00)
7c2c66affSColin Finck    CreateBootSectorTarget(ext2 ${CMAKE_CURRENT_SOURCE_DIR}/ext2.S ${CMAKE_CURRENT_BINARY_DIR}/ext2.bin 0)
8c2c66affSColin Finck
9c2c66affSColin Finck    CreateBootSectorTarget(fat ${CMAKE_CURRENT_SOURCE_DIR}/fat.S ${CMAKE_CURRENT_BINARY_DIR}/fat.bin 7c00)
10c2c66affSColin Finck    CreateBootSectorTarget(fat32 ${CMAKE_CURRENT_SOURCE_DIR}/fat32.S ${CMAKE_CURRENT_BINARY_DIR}/fat32.bin 7c00)
11*f0d73e0fSSylvain Deverre    CreateBootSectorTarget(ntfsvbr ${CMAKE_CURRENT_SOURCE_DIR}/ntfs.S ${CMAKE_CURRENT_BINARY_DIR}/ntfs.bin 7c00)
123b69eee7SVictor Perevertkin    CreateBootSectorTarget(btrfsvbr ${CMAKE_CURRENT_SOURCE_DIR}/btrfs.S ${CMAKE_CURRENT_BINARY_DIR}/btrfs.bin 7c00)
13c2c66affSColin Finck
14065afd93SDmitry Borisov    if(SARCH STREQUAL "pc98")
15065afd93SDmitry Borisov        CreateBootSectorTarget(fat12pc98 ${CMAKE_CURRENT_SOURCE_DIR}/pc98/fat12fdd.S ${CMAKE_CURRENT_BINARY_DIR}/pc98/fat12fdd.bin 7c00)
16065afd93SDmitry Borisov    endif()
17065afd93SDmitry Borisov
18c2c66affSColin Finck    ## New versions using FATY.S (experimental)
19c2c66affSColin Finck    # add_definitions(-DFAT12)
20c2c66affSColin Finck    # CreateBootSectorTarget(fat_new ${CMAKE_CURRENT_SOURCE_DIR}/faty.S ${CMAKE_CURRENT_BINARY_DIR}/fat_new.bin 7c00)
21c2c66affSColin Finck    # remove_definitions(-DFAT12)
22c2c66affSColin Finck    # add_definitions(-DFAT16)
23c2c66affSColin Finck    # CreateBootSectorTarget(fat16_new ${CMAKE_CURRENT_SOURCE_DIR}/faty.S ${CMAKE_CURRENT_BINARY_DIR}/fat16_new.bin 7c00)
24c2c66affSColin Finck    # remove_definitions(-DFAT16)
25c2c66affSColin Finck    # add_definitions(-DFAT32)
26c2c66affSColin Finck    # CreateBootSectorTarget(fat32_new ${CMAKE_CURRENT_SOURCE_DIR}/faty.S ${CMAKE_CURRENT_BINARY_DIR}/fat32_new.bin 7c00)
27c2c66affSColin Finck    # remove_definitions(-DFAT32)
28c2c66affSColin Finck
29c2c66affSColin Finck    CreateBootSectorTarget(isoboot ${CMAKE_CURRENT_SOURCE_DIR}/isoboot.S ${CMAKE_CURRENT_BINARY_DIR}/isoboot.bin 7000)
30c2c66affSColin Finck    CreateBootSectorTarget(isobtrt ${CMAKE_CURRENT_SOURCE_DIR}/isobtrt.S ${CMAKE_CURRENT_BINARY_DIR}/isobtrt.bin 7000)
31c2c66affSColin Finck    CreateBootSectorTarget(isombr ${CMAKE_CURRENT_SOURCE_DIR}/isombr.S ${CMAKE_CURRENT_BINARY_DIR}/isombr.bin 7000)
32c2c66affSColin Finck
33c2c66affSColin Finck    add_cd_file(TARGET dosmbr DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/dosmbr.bin FOR bootcd regtest)
34c2c66affSColin Finck    add_cd_file(TARGET ext2 DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/ext2.bin FOR bootcd regtest)
353b69eee7SVictor Perevertkin    add_cd_file(TARGET btrfsvbr DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/btrfs.bin FOR bootcd regtest)
36c2c66affSColin Finck    add_cd_file(TARGET fat DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/fat.bin FOR bootcd regtest)
37c2c66affSColin Finck    add_cd_file(TARGET fat32 DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/fat32.bin FOR bootcd regtest)
38*f0d73e0fSSylvain Deverre    add_cd_file(TARGET ntfsvbr DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/ntfs.bin FOR bootcd regtest)
39c2c66affSColin Finck    add_cd_file(TARGET isoboot DESTINATION loader NO_CAB NOT_IN_HYBRIDCD FILE ${CMAKE_CURRENT_BINARY_DIR}/isoboot.bin FOR all hybridcd)
40c2c66affSColin Finck    add_cd_file(TARGET isobtrt DESTINATION loader NO_CAB NOT_IN_HYBRIDCD FILE ${CMAKE_CURRENT_BINARY_DIR}/isobtrt.bin FOR bootcd regtest)
4128b866ccSMark Jansenelseif(ARCH STREQUAL "arm")
4228b866ccSMark Jansen    add_custom_target(fat
4328b866ccSMark Jansen        COMMAND exit 1
4428b866ccSMark Jansen        COMMENT "arm fat target not implemented yet")
4528b866ccSMark Jansen    add_custom_target(fat32
4628b866ccSMark Jansen        COMMAND exit 1
4728b866ccSMark Jansen        COMMENT "arm fat32 target not implemented yet")
48c2c66affSColin Finckendif()
49