[CMAKE]
[reactos.git] / hal / halx86 / CMakeLists.txt
1
2 add_definitions(
3 -D_NTHALDLL_
4 -D_NTHAL_)
5
6 include_directories(
7 include
8 ${REACTOS_SOURCE_DIR}/ntoskrnl/include)
9
10 list(APPEND HAL_GENERIC_SOURCE
11 generic/beep.c
12 generic/cmos.c
13 generic/display.c
14 generic/dma.c
15 generic/drive.c
16 generic/memory.c
17 generic/misc.c
18 generic/profil.c
19 generic/reboot.c
20 generic/sysinfo.c
21 generic/timer.c
22 generic/usage.c)
23
24 if(ARCH MATCHES i386)
25 list(APPEND HAL_GENERIC_SOURCE
26 generic/bios.c
27 generic/halinit.c
28 generic/i386/portio.c
29 generic/i386/systimer.S
30 generic/i386/trap.S)
31 endif()
32
33 list(APPEND HAL_GENERIC_PCAT_SOURCE
34 generic/legacy/bus/bushndlr.c
35 generic/legacy/bus/cmosbus.c
36 generic/legacy/bus/isabus.c
37 generic/legacy/bus/pcibus.c
38 generic/legacy/bus/pcidata.c
39 generic/legacy/bus/sysbus.c
40 generic/legacy/bussupp.c
41 generic/legacy/halpcat.c)
42
43 list(APPEND HAL_GENERIC_ACPI_SOURCE
44 generic/acpi/halacpi.c
45 generic/acpi/halpnpdd.c
46 generic/acpi/busemul.c
47 generic/legacy/bus/pcibus.c)
48
49 if(ARCH MATCHES i386)
50
51 list(APPEND HAL_GENERIC_UP_SOURCE
52 generic/spinlock.c
53 up/pic.c
54 up/processor.c)
55
56 list(APPEND MINI_HAL_SOURCE
57 generic/i386/portio.c
58 generic/i386/systimer.S
59 generic/legacy/bus/bushndlr.c
60 generic/legacy/bus/cmosbus.c
61 generic/legacy/bus/isabus.c
62 generic/legacy/bus/pcibus.c
63 generic/legacy/bus/sysbus.c
64 generic/legacy/bussupp.c
65 generic/beep.c
66 generic/bios.c
67 generic/cmos.c
68 generic/dma.c
69 generic/display.c
70 generic/drive.c
71 generic/misc.c
72 generic/profil.c
73 generic/reboot.c
74 generic/spinlock.c
75 generic/sysinfo.c
76 generic/timer.c
77 generic/usage.c
78 up/halinit_up.c
79 up/pic.c
80 up/processor.c)
81
82 spec2def(hal.dll ../hal.spec)
83
84 list(APPEND HAL_SOURCE
85 ${CMAKE_CURRENT_BINARY_DIR}/hal_hal.h.gch
86 ${HAL_GENERIC_SOURCE}
87 ${HAL_GENERIC_PCAT_SOURCE}
88 ${HAL_GENERIC_UP_SOURCE}
89 up/halinit_up.c
90 up/halup.rc
91 ${CMAKE_CURRENT_BINARY_DIR}/hal.def)
92
93 # hal
94 add_library(hal SHARED ${HAL_SOURCE})
95 add_pch(hal ${CMAKE_CURRENT_SOURCE_DIR}/include/hal.h ${HAL_SOURCE})
96 add_dependencies(hal psdk bugcodes)
97
98 set_entrypoint(hal HalInitSystem@8)
99 set_subsystem(hal native)
100 set_image_base(hal 0x00010000)
101 add_importlibs(hal ntoskrnl)
102 target_link_libraries(hal libcntpr)
103
104 add_cd_file(TARGET hal DESTINATION reactos/system32 NO_CAB FOR all)
105
106 # mini_hal
107 add_library(mini_hal ${MINI_HAL_SOURCE})
108 set_property(TARGET mini_hal PROPERTY COMPILE_DEFINITIONS "_BLDR_;_MINIHAL_")
109 add_dependencies(mini_hal psdk bugcodes asm)
110
111 elseif(ARCH MATCHES amd64)
112 #TBD
113 endif()
114
115 add_importlib_target(../hal.spec)