mirror of
https://github.com/reactos/reactos.git
synced 2025-01-10 08:10:18 +00:00
[CMAKE]
- Restructure hal build. svn path=/branches/cmake-bringup/; revision=50305
This commit is contained in:
parent
0d77e58cf9
commit
24511aea48
2 changed files with 123 additions and 109 deletions
|
@ -1,110 +1,8 @@
|
|||
|
||||
spec2def(hal.dll hal.spec)
|
||||
|
||||
if(ARCH MATCHES i386)
|
||||
|
||||
add_definitions(
|
||||
-D_NTHALDLL_
|
||||
-D_NTHAL_)
|
||||
|
||||
include_directories(
|
||||
halx86/include
|
||||
${REACTOS_SOURCE_DIR}/ntoskrnl/include)
|
||||
|
||||
list(APPEND HAL_GENERIC_SOURCE
|
||||
halx86/generic/beep.c
|
||||
halx86/generic/cmos.c
|
||||
halx86/generic/display.c
|
||||
halx86/generic/dma.c
|
||||
halx86/generic/drive.c
|
||||
halx86/generic/memory.c
|
||||
halx86/generic/misc.c
|
||||
halx86/generic/profil.c
|
||||
halx86/generic/reboot.c
|
||||
halx86/generic/sysinfo.c
|
||||
halx86/generic/timer.c
|
||||
halx86/generic/usage.c)
|
||||
|
||||
list(APPEND HAL_GENERIC_SOURCE
|
||||
halx86/generic/bios.c
|
||||
halx86/generic/halinit.c
|
||||
halx86/generic/i386/portio.c
|
||||
halx86/generic/i386/systimer.S
|
||||
halx86/generic/i386/trap.S)
|
||||
|
||||
list(APPEND HAL_GENERIC_PCAT_SOURCE
|
||||
halx86/generic/legacy/bus/bushndlr.c
|
||||
halx86/generic/legacy/bus/cmosbus.c
|
||||
halx86/generic/legacy/bus/isabus.c
|
||||
halx86/generic/legacy/bus/pcibus.c
|
||||
halx86/generic/legacy/bus/pcidata.c
|
||||
halx86/generic/legacy/bus/sysbus.c
|
||||
halx86/generic/legacy/bussupp.c
|
||||
halx86/generic/legacy/halpcat.c)
|
||||
|
||||
list(APPEND HAL_GENERIC_UP_SOURCE
|
||||
halx86/generic/spinlock.c
|
||||
halx86/up/pic.c
|
||||
halx86/up/processor.c)
|
||||
|
||||
list(APPEND HAL_SOURCE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hal_hal.h.gch
|
||||
${HAL_GENERIC_SOURCE}
|
||||
${HAL_GENERIC_PCAT_SOURCE}
|
||||
${HAL_GENERIC_UP_SOURCE}
|
||||
halx86/up/halinit_up.c
|
||||
halx86/up/halup.rc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hal.def)
|
||||
|
||||
add_library(hal SHARED ${HAL_SOURCE})
|
||||
add_pch(hal ${CMAKE_CURRENT_SOURCE_DIR}/halx86/include/hal.h ${HAL_SOURCE})
|
||||
add_dependencies(hal psdk bugcodes)
|
||||
|
||||
set_entrypoint(hal HalInitSystem@8)
|
||||
set_subsystem(hal native)
|
||||
set_image_base(hal 0x00010000)
|
||||
|
||||
add_importlibs(hal ntoskrnl)
|
||||
|
||||
target_link_libraries(hal libcntpr)
|
||||
|
||||
list(APPEND MINI_HAL_SOURCE
|
||||
halx86/generic/legacy/bus/bushndlr.c
|
||||
halx86/generic/legacy/bus/cmosbus.c
|
||||
halx86/generic/legacy/bus/isabus.c
|
||||
halx86/generic/legacy/bus/pcibus.c
|
||||
halx86/generic/legacy/bus/sysbus.c
|
||||
halx86/generic/legacy/bussupp.c
|
||||
halx86/generic/beep.c
|
||||
halx86/generic/bios.c
|
||||
halx86/generic/cmos.c
|
||||
halx86/generic/dma.c
|
||||
halx86/generic/display.c
|
||||
halx86/generic/drive.c
|
||||
halx86/generic/misc.c
|
||||
halx86/generic/profil.c
|
||||
halx86/generic/reboot.c
|
||||
halx86/generic/spinlock.c
|
||||
halx86/generic/sysinfo.c
|
||||
halx86/generic/timer.c
|
||||
halx86/generic/usage.c
|
||||
halx86/up/halinit_up.c
|
||||
halx86/up/pic.c
|
||||
halx86/up/processor.c)
|
||||
|
||||
if(ARCH MATCHES i386)
|
||||
list(APPEND MINI_HAL_SOURCE
|
||||
halx86/generic/i386/portio.c
|
||||
halx86/generic/i386/systimer.S)
|
||||
endif(ARCH MATCHES i386)
|
||||
|
||||
add_library(mini_hal ${MINI_HAL_SOURCE})
|
||||
set_property(TARGET mini_hal PROPERTY COMPILE_DEFINITIONS "_BLDR_;_MINIHAL_")
|
||||
add_dependencies(mini_hal psdk bugcodes asm)
|
||||
add_minicd_target(hal reactos hal.dll)
|
||||
add_livecd_target(hal reactos/system32)
|
||||
else()
|
||||
#TBD
|
||||
endif(ARCH MATCHES i386)
|
||||
|
||||
add_importlib_target(hal.spec)
|
||||
if(ARCH MATCHES i386 OR ARCH MATCHES amd64)
|
||||
add_subdirectory(halx86)
|
||||
elseif(ARCH MATCHES arm)
|
||||
# add_subdirectory(halarm)
|
||||
elseif(ARCH MATCHES powerpc)
|
||||
# add_subdirectory(halppc)
|
||||
endif()
|
||||
|
|
116
hal/halx86/CMakeLists.txt
Normal file
116
hal/halx86/CMakeLists.txt
Normal file
|
@ -0,0 +1,116 @@
|
|||
|
||||
add_definitions(
|
||||
-D_NTHALDLL_
|
||||
-D_NTHAL_)
|
||||
|
||||
include_directories(
|
||||
include
|
||||
${REACTOS_SOURCE_DIR}/ntoskrnl/include)
|
||||
|
||||
list(APPEND HAL_GENERIC_SOURCE
|
||||
generic/beep.c
|
||||
generic/cmos.c
|
||||
generic/display.c
|
||||
generic/dma.c
|
||||
generic/drive.c
|
||||
generic/memory.c
|
||||
generic/misc.c
|
||||
generic/profil.c
|
||||
generic/reboot.c
|
||||
generic/sysinfo.c
|
||||
generic/timer.c
|
||||
generic/usage.c)
|
||||
|
||||
if(ARCH MATCHES i386)
|
||||
list(APPEND HAL_GENERIC_SOURCE
|
||||
generic/bios.c
|
||||
generic/halinit.c
|
||||
generic/i386/portio.c
|
||||
generic/i386/systimer.S
|
||||
generic/i386/trap.S)
|
||||
endif()
|
||||
|
||||
list(APPEND HAL_GENERIC_PCAT_SOURCE
|
||||
generic/legacy/bus/bushndlr.c
|
||||
generic/legacy/bus/cmosbus.c
|
||||
generic/legacy/bus/isabus.c
|
||||
generic/legacy/bus/pcibus.c
|
||||
generic/legacy/bus/pcidata.c
|
||||
generic/legacy/bus/sysbus.c
|
||||
generic/legacy/bussupp.c
|
||||
generic/legacy/halpcat.c)
|
||||
|
||||
list(APPEND HAL_GENERIC_ACPI_SOURCE
|
||||
generic/acpi/halacpi.c
|
||||
generic/acpi/halpnpdd.c
|
||||
generic/acpi/busemul.c
|
||||
generic/legacy/bus/pcibus.c)
|
||||
|
||||
if(ARCH MATCHES i386)
|
||||
|
||||
list(APPEND HAL_GENERIC_UP_SOURCE
|
||||
generic/spinlock.c
|
||||
up/pic.c
|
||||
up/processor.c)
|
||||
|
||||
list(APPEND MINI_HAL_SOURCE
|
||||
generic/i386/portio.c
|
||||
generic/i386/systimer.S
|
||||
generic/legacy/bus/bushndlr.c
|
||||
generic/legacy/bus/cmosbus.c
|
||||
generic/legacy/bus/isabus.c
|
||||
generic/legacy/bus/pcibus.c
|
||||
generic/legacy/bus/sysbus.c
|
||||
generic/legacy/bussupp.c
|
||||
generic/beep.c
|
||||
generic/bios.c
|
||||
generic/cmos.c
|
||||
generic/dma.c
|
||||
generic/display.c
|
||||
generic/drive.c
|
||||
generic/misc.c
|
||||
generic/profil.c
|
||||
generic/reboot.c
|
||||
generic/spinlock.c
|
||||
generic/sysinfo.c
|
||||
generic/timer.c
|
||||
generic/usage.c
|
||||
up/halinit_up.c
|
||||
up/pic.c
|
||||
up/processor.c)
|
||||
|
||||
spec2def(hal.dll ../hal.spec)
|
||||
|
||||
list(APPEND HAL_SOURCE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hal_hal.h.gch
|
||||
${HAL_GENERIC_SOURCE}
|
||||
${HAL_GENERIC_PCAT_SOURCE}
|
||||
${HAL_GENERIC_UP_SOURCE}
|
||||
up/halinit_up.c
|
||||
up/halup.rc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hal.def)
|
||||
|
||||
# hal
|
||||
add_library(hal SHARED ${HAL_SOURCE})
|
||||
add_pch(hal ${CMAKE_CURRENT_SOURCE_DIR}/include/hal.h ${HAL_SOURCE})
|
||||
add_dependencies(hal psdk bugcodes)
|
||||
|
||||
set_entrypoint(hal HalInitSystem@8)
|
||||
set_subsystem(hal native)
|
||||
set_image_base(hal 0x00010000)
|
||||
add_importlibs(hal ntoskrnl)
|
||||
target_link_libraries(hal libcntpr)
|
||||
|
||||
add_minicd_target(hal reactos hal.dll)
|
||||
add_livecd_target(hal reactos/system32)
|
||||
|
||||
# mini_hal
|
||||
add_library(mini_hal ${MINI_HAL_SOURCE})
|
||||
set_property(TARGET mini_hal PROPERTY COMPILE_DEFINITIONS "_BLDR_;_MINIHAL_")
|
||||
add_dependencies(mini_hal psdk bugcodes asm)
|
||||
|
||||
elseif(ARCH MATCHES amd64)
|
||||
#TBD
|
||||
endif()
|
||||
|
||||
add_importlib_target(../hal.spec)
|
Loading…
Reference in a new issue