mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 13:10:39 +00:00
[CMAKE]
- Rename CreateBootSectorTarget2 to CreateBootSectorTarget and remove the old rbuild version svn path=/trunk/; revision=56368
This commit is contained in:
parent
c20ab1959d
commit
f237b33f0e
4 changed files with 18 additions and 41 deletions
|
@ -1,12 +1,12 @@
|
||||||
|
|
||||||
if(ARCH MATCHES i386 OR ARCH MATCHES amd64)
|
if(ARCH MATCHES i386 OR ARCH MATCHES amd64)
|
||||||
|
|
||||||
CreateBootSectorTarget2(dosmbr ${CMAKE_CURRENT_SOURCE_DIR}/dosmbr.S ${CMAKE_CURRENT_BINARY_DIR}/dosmbr.bin 7c00)
|
CreateBootSectorTarget(dosmbr ${CMAKE_CURRENT_SOURCE_DIR}/dosmbr.S ${CMAKE_CURRENT_BINARY_DIR}/dosmbr.bin 7c00)
|
||||||
CreateBootSectorTarget2(ext2 ${CMAKE_CURRENT_SOURCE_DIR}/ext2.S ${CMAKE_CURRENT_BINARY_DIR}/ext2.bin 0)
|
CreateBootSectorTarget(ext2 ${CMAKE_CURRENT_SOURCE_DIR}/ext2.S ${CMAKE_CURRENT_BINARY_DIR}/ext2.bin 0)
|
||||||
CreateBootSectorTarget2(fat32 ${CMAKE_CURRENT_SOURCE_DIR}/fat32.S ${CMAKE_CURRENT_BINARY_DIR}/fat32.bin 7c00)
|
CreateBootSectorTarget(fat32 ${CMAKE_CURRENT_SOURCE_DIR}/fat32.S ${CMAKE_CURRENT_BINARY_DIR}/fat32.bin 7c00)
|
||||||
CreateBootSectorTarget2(fat ${CMAKE_CURRENT_SOURCE_DIR}/fat.S ${CMAKE_CURRENT_BINARY_DIR}/fat.bin 7c00)
|
CreateBootSectorTarget(fat ${CMAKE_CURRENT_SOURCE_DIR}/fat.S ${CMAKE_CURRENT_BINARY_DIR}/fat.bin 7c00)
|
||||||
CreateBootSectorTarget2(isoboot ${CMAKE_CURRENT_SOURCE_DIR}/isoboot.S ${CMAKE_CURRENT_BINARY_DIR}/isoboot.bin 7000)
|
CreateBootSectorTarget(isoboot ${CMAKE_CURRENT_SOURCE_DIR}/isoboot.S ${CMAKE_CURRENT_BINARY_DIR}/isoboot.bin 7000)
|
||||||
CreateBootSectorTarget2(isobtrt ${CMAKE_CURRENT_SOURCE_DIR}/isobtrt.S ${CMAKE_CURRENT_BINARY_DIR}/isobtrt.bin 7000)
|
CreateBootSectorTarget(isobtrt ${CMAKE_CURRENT_SOURCE_DIR}/isobtrt.S ${CMAKE_CURRENT_BINARY_DIR}/isobtrt.bin 7000)
|
||||||
|
|
||||||
add_cd_file(TARGET dosmbr DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/dosmbr.bin FOR all)
|
add_cd_file(TARGET dosmbr DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/dosmbr.bin FOR all)
|
||||||
add_cd_file(TARGET fat32 DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/fat32.bin FOR all)
|
add_cd_file(TARGET fat32 DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/fat32.bin FOR all)
|
||||||
|
|
|
@ -7,12 +7,12 @@ endif()
|
||||||
spec2def(freeldr.sys freeldr.spec)
|
spec2def(freeldr.sys freeldr.spec)
|
||||||
|
|
||||||
if(ARCH MATCHES i386)
|
if(ARCH MATCHES i386)
|
||||||
CreateBootSectorTarget2(frldr16
|
CreateBootSectorTarget(frldr16
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/arch/realmode/i386.S
|
${CMAKE_CURRENT_SOURCE_DIR}/arch/realmode/i386.S
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin
|
${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin
|
||||||
F800)
|
F800)
|
||||||
elseif(ARCH MATCHES amd64)
|
elseif(ARCH MATCHES amd64)
|
||||||
CreateBootSectorTarget2(frldr16
|
CreateBootSectorTarget(frldr16
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/arch/realmode/amd64.S
|
${CMAKE_CURRENT_SOURCE_DIR}/arch/realmode/amd64.S
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin
|
${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin
|
||||||
F800)
|
F800)
|
||||||
|
|
|
@ -338,30 +338,7 @@ else()
|
||||||
endmacro()
|
endmacro()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
function(CreateBootSectorTarget _target_name _asm_file _object_file _base_address)
|
function(CreateBootSectorTarget _target_name _asm_file _binary_file _base_address)
|
||||||
get_filename_component(OBJECT_PATH ${_object_file} PATH)
|
|
||||||
get_filename_component(OBJECT_NAME ${_object_file} NAME)
|
|
||||||
file(MAKE_DIRECTORY ${OBJECT_PATH})
|
|
||||||
get_directory_property(defines COMPILE_DEFINITIONS)
|
|
||||||
get_directory_property(includes INCLUDE_DIRECTORIES)
|
|
||||||
|
|
||||||
foreach(arg ${defines})
|
|
||||||
set(result_defs ${result_defs} -D${arg})
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
foreach(arg ${includes})
|
|
||||||
set(result_incs -I${arg} ${result_incs})
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT ${_object_file}
|
|
||||||
COMMAND nasm -o ${_object_file} ${result_incs} ${result_defs} -f bin ${_asm_file}
|
|
||||||
DEPENDS ${_asm_file})
|
|
||||||
set_source_files_properties(${_object_file} PROPERTIES GENERATED TRUE)
|
|
||||||
add_custom_target(${_target_name} ALL DEPENDS ${_object_file})
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
function(CreateBootSectorTarget2 _target_name _asm_file _binary_file _base_address)
|
|
||||||
set(_object_file ${_binary_file}.o)
|
set(_object_file ${_binary_file}.o)
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
|
|
|
@ -189,7 +189,7 @@ else()
|
||||||
set(CMAKE_ASM16_COMPILER ml.exe)
|
set(CMAKE_ASM16_COMPILER ml.exe)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
function(CreateBootSectorTarget2 _target_name _asm_file _binary_file _base_address)
|
function(CreateBootSectorTarget _target_name _asm_file _binary_file _base_address)
|
||||||
|
|
||||||
set(_object_file ${_binary_file}.obj)
|
set(_object_file ${_binary_file}.obj)
|
||||||
set(_temp_file ${_binary_file}.tmp)
|
set(_temp_file ${_binary_file}.tmp)
|
||||||
|
|
Loading…
Reference in a new issue