[CMAKE]
authorAmine Khaldi <amine.khaldi@reactos.org>
Mon, 13 Sep 2010 13:48:29 +0000 (13:48 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Mon, 13 Sep 2010 13:48:29 +0000 (13:48 +0000)
- Add pci, pcixn pcmcia, videoprt and wmilib to build.

svn path=/branches/cmake-bringup/; revision=48765

drivers/CMakeLists.txt
drivers/bus/CMakeLists.txt
drivers/bus/pci/CMakeLists.txt [new file with mode: 0644]
drivers/bus/pcix/CMakeLists.txt [new file with mode: 0644]
drivers/bus/pcmcia/CMakeLists.txt [new file with mode: 0644]
drivers/video/CMakeLists.txt
drivers/video/videoprt/CMakeLists.txt [new file with mode: 0644]
drivers/video/videoprt/videoprt.spec
drivers/wmi/CMakeLists.txt [new file with mode: 0644]

index b407a63..933325b 100644 (file)
@@ -7,3 +7,4 @@ add_subdirectory(input)
 add_subdirectory(setup)
 add_subdirectory(storage)
 add_subdirectory(video)
+add_subdirectory(wmi)
index 5553356..3393412 100644 (file)
@@ -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 (file)
index 0000000..3ee739f
--- /dev/null
@@ -0,0 +1,16 @@
+
+set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+
+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 (file)
index 0000000..02cc41f
--- /dev/null
@@ -0,0 +1,50 @@
+
+set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+
+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 (file)
index 0000000..5470e8c
--- /dev/null
@@ -0,0 +1,16 @@
+
+set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+
+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)
index 05adbc3..dc5370a 100644 (file)
@@ -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 (file)
index 0000000..653cd86
--- /dev/null
@@ -0,0 +1,37 @@
+
+set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+
+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)
index 9d51476..a9c632b 100644 (file)
@@ -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 (file)
index 0000000..314bb03
--- /dev/null
@@ -0,0 +1,14 @@
+
+set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+
+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)