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