Author: akhaldi
Date: Tue Aug 31 18:40:19 2010
New Revision: 48669
URL:
http://svn.reactos.org/svn/reactos?rev=48669&view=rev
Log:
[CMAKE]
- Add boot sectors to build.
Added:
branches/cmake-bringup/boot/CMakeLists.txt (with props)
Modified:
branches/cmake-bringup/CMakeLists.txt
branches/cmake-bringup/CMakeMacros.cmake
Modified: branches/cmake-bringup/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/CMakeLists.txt?re…
==============================================================================
--- branches/cmake-bringup/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/CMakeLists.txt [iso-8859-1] Tue Aug 31 18:40:19 2010
@@ -102,6 +102,7 @@
add_subdirectory(include/reactos/mc)
add_subdirectory(base)
+add_subdirectory(boot)
add_subdirectory(dll)
add_subdirectory(drivers)
add_subdirectory(hal)
Modified: branches/cmake-bringup/CMakeMacros.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/CMakeMacros.cmake…
==============================================================================
--- branches/cmake-bringup/CMakeMacros.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/CMakeMacros.cmake [iso-8859-1] Tue Aug 31 18:40:19 2010
@@ -51,3 +51,27 @@
add_custom_target(${_target_name}_def ALL DEPENDS ${_def_file})
ENDMACRO(spec2def _target_name _spec_file _def_file)
+
+MACRO(CreateBootSectorTarget _target_name _asm_file _object_file)
+
+ get_filename_component(OBJECT_PATH ${_object_file} PATH)
+ 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(arg ${defines})
+
+ foreach(arg ${includes})
+ set(result_incs -I${arg} ${result_incs})
+ endforeach(arg ${includes})
+
+ add_custom_command(
+ OUTPUT ${_object_file}
+ COMMAND nasm -o ${_object_file} ${result_incs} ${result_defs} -f bin
${_asm_file}
+ DEPENDS native-winebuild)
+ set_source_files_properties(${_object_file} PROPERTIES GENERATED TRUE)
+ add_custom_target(${_target_name} ALL DEPENDS ${_object_file})
+
+ENDMACRO(CreateBootSectorTarget _target_name _asm_file _object_file)
Added: branches/cmake-bringup/boot/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/boot/CMakeLists.t…
==============================================================================
--- branches/cmake-bringup/boot/CMakeLists.txt (added)
+++ branches/cmake-bringup/boot/CMakeLists.txt [iso-8859-1] Tue Aug 31 18:40:19 2010
@@ -1,0 +1,7 @@
+
+CreateBootSectorTarget(dosmbr ${CMAKE_CURRENT_SOURCE_DIR}/freeldr/bootsect/dosmbr.asm
${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/dosmbr.bin)
+CreateBootSectorTarget(ext2 ${CMAKE_CURRENT_SOURCE_DIR}/freeldr/bootsect/ext2.asm
${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/ext2.bin)
+CreateBootSectorTarget(fat32 ${CMAKE_CURRENT_SOURCE_DIR}/freeldr/bootsect/fat32.asm
${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/fat32.bin)
+CreateBootSectorTarget(fat ${CMAKE_CURRENT_SOURCE_DIR}/freeldr/bootsect/fat.asm
${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/fat.bin)
+CreateBootSectorTarget(isoboot ${CMAKE_CURRENT_SOURCE_DIR}/freeldr/bootsect/isoboot.asm
${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/isoboot.bin)
+CreateBootSectorTarget(isobtrt ${CMAKE_CURRENT_SOURCE_DIR}/freeldr/bootsect/isobtrt.asm
${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/isobtrt.bin)
Propchange: branches/cmake-bringup/boot/CMakeLists.txt
------------------------------------------------------------------------------
svn:eol-style = native