[CMAKE]
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 19 Sep 2010 11:19:16 +0000 (11:19 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 19 Sep 2010 11:19:16 +0000 (11:19 +0000)
- Add network drivers (afd, ne2000, pcnet, ndis, tcpip and tdi) to build.

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

drivers/CMakeLists.txt
drivers/network/CMakeLists.txt [new file with mode: 0644]
drivers/network/afd/CMakeLists.txt [new file with mode: 0644]
drivers/network/dd/CMakeLists.txt [new file with mode: 0644]
drivers/network/dd/ne2000/CMakeLists.txt [new file with mode: 0644]
drivers/network/dd/pcnet/CMakeLists.txt [new file with mode: 0644]
drivers/network/ndis/CMakeLists.txt [new file with mode: 0644]
drivers/network/tcpip/CMakeLists.txt [new file with mode: 0644]
drivers/network/tdi/CMakeLists.txt [new file with mode: 0644]

index 933325b..820aa93 100644 (file)
@@ -4,6 +4,7 @@ add_subdirectory(battery)
 add_subdirectory(bus)
 add_subdirectory(filesystems)
 add_subdirectory(input)
+add_subdirectory(network)
 add_subdirectory(setup)
 add_subdirectory(storage)
 add_subdirectory(video)
diff --git a/drivers/network/CMakeLists.txt b/drivers/network/CMakeLists.txt
new file mode 100644 (file)
index 0000000..88521ca
--- /dev/null
@@ -0,0 +1,6 @@
+
+add_subdirectory(afd)
+add_subdirectory(dd)
+add_subdirectory(ndis)
+add_subdirectory(tcpip)
+add_subdirectory(tdi)
diff --git a/drivers/network/afd/CMakeLists.txt b/drivers/network/afd/CMakeLists.txt
new file mode 100644 (file)
index 0000000..786a754
--- /dev/null
@@ -0,0 +1,30 @@
+
+include_directories(BEFORE include)
+include_directories(${REACTOS_SOURCE_DIR}/include/reactos/drivers)
+
+list(APPEND SOURCE
+    afd/bind.c
+    afd/connect.c
+    afd/context.c
+    afd/info.c
+    afd/listen.c
+    afd/lock.c
+    afd/main.c
+    afd/read.c
+    afd/select.c
+    afd/tdi.c
+    afd/tdiconn.c
+    afd/write.c
+    afd.rc)
+
+add_library(afd SHARED ${CMAKE_CURRENT_BINARY_DIR}/afd_afd.h.gch ${SOURCE})
+
+set_target_properties(afd PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--exclude-all-symbols -Wl,--subsystem,native" SUFFIX ".sys")
+
+target_link_libraries(afd
+    pseh
+    -lntoskrnl
+    -lhal)
+
+add_pch(afd ${CMAKE_CURRENT_SOURCE_DIR}/include/afd.h ${SOURCE})
+add_dependencies(afd psdk bugcodes buildno_header)
diff --git a/drivers/network/dd/CMakeLists.txt b/drivers/network/dd/CMakeLists.txt
new file mode 100644 (file)
index 0000000..61ce69d
--- /dev/null
@@ -0,0 +1,3 @@
+
+add_subdirectory(ne2000)
+add_subdirectory(pcnet)
diff --git a/drivers/network/dd/ne2000/CMakeLists.txt b/drivers/network/dd/ne2000/CMakeLists.txt
new file mode 100644 (file)
index 0000000..9447ae8
--- /dev/null
@@ -0,0 +1,18 @@
+
+include_directories(BEFORE include)
+
+list(APPEND SOURCE
+    ne2000/8390.c
+    ne2000/main.c
+    ne2000.rc)
+
+add_library(ne2000 SHARED ${SOURCE})
+
+set_target_properties(ne2000 PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--exclude-all-symbols -Wl,--subsystem,native" SUFFIX ".sys")
+
+target_link_libraries(ne2000
+    -lndis
+    -lntoskrnl
+    -lhal)
+
+add_dependencies(ne2000 psdk bugcodes buildno_header)
diff --git a/drivers/network/dd/pcnet/CMakeLists.txt b/drivers/network/dd/pcnet/CMakeLists.txt
new file mode 100644 (file)
index 0000000..264030f
--- /dev/null
@@ -0,0 +1,21 @@
+
+add_definitions(-DNDIS50_MINIPORT)
+add_definitions(-DNDIS_MINIPORT_DRIVER)
+add_definitions(-DNDIS_LEGACY_MINIPORT)
+add_definitions(-DNDIS51_MINIPORT)
+
+list(APPEND SOURCE
+    pcnet.c
+    requests.c
+    pcnet.rc)
+
+add_library(pcnet SHARED ${SOURCE})
+
+set_target_properties(pcnet PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--exclude-all-symbols -Wl,--subsystem,native" SUFFIX ".sys")
+
+target_link_libraries(pcnet
+    -lndis
+    -lntoskrnl
+    -lhal)
+
+add_dependencies(pcnet psdk bugcodes buildno_header)
diff --git a/drivers/network/ndis/CMakeLists.txt b/drivers/network/ndis/CMakeLists.txt
new file mode 100644 (file)
index 0000000..63d8533
--- /dev/null
@@ -0,0 +1,46 @@
+
+include_directories(BEFORE include)
+
+add_definitions(-DNDIS_WRAPPER)
+add_definitions(-DNDIS51)
+add_definitions(-DNDIS51_MINIPORT)
+add_definitions(-DNDIS_LEGACY_DRIVER)
+add_definitions(-DNDIS_LEGACY_MINIPORT)
+add_definitions(-DNDIS_LEGACY_PROTOCOL)
+add_definitions(-DNDIS_MINIPORT_DRIVER)
+
+spec2def(ndis ${CMAKE_CURRENT_SOURCE_DIR}/ndis.spec ${CMAKE_CURRENT_BINARY_DIR}/ndis.def)
+
+list(APPEND SOURCE
+    ndis/30stubs.c
+    ndis/40stubs.c
+    ndis/50stubs.c
+    ndis/buffer.c
+    ndis/cl.c
+    ndis/cm.c
+    ndis/co.c
+    ndis/config.c
+    ndis/control.c
+    ndis/efilter.c
+    ndis/hardware.c
+    ndis/io.c
+    ndis/main.c
+    ndis/memory.c
+    ndis/miniport.c
+    ndis/misc.c
+    ndis/protocol.c
+    ndis/string.c
+    ndis/time.c
+    ndis.rc)
+
+add_library(ndis SHARED ${CMAKE_CURRENT_BINARY_DIR}/ndis_ndissys.h.gch ${SOURCE})
+
+set_target_properties(ndis PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--exclude-all-symbols -Wl,--subsystem,native" SUFFIX ".sys")
+
+target_link_libraries(ndis
+    ${CMAKE_CURRENT_BINARY_DIR}/ndis.def
+    -lntoskrnl
+    -lhal)
+
+add_pch(ndis ${CMAKE_CURRENT_SOURCE_DIR}/include/ndissys.h ${SOURCE})
+add_dependencies(ndis ndis_def psdk bugcodes buildno_header)
diff --git a/drivers/network/tcpip/CMakeLists.txt b/drivers/network/tcpip/CMakeLists.txt
new file mode 100644 (file)
index 0000000..a769a3c
--- /dev/null
@@ -0,0 +1,41 @@
+
+include_directories(BEFORE include)
+include_directories(${REACTOS_SOURCE_DIR}/lib/drivers/oskittcp/include)
+
+add_definitions(-DNDIS40)
+add_definitions(-D_NTDRIVER_)
+
+spec2def(tcpip ${CMAKE_CURRENT_SOURCE_DIR}/tcpip.spec ${CMAKE_CURRENT_BINARY_DIR}/tcpip.def)
+
+list(APPEND SOURCE
+    datalink/lan.c
+    tcpip/ainfo.c
+    tcpip/buffer.c
+    tcpip/dispatch.c
+    tcpip/fileobjs.c
+    tcpip/iinfo.c
+    tcpip/info.c
+    tcpip/lock.c
+    tcpip/main.c
+    tcpip/ninfo.c
+    tcpip/proto.c
+    tcpip/tinfo.c
+    tcpip/wait.c
+    tcpip.rc)
+
+add_library(tcpip SHARED ${CMAKE_CURRENT_BINARY_DIR}/tcpip_precomp.h.gch ${SOURCE})
+
+set_target_properties(tcpip PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--exclude-all-symbols -Wl,--subsystem,native" SUFFIX ".sys")
+
+target_link_libraries(tcpip
+    ${CMAKE_CURRENT_BINARY_DIR}/tcpip.def
+    ip
+    oskittcp
+    pseh
+    chew
+    -lndis
+    -lntoskrnl
+    -lhal)
+
+add_pch(tcpip ${CMAKE_CURRENT_SOURCE_DIR}/include/precomp.h ${SOURCE})
+add_dependencies(tcpip tcpip_def psdk bugcodes buildno_header)
diff --git a/drivers/network/tdi/CMakeLists.txt b/drivers/network/tdi/CMakeLists.txt
new file mode 100644 (file)
index 0000000..d504959
--- /dev/null
@@ -0,0 +1,29 @@
+
+include_directories(BEFORE include)
+include_directories(${REACTOS_SOURCE_DIR}/lib/drivers/oskittcp/include)
+
+add_definitions(-DNDIS40)
+add_definitions(-D_NTDRIVER_)
+
+spec2def(tdi ${CMAKE_CURRENT_SOURCE_DIR}/misc/tdi.spec ${CMAKE_CURRENT_BINARY_DIR}/tdi.def)
+
+list(APPEND SOURCE
+    cte/string.c
+    cte/stubs.c
+    misc/main.c
+    misc/tdi.rc
+    tdi/dereg.c
+    tdi/handler.c
+    tdi/obsolete.c
+    tdi/stubs.c)
+
+add_library(tdi SHARED ${SOURCE})
+
+set_target_properties(tdi PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--exclude-all-symbols -Wl,--subsystem,native" SUFFIX ".sys")
+
+target_link_libraries(tdi
+    ${CMAKE_CURRENT_BINARY_DIR}/tdi.def
+    -lntoskrnl
+    -lhal)
+
+add_dependencies(tdi tdi_def psdk bugcodes buildno_header)