summaryrefslogtreecommitdiff
path: root/driver/CMakeLists.txt
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-10-06 16:43:14 +0400
committerKozlov Dmitry <dima@server>2010-10-06 16:43:14 +0400
commitb6a1268714671904e96a49b88680dc3ff07aaa1c (patch)
tree60424372b94312710b9f583b1bcc641de4020316 /driver/CMakeLists.txt
parent5cf93f33f2350ed3b92f73ead1d2829a6883810a (diff)
downloadaccel-ppp-b6a1268714671904e96a49b88680dc3ff07aaa1c.tar.gz
accel-ppp-b6a1268714671904e96a49b88680dc3ff07aaa1c.zip
project cleanup and prepare to release
Diffstat (limited to 'driver/CMakeLists.txt')
-rw-r--r--driver/CMakeLists.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/driver/CMakeLists.txt b/driver/CMakeLists.txt
new file mode 100644
index 0000000..e9d511a
--- /dev/null
+++ b/driver/CMakeLists.txt
@@ -0,0 +1,18 @@
+if (NOT DEFINED KDIR)
+ set(KDIR "/usr/src/linux")
+endif (NOT DEFINED KDIR)
+
+ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/driver/pptp.ko
+ COMMAND mkdir ${CMAKE_CURRENT_BINARY_DIR}/driver &> /dev/null
+ COMMAND ln -sf ${CMAKE_CURRENT_SOURCE_DIR}/* ${CMAKE_CURRENT_BINARY_DIR}/driver
+ COMMAND make -C ${KDIR} M=${CMAKE_CURRENT_BINARY_DIR}/driver modules
+# COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/pptp.ko ${CMAKE_CURRENT_BINARY_DIR}/pptp.ko
+# COMMAND make -C ${KDIR} M=${CMAKE_CURRENT_SOURCE_DIR} clean
+)
+
+ADD_CUSTOM_TARGET(pptp_drv ALL
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/driver/pptp.ko
+)
+
+INSTALL(CODE "EXECUTE_PROCESS(COMMAND make -C ${KDIR} M=${CMAKE_CURRENT_BINARY_DIR}/driver modules_install)")
+