Author: akhaldi
Date: Mon Aug 15 15:36:25 2011
New Revision: 53264
URL:
http://svn.reactos.org/svn/reactos?rev=53264&view=rev
Log:
[HALACPI]
* Add to build. Dedicated to Cameron.
[SPEC2DEF]
* Add an option to set the name of the output def file.
Modified:
trunk/reactos/cmake/gcc.cmake
trunk/reactos/cmake/msvc.cmake
trunk/reactos/hal/halx86/CMakeLists.txt
Modified: trunk/reactos/cmake/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/gcc.cmake?rev=53264&…
==============================================================================
--- trunk/reactos/cmake/gcc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Mon Aug 15 15:36:25 2011
@@ -268,7 +268,13 @@
endfunction()
function(spec2def _dllname _spec_file)
- get_filename_component(_file ${_spec_file} NAME_WE)
+
+ if(${ARGC} GREATER 2)
+ set(_file ${ARGV2})
+ else()
+ get_filename_component(_file ${_spec_file} NAME_WE)
+ endif()
+
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_file}.def
${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c
COMMAND native-spec2def -n=${_dllname} --kill-at -a=${ARCH2}
-d=${CMAKE_CURRENT_BINARY_DIR}/${_file}.def
-s=${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}
Modified: trunk/reactos/cmake/msvc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=53264…
==============================================================================
--- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Mon Aug 15 15:36:25 2011
@@ -186,7 +186,11 @@
endmacro()
function(spec2def _dllname _spec_file)
- get_filename_component(_file ${_spec_file} NAME_WE)
+ if(${ARGC} GREATER 2)
+ set(_file ${ARGV2})
+ else()
+ get_filename_component(_file ${_spec_file} NAME_WE)
+ endif()
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_file}.def
${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c
COMMAND native-spec2def --ms --kill-at -a=${SPEC2DEF_ARCH} -n=${_dllname}
-d=${CMAKE_CURRENT_BINARY_DIR}/${_file}.def
-s=${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}
Modified: trunk/reactos/hal/halx86/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/CMakeLists.txt?…
==============================================================================
--- trunk/reactos/hal/halx86/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/CMakeLists.txt [iso-8859-1] Mon Aug 15 15:36:25 2011
@@ -47,6 +47,8 @@
generic/legacy/bus/pcibus.c)
if(ARCH MATCHES i386)
+ list(APPEND HAL_GENERIC_ACPI_SOURCE
+ generic/halinit.c)
list(APPEND HAL_GENERIC_UP_SOURCE
generic/spinlock.c
@@ -102,6 +104,24 @@
add_cd_file(TARGET hal DESTINATION reactos/system32 NO_CAB FOR all)
+ # hal acpi
+ spec2def(halacpi.dll ../hal.spec halacpi)
+ add_library(halacpi SHARED
+ ${HAL_GENERIC_SOURCE}
+ ${HAL_GENERIC_ACPI_SOURCE}
+ ${HAL_GENERIC_UP_SOURCE}
+ up/halinit_up.c
+ up/halup.rc
+ ${CMAKE_CURRENT_BINARY_DIR}/halacpi.def)
+ add_dependencies(halacpi psdk bugcodes)
+ set_entrypoint(halacpi HalInitSystem@8)
+ set_subsystem(halacpi native)
+ set_image_base(halacpi 0x00010000)
+ add_importlibs(halacpi ntoskrnl)
+ target_link_libraries(halacpi libcntpr)
+ set_property(TARGET halacpi PROPERTY COMPILE_DEFINITIONS CONFIG_ACPI)
+ add_cd_file(TARGET halacpi DESTINATION reactos/system32 NO_CAB FOR all)
+
# mini_hal
add_library(mini_hal ${MINI_HAL_SOURCE})
set_property(TARGET mini_hal PROPERTY COMPILE_DEFINITIONS
"_BLDR_;_MINIHAL_")