8 ${REACTOS_SOURCE_DIR}/ntoskrnl/include
9 ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/fast486)
11 function(add_hal _halname)
12 cmake_parse_arguments(_haldata "" "" "SOURCES;COMPONENTS" ${ARGN})
14 # Handle the spec file for the dll name
15 spec2def(${_halname}.dll ../hal.spec ADD_IMPORTLIB)
17 # Create the actual target
19 foreach(_component ${_haldata_COMPONENTS})
20 list(APPEND _haldata_SOURCES "$<TARGET_OBJECTS:lib_hal_${_component}>")
22 add_library(${_halname} MODULE
24 ${CMAKE_CURRENT_BINARY_DIR}/hal.def)
26 foreach(_component ${_haldata_COMPONENTS})
27 list(APPEND _haldata_LIBS "lib_hal_${_component}")
29 add_library(${_halname} MODULE
31 ${CMAKE_CURRENT_BINARY_DIR}/hal.def)
32 target_link_libraries(${_halname} ${_haldata_LIBS})
35 target_link_libraries(${_halname} libcntpr)
36 add_importlibs(${_halname} ntoskrnl)
37 #add_pch(${_halname} include/hal.h)
38 add_dependencies(${_halname} psdk asm)
39 set_module_type(${_halname} kerneldll ENTRYPOINT HalInitSystem 8)
40 add_cd_file(TARGET ${_halname} DESTINATION reactos/system32 NO_CAB FOR all)
42 add_target_link_flags(${_halname} "/ignore:4216 /ignore:4078")
44 target_link_libraries(${_halname} -lgcc)
49 include(generic.cmake)
53 if(ARCH STREQUAL "i386")
54 include(pcidata.cmake)
59 add_subdirectory(minihal)
62 add_hal(hal SOURCES up/halup.rc COMPONENTS generic legacy up pic)
63 add_hal(halacpi SOURCES acpi/halacpi.rc COMPONENTS generic acpi up pic)
64 add_hal(halapic SOURCES acpi/halacpi.rc COMPONENTS generic legacy up apic)
65 add_hal(halaacpi SOURCES acpi/halacpi.rc COMPONENTS generic acpi up apic)
66 add_hal(halxbox SOURCES xbox/halxbox.rc COMPONENTS generic up xbox)
68 #add_hal(halmps SOURCES up/halup.rc COMPONENTS generic legacy smp pic)
69 #add_hal(halmacpi SOURCES acpi/halacpi.rc COMPONENTS generic acpi smp pic)
70 #add_hal(halmapic SOURCES acpi/halacpi.rc COMPONENTS generic legacy smp apic)
71 #add_hal(halmaacpi SOURCES acpi/halacpi.rc COMPONENTS generic acpi smp apic)
73 elseif(ARCH STREQUAL "amd64")
75 list(APPEND HAL_SOURCE
81 add_hal(hal SOURCES ${HAL_SOURCE} COMPONENTS generic acpi apic)
82 target_link_libraries(hal fast486)