From 93dbd3207bcd8a85c0fcdf903fbaa4ec51cd6a98 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Mon, 13 Sep 2010 13:48:29 +0000 Subject: [PATCH] [CMAKE] - Add pci, pcixn pcmcia, videoprt and wmilib to build. svn path=/branches/cmake-bringup/; revision=48765 --- drivers/CMakeLists.txt | 1 + drivers/bus/CMakeLists.txt | 3 ++ drivers/bus/pci/CMakeLists.txt | 16 +++++++++ drivers/bus/pcix/CMakeLists.txt | 50 +++++++++++++++++++++++++++ drivers/bus/pcmcia/CMakeLists.txt | 16 +++++++++ drivers/video/CMakeLists.txt | 1 + drivers/video/videoprt/CMakeLists.txt | 37 ++++++++++++++++++++ drivers/video/videoprt/videoprt.spec | 6 ++-- drivers/wmi/CMakeLists.txt | 14 ++++++++ 9 files changed, 141 insertions(+), 3 deletions(-) create mode 100644 drivers/bus/pci/CMakeLists.txt create mode 100644 drivers/bus/pcix/CMakeLists.txt create mode 100644 drivers/bus/pcmcia/CMakeLists.txt create mode 100644 drivers/video/videoprt/CMakeLists.txt create mode 100644 drivers/wmi/CMakeLists.txt diff --git a/drivers/CMakeLists.txt b/drivers/CMakeLists.txt index b407a6346ca..933325b0277 100644 --- a/drivers/CMakeLists.txt +++ b/drivers/CMakeLists.txt @@ -7,3 +7,4 @@ add_subdirectory(input) add_subdirectory(setup) add_subdirectory(storage) add_subdirectory(video) +add_subdirectory(wmi) diff --git a/drivers/bus/CMakeLists.txt b/drivers/bus/CMakeLists.txt index 555335670b5..3393412e081 100644 --- a/drivers/bus/CMakeLists.txt +++ b/drivers/bus/CMakeLists.txt @@ -1,3 +1,6 @@ add_subdirectory(acpi) add_subdirectory(isapnp) +add_subdirectory(pci) +add_subdirectory(pcix) +add_subdirectory(pcmcia) diff --git a/drivers/bus/pci/CMakeLists.txt b/drivers/bus/pci/CMakeLists.txt new file mode 100644 index 00000000000..3ee739f6c31 --- /dev/null +++ b/drivers/bus/pci/CMakeLists.txt @@ -0,0 +1,16 @@ + +set(CMAKE_C_CREATE_SHARED_LIBRARY " -o ") + +add_library(pci SHARED + fdo.c + pci.c + pdo.c + pci.rc) + +set_target_properties(pci PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--subsystem,native" SUFFIX ".sys") + +target_link_libraries(pci + ${REACTOS_SOURCE_DIR}/ntoskrnl/libntoskrnl.a + ${REACTOS_SOURCE_DIR}/hal/halx86/libhal.a) + +add_dependencies(pci psdk bugcodes buildno_header) diff --git a/drivers/bus/pcix/CMakeLists.txt b/drivers/bus/pcix/CMakeLists.txt new file mode 100644 index 00000000000..02cc41fe16b --- /dev/null +++ b/drivers/bus/pcix/CMakeLists.txt @@ -0,0 +1,50 @@ + +set(CMAKE_C_CREATE_SHARED_LIBRARY " -o ") + +list(APPEND SOURCE + arb/ar_busno.c + arb/ar_memio.c + arb/arb_comn.c + arb/tr_irq.c + intrface/agpintrf.c + intrface/busintrf.c + intrface/cardbus.c + intrface/devhere.c + intrface/ideintrf.c + intrface/intrface.c + intrface/lddintrf.c + intrface/locintrf.c + intrface/pmeintf.c + intrface/routintf.c + pci/busno.c + pci/config.c + pci/devhere.c + pci/id.c + pci/ppbridge.c + pci/romimage.c + pci/state.c + debug.c + device.c + dispatch.c + enum.c + fdo.c + guid.c + hookhal.c + init.c + pcivrify.c + pdo.c + power.c + usage.c + utils.c + pci.rc) + +add_library(pcix SHARED ${CMAKE_CURRENT_BINARY_DIR}/pcix_pci.h.gch ${SOURCE}) + +set_target_properties(pcix PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--subsystem,native" SUFFIX ".sys") + +target_link_libraries(pcix + ${REACTOS_SOURCE_DIR}/ntoskrnl/libntoskrnl.a + ${REACTOS_SOURCE_DIR}/hal/halx86/libhal.a) + +add_pch(pcix ${CMAKE_CURRENT_SOURCE_DIR}/pci.h ${SOURCE}) +add_dependencies(pcix pcix_def psdk pciclass) diff --git a/drivers/bus/pcmcia/CMakeLists.txt b/drivers/bus/pcmcia/CMakeLists.txt new file mode 100644 index 00000000000..5470e8c98b8 --- /dev/null +++ b/drivers/bus/pcmcia/CMakeLists.txt @@ -0,0 +1,16 @@ + +set(CMAKE_C_CREATE_SHARED_LIBRARY " -o ") + +add_library(pcmcia SHARED + fdo.c + pcmcia.c + pdo.c + pcmcia.rc) + +set_target_properties(pcmcia PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--subsystem,native" SUFFIX ".sys") + +target_link_libraries(pcmcia + ${REACTOS_SOURCE_DIR}/ntoskrnl/libntoskrnl.a + ${REACTOS_SOURCE_DIR}/hal/halx86/libhal.a) + +add_dependencies(pcmcia psdk bugcodes buildno_header) diff --git a/drivers/video/CMakeLists.txt b/drivers/video/CMakeLists.txt index 05adbc3b9bb..dc5370a33ed 100644 --- a/drivers/video/CMakeLists.txt +++ b/drivers/video/CMakeLists.txt @@ -1,2 +1,3 @@ add_subdirectory(font) +add_subdirectory(videoprt) diff --git a/drivers/video/videoprt/CMakeLists.txt b/drivers/video/videoprt/CMakeLists.txt new file mode 100644 index 00000000000..653cd86ea55 --- /dev/null +++ b/drivers/video/videoprt/CMakeLists.txt @@ -0,0 +1,37 @@ + +set(CMAKE_C_CREATE_SHARED_LIBRARY " -o ") + +include_directories(${REACTOS_SOURCE_DIR}/ntoskrnl/include) + +add_definitions(-D_VIDEOPORT_) + +spec2def(videoprt ${CMAKE_CURRENT_SOURCE_DIR}/videoprt.spec ${CMAKE_CURRENT_BINARY_DIR}/videoprt.def) + +list(APPEND SOURCE + agp.c + ddc.c + dispatch.c + dma.c + event.c + funclist.c + int10.c + interrupt.c + resource.c + services.c + spinlock.c + stubs.c + timer.c + videoprt.c + videoprt.rc) + +add_library(videoprt SHARED ${CMAKE_CURRENT_BINARY_DIR}/videoprt_videoprt.h.gch ${SOURCE}) + +set_target_properties(videoprt PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--subsystem,native" SUFFIX ".sys") + +target_link_libraries(videoprt + ${CMAKE_CURRENT_BINARY_DIR}/videoprt.def + ${REACTOS_SOURCE_DIR}/ntoskrnl/libntoskrnl.a + ${REACTOS_SOURCE_DIR}/hal/halx86/libhal.a) + +add_pch(videoprt ${CMAKE_CURRENT_SOURCE_DIR}/videoprt.h ${SOURCE}) +add_dependencies(videoprt videoprt_def psdk bugcodes buildno_header) diff --git a/drivers/video/videoprt/videoprt.spec b/drivers/video/videoprt/videoprt.spec index 9d5147636fe..a9c632b4675 100644 --- a/drivers/video/videoprt/videoprt.spec +++ b/drivers/video/videoprt/videoprt.spec @@ -44,9 +44,9 @@ @ stdcall VideoPortGetVgaStatus(ptr ptr) @ stdcall VideoPortInitialize(ptr ptr ptr ptr) @ stdcall VideoPortInt10(ptr ptr) -@ fastcall VideoPortInterlockedDecrement(ptr) NTOSKRNL.InterlockedDecrement -@ fastcall VideoPortInterlockedExchange(ptr long) NTOSKRNL.InterlockedExchange -@ fastcall VideoPortInterlockedIncrement(ptr) NTOSKRNL.InterlockedIncrement +@ stdcall -norelay VideoPortInterlockedDecrement(ptr) NTOSKRNL.InterlockedDecrement +@ stdcall -norelay VideoPortInterlockedExchange(ptr long) NTOSKRNL.InterlockedExchange +@ stdcall -norelay VideoPortInterlockedIncrement(ptr) NTOSKRNL.InterlockedIncrement @ stdcall VideoPortIsNoVesa() @ stdcall VideoPortLockBuffer(ptr ptr long long) @ stdcall VideoPortLockPages(ptr ptr ptr ptr long) diff --git a/drivers/wmi/CMakeLists.txt b/drivers/wmi/CMakeLists.txt new file mode 100644 index 00000000000..314bb037255 --- /dev/null +++ b/drivers/wmi/CMakeLists.txt @@ -0,0 +1,14 @@ + +set(CMAKE_C_CREATE_SHARED_LIBRARY " -o ") + +spec2def(wmilib ${CMAKE_CURRENT_SOURCE_DIR}/wmilib.spec ${CMAKE_CURRENT_BINARY_DIR}/wmilib.def) + +add_library(wmilib SHARED wmilib.c wmilib.rc) + +set_target_properties(wmilib PROPERTIES LINK_FLAGS "-Wl,-entry,0 -Wl,--image-base,0x00010000 -Wl,--subsystem,native" SUFFIX ".sys") + +target_link_libraries(wmilib + ${CMAKE_CURRENT_BINARY_DIR}/wmilib.def + ${REACTOS_SOURCE_DIR}/ntoskrnl/libntoskrnl.a) + +add_dependencies(wmilib wmilib_def psdk buildno_header bugcodes)