mirror of
https://github.com/reactos/reactos.git
synced 2025-04-18 03:34:11 +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)
|
||||
|
||||
CreateBootSectorTarget2(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)
|
||||
CreateBootSectorTarget2(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)
|
||||
CreateBootSectorTarget2(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(dosmbr ${CMAKE_CURRENT_SOURCE_DIR}/dosmbr.S ${CMAKE_CURRENT_BINARY_DIR}/dosmbr.bin 7c00)
|
||||
CreateBootSectorTarget(ext2 ${CMAKE_CURRENT_SOURCE_DIR}/ext2.S ${CMAKE_CURRENT_BINARY_DIR}/ext2.bin 0)
|
||||
CreateBootSectorTarget(fat32 ${CMAKE_CURRENT_SOURCE_DIR}/fat32.S ${CMAKE_CURRENT_BINARY_DIR}/fat32.bin 7c00)
|
||||
CreateBootSectorTarget(fat ${CMAKE_CURRENT_SOURCE_DIR}/fat.S ${CMAKE_CURRENT_BINARY_DIR}/fat.bin 7c00)
|
||||
CreateBootSectorTarget(isoboot ${CMAKE_CURRENT_SOURCE_DIR}/isoboot.S ${CMAKE_CURRENT_BINARY_DIR}/isoboot.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 fat32 DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/fat32.bin FOR all)
|
||||
|
|
|
@ -7,12 +7,12 @@ endif()
|
|||
spec2def(freeldr.sys freeldr.spec)
|
||||
|
||||
if(ARCH MATCHES i386)
|
||||
CreateBootSectorTarget2(frldr16
|
||||
CreateBootSectorTarget(frldr16
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/arch/realmode/i386.S
|
||||
${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin
|
||||
F800)
|
||||
elseif(ARCH MATCHES amd64)
|
||||
CreateBootSectorTarget2(frldr16
|
||||
CreateBootSectorTarget(frldr16
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/arch/realmode/amd64.S
|
||||
${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin
|
||||
F800)
|
||||
|
|
|
@ -229,10 +229,10 @@ function(spec2def _dllname _spec_file)
|
|||
message(FATAL_ERROR "Wrong argument passed to spec2def, ${ARGN}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# get library basename
|
||||
get_filename_component(_file ${_dllname} NAME_WE)
|
||||
|
||||
|
||||
# error out on anything else than spec
|
||||
if(NOT ${_spec_file} MATCHES ".*\\.spec")
|
||||
message(FATAL_ERROR "spec2def only takes spec files as input.")
|
||||
|
@ -255,7 +255,7 @@ function(spec2def _dllname _spec_file)
|
|||
#create normal importlib
|
||||
_add_library(lib${_file} STATIC EXCLUDE_FROM_ALL ${CMAKE_CURRENT_BINARY_DIR}/${_file}_implib.def)
|
||||
set_target_properties(lib${_file} PROPERTIES LINKER_LANGUAGE "IMPLIB" PREFIX "")
|
||||
|
||||
|
||||
#create delayed importlib
|
||||
_add_library(lib${_file}_delayed STATIC EXCLUDE_FROM_ALL ${CMAKE_CURRENT_BINARY_DIR}/${_file}_implib.def)
|
||||
set_target_properties(lib${_file}_delayed PROPERTIES LINKER_LANGUAGE "IMPLIB_DELAYED" PREFIX "")
|
||||
|
@ -338,30 +338,7 @@ else()
|
|||
endmacro()
|
||||
endif()
|
||||
|
||||
function(CreateBootSectorTarget _target_name _asm_file _object_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)
|
||||
function(CreateBootSectorTarget _target_name _asm_file _binary_file _base_address)
|
||||
set(_object_file ${_binary_file}.o)
|
||||
|
||||
add_custom_command(
|
||||
|
|
|
@ -70,7 +70,7 @@ if(_PREFAST_)
|
|||
set(CMAKE_CXX_LINK_EXECUTABLE
|
||||
"cl ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> -link /implib:<TARGET_IMPLIB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
|
||||
endif()
|
||||
|
||||
|
||||
endif()
|
||||
|
||||
set(CMAKE_RC_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_LIBRARY})
|
||||
|
@ -139,15 +139,15 @@ function(spec2def _dllname _spec_file)
|
|||
message(FATAL_ERROR "Wrong argument passed to spec2def, ${ARGN}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# get library basename
|
||||
get_filename_component(_file ${_dllname} NAME_WE)
|
||||
|
||||
|
||||
# error out on anything else than spec
|
||||
if(NOT ${_spec_file} MATCHES ".*\\.spec")
|
||||
message(FATAL_ERROR "spec2def only takes spec files as input.")
|
||||
endif()
|
||||
|
||||
|
||||
#generate def for the DLL and C stubs file
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_file}.def ${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c
|
||||
|
@ -168,7 +168,7 @@ function(spec2def _dllname _spec_file)
|
|||
# NOTE: as stub file and def file are generated in one pass, depending on one is like depending on the other
|
||||
add_library(lib${_file} STATIC EXCLUDE_FROM_ALL
|
||||
${CMAKE_CURRENT_BINARY_DIR}/lib${_file}_stubs.asm)
|
||||
|
||||
|
||||
# set correct "link rule"
|
||||
set_target_properties(lib${_file} PROPERTIES LINKER_LANGUAGE "IMPLIB"
|
||||
STATIC_LIBRARY_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}\\lib${_file}_exp.def")
|
||||
|
@ -189,7 +189,7 @@ else()
|
|||
set(CMAKE_ASM16_COMPILER ml.exe)
|
||||
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(_temp_file ${_binary_file}.tmp)
|
||||
|
|
Loading…
Reference in a new issue