8 ${REACTOS_SOURCE_DIR}/ntoskrnl/include)
10 function(add_hal _halname)
11 cmake_parse_arguments(_haldata "" "" "SOURCES;COMPONENTS" ${ARGN})
13 # Handle the spec file for the dll name
14 spec2def(${_halname}.dll ../hal.spec ADD_IMPORTLIB)
16 # Create the actual target
18 foreach(_component ${_haldata_COMPONENTS})
19 list(APPEND _haldata_SOURCES "$<TARGET_OBJECTS:lib_hal_${_component}>")
21 add_library(${_halname} SHARED
23 ${CMAKE_CURRENT_BINARY_DIR}/hal.def)
25 foreach(_component ${_haldata_COMPONENTS})
26 list(APPEND _haldata_LIBS "lib_hal_${_component}")
28 add_library(${_halname} SHARED
30 ${CMAKE_CURRENT_BINARY_DIR}/hal.def)
31 target_link_libraries(${_halname} ${_haldata_LIBS})
34 target_link_libraries(${_halname} libcntpr)
35 add_importlibs(${_halname} ntoskrnl)
36 #add_pch(${_halname} include/hal.h)
37 add_dependencies(${_halname} psdk bugcodes asm)
38 set_entrypoint(${_halname} HalInitSystem 8)
39 set_subsystem(${_halname} native)
40 set_image_base(${_halname} 0x00010000)
41 add_cd_file(TARGET ${_halname} DESTINATION reactos/system32 NO_CAB FOR all)
43 add_target_link_flags(${_halname} "/ignore:4216 /ignore:4078")
45 target_link_libraries(${_halname} -lgcc)
50 include(generic.cmake)
54 if(ARCH STREQUAL "i386")
55 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)
67 #add_hal(halmps SOURCES up/halup.rc COMPONENTS generic legacy smp pic)
68 #add_hal(halmacpi SOURCES acpi/halacpi.rc COMPONENTS generic acpi smp pic)
69 #add_hal(halmapic SOURCES acpi/halacpi.rc COMPONENTS generic legacy smp apic)
70 #add_hal(halmaacpi SOURCES acpi/halacpi.rc COMPONENTS generic acpi smp apic)
72 elseif(ARCH STREQUAL "amd64")
74 list(APPEND HAL_SOURCE
80 add_hal(hal SOURCES ${HAL_SOURCE} COMPONENTS generic acpi apic)