[HAL]
[reactos.git] / reactos / 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/halpnpdd.c
42 generic/legacy/halpcat.c)
43
44 list(APPEND HAL_GENERIC_ACPI_SOURCE
45 generic/acpi/halacpi.c
46 generic/acpi/halpnpdd.c
47 generic/acpi/busemul.c
48 generic/legacy/bus/pcibus.c)
49
50 if(ARCH MATCHES i386)
51 list(APPEND HAL_GENERIC_ACPI_SOURCE
52 generic/halinit.c)
53
54 list(APPEND HAL_GENERIC_UP_SOURCE
55 generic/spinlock.c
56 up/pic.c
57 up/processor.c)
58
59 list(APPEND MINI_HAL_SOURCE
60 generic/i386/portio.c
61 generic/i386/systimer.S
62 generic/legacy/bus/bushndlr.c
63 generic/legacy/bus/cmosbus.c
64 generic/legacy/bus/isabus.c
65 generic/legacy/bus/pcibus.c
66 generic/legacy/bus/sysbus.c
67 generic/legacy/bussupp.c
68 generic/beep.c
69 generic/bios.c
70 generic/cmos.c
71 generic/dma.c
72 generic/display.c
73 generic/drive.c
74 generic/misc.c
75 generic/profil.c
76 generic/reboot.c
77 generic/spinlock.c
78 generic/sysinfo.c
79 generic/timer.c
80 generic/usage.c
81 up/halinit_up.c
82 up/pic.c
83 up/processor.c)
84
85 spec2def(hal.dll ../hal.spec)
86
87 list(APPEND HAL_SOURCE
88 ${HAL_GENERIC_SOURCE}
89 ${HAL_GENERIC_PCAT_SOURCE}
90 ${HAL_GENERIC_UP_SOURCE}
91 up/halinit_up.c
92 up/halup.rc
93 ${CMAKE_CURRENT_BINARY_DIR}/hal.def)
94
95 # hal
96 add_library(hal SHARED ${HAL_SOURCE})
97 add_pch(hal include/hal.h)
98 add_dependencies(hal psdk bugcodes)
99
100 set_entrypoint(hal HalInitSystem 8)
101 set_subsystem(hal native)
102 set_image_base(hal 0x00010000)
103 add_importlibs(hal ntoskrnl)
104 target_link_libraries(hal libcntpr)
105
106 add_cd_file(TARGET hal DESTINATION reactos/system32 NO_CAB FOR all)
107
108 # hal acpi
109 spec2def(halacpi.dll ../hal.spec halacpi)
110 add_library(halacpi SHARED
111 ${HAL_GENERIC_SOURCE}
112 ${HAL_GENERIC_ACPI_SOURCE}
113 ${HAL_GENERIC_UP_SOURCE}
114 up/halinit_up.c
115 up/halup.rc
116 ${CMAKE_CURRENT_BINARY_DIR}/halacpi.def)
117 add_dependencies(halacpi psdk bugcodes)
118 set_entrypoint(halacpi HalInitSystem@8)
119 set_subsystem(halacpi native)
120 set_image_base(halacpi 0x00010000)
121 add_importlibs(halacpi ntoskrnl)
122 target_link_libraries(halacpi libcntpr)
123 set_property(TARGET halacpi PROPERTY COMPILE_DEFINITIONS CONFIG_ACPI)
124 add_cd_file(TARGET halacpi DESTINATION reactos/system32 NO_CAB FOR all)
125
126 # mini_hal
127 add_library(mini_hal ${MINI_HAL_SOURCE})
128 set_property(TARGET mini_hal PROPERTY COMPILE_DEFINITIONS "_BLDR_;_MINIHAL_")
129 add_dependencies(mini_hal psdk bugcodes asm)
130
131 elseif(ARCH MATCHES amd64)
132 #TBD
133 endif()
134
135 add_importlib_target(../hal.spec)