[HAL] Implement amd64 BIOS call support
[reactos.git] / hal / halx86 / CMakeLists.txt
index 1f82194..f4148eb 100644 (file)
@@ -5,7 +5,8 @@ add_definitions(
 
 include_directories(
     include
-    ${REACTOS_SOURCE_DIR}/ntoskrnl/include)
+    ${REACTOS_SOURCE_DIR}/ntoskrnl/include
+    ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/fast486)
 
 function(add_hal _halname)
     cmake_parse_arguments(_haldata "" "" "SOURCES;COMPONENTS" ${ARGN})
@@ -18,14 +19,14 @@ function(add_hal _halname)
         foreach(_component ${_haldata_COMPONENTS})
             list(APPEND _haldata_SOURCES "$<TARGET_OBJECTS:lib_hal_${_component}>")
         endforeach()
-        add_library(${_halname} SHARED
+        add_library(${_halname} MODULE
             ${_haldata_SOURCES}
             ${CMAKE_CURRENT_BINARY_DIR}/hal.def)
     else()
         foreach(_component ${_haldata_COMPONENTS})
             list(APPEND _haldata_LIBS "lib_hal_${_component}")
         endforeach()
-        add_library(${_halname} SHARED
+        add_library(${_halname} MODULE
             ${_haldata_SOURCES}
             ${CMAKE_CURRENT_BINARY_DIR}/hal.def)
         target_link_libraries(${_halname} ${_haldata_LIBS})
@@ -34,10 +35,8 @@ function(add_hal _halname)
     target_link_libraries(${_halname} libcntpr)
     add_importlibs(${_halname} ntoskrnl)
     #add_pch(${_halname} include/hal.h)
-    add_dependencies(${_halname} psdk bugcodes asm)
-    set_entrypoint(${_halname} HalInitSystem 8)
-    set_subsystem(${_halname} native)
-    set_image_base(${_halname} 0x00010000)
+    add_dependencies(${_halname} psdk asm)
+    set_module_type(${_halname} kerneldll ENTRYPOINT HalInitSystem 8)
     add_cd_file(TARGET ${_halname} DESTINATION reactos/system32 NO_CAB FOR all)
     if(MSVC)
         add_target_link_flags(${_halname} "/ignore:4216 /ignore:4078")
@@ -56,7 +55,7 @@ if(ARCH STREQUAL "i386")
     include(legacy.cmake)
     include(up.cmake)
     include(pic.cmake)
-    include(minihal.cmake)
+    add_subdirectory(minihal)
 
     # hal
     add_hal(hal SOURCES up/halup.rc COMPONENTS generic legacy up pic)
@@ -78,5 +77,6 @@ elseif(ARCH STREQUAL "amd64")
         amd64/processor.c)
 
     add_hal(hal SOURCES ${HAL_SOURCE} COMPONENTS generic acpi apic)
+    target_link_libraries(hal fast486)
 
 endif()