summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt3
-rw-r--r--drivers/ipoe/CMakeLists.txt2
-rw-r--r--drivers/ipoe/ipoe.c3
-rw-r--r--drivers/vlan_mon/CMakeLists.txt1
-rw-r--r--drivers/vlan_mon/vlan_mon.c3
-rw-r--r--version.h.in1
6 files changed, 10 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9afa2b5a..128b75a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,7 +49,8 @@ ENDIF (EXISTS ${CMAKE_HOME_DIRECTORY}/.git AND NOT IGNORE_GIT)
include(cmake/cpack.cmake)
ADD_DEFINITIONS(-DACCEL_PPP_VERSION="${ACCEL_PPP_VERSION}")
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
if (NOT BUILD_DRIVER_ONLY)
if (MEMDEBUG)
diff --git a/drivers/ipoe/CMakeLists.txt b/drivers/ipoe/CMakeLists.txt
index 6f4f043a..e221a7ec 100644
--- a/drivers/ipoe/CMakeLists.txt
+++ b/drivers/ipoe/CMakeLists.txt
@@ -1,3 +1,4 @@
+
if (NOT DEFINED KDIR)
set(KDIR "/usr/src/linux")
endif (NOT DEFINED KDIR)
@@ -6,6 +7,7 @@ ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/driver/ipoe.ko
COMMAND rm -rf ${CMAKE_CURRENT_BINARY_DIR}/driver
COMMAND mkdir ${CMAKE_CURRENT_BINARY_DIR}/driver
COMMAND ln -sf ${CMAKE_CURRENT_SOURCE_DIR}/* ${CMAKE_CURRENT_BINARY_DIR}/driver
+ COMMAND ln -sf ${CMAKE_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/driver
COMMAND make -C ${KDIR} M=${CMAKE_CURRENT_BINARY_DIR}/driver modules
DEPENDS ipoe.c ipoe.h
)
diff --git a/drivers/ipoe/ipoe.c b/drivers/ipoe/ipoe.c
index 2008e08b..fa7dec3f 100644
--- a/drivers/ipoe/ipoe.c
+++ b/drivers/ipoe/ipoe.c
@@ -33,6 +33,7 @@
#include <net/ip6_route.h>
#include "ipoe.h"
+#include "version.h"
#define BEGIN_UPDATE 1
#define UPDATE 2
@@ -1909,7 +1910,7 @@ static int __init ipoe_init(void)
{
int err, i;
- printk("IPoE session driver v1.11\n");
+ printk("IPoE session driver v%s\n", ACCEL_PPP_VERSION);
/*err = register_pernet_device(&ipoe_net_ops);
if (err < 0)
diff --git a/drivers/vlan_mon/CMakeLists.txt b/drivers/vlan_mon/CMakeLists.txt
index 1d0c3c88..b4c8e348 100644
--- a/drivers/vlan_mon/CMakeLists.txt
+++ b/drivers/vlan_mon/CMakeLists.txt
@@ -6,6 +6,7 @@ ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/driver/vlan_mon.ko
COMMAND rm -rf ${CMAKE_CURRENT_BINARY_DIR}/driver
COMMAND mkdir ${CMAKE_CURRENT_BINARY_DIR}/driver
COMMAND ln -sf ${CMAKE_CURRENT_SOURCE_DIR}/* ${CMAKE_CURRENT_BINARY_DIR}/driver
+ COMMAND ln -sf ${CMAKE_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/driver
COMMAND make -C ${KDIR} M=${CMAKE_CURRENT_BINARY_DIR}/driver modules
DEPENDS vlan_mon.c vlan_mon.h
)
diff --git a/drivers/vlan_mon/vlan_mon.c b/drivers/vlan_mon/vlan_mon.c
index e37fd365..d5f42c91 100644
--- a/drivers/vlan_mon/vlan_mon.c
+++ b/drivers/vlan_mon/vlan_mon.c
@@ -18,6 +18,7 @@
#include <net/netns/generic.h>
#include "vlan_mon.h"
+#include "version.h"
#define VLAN_MON_MAGIC 0x639fa78c
@@ -728,7 +729,7 @@ static int __init vlan_mon_init(void)
int i;
#endif
- printk("vlan-mon driver v1.11\n");
+ printk("vlan-mon driver v%s\n", ACCEL_PPP_VERSION);
INIT_WORK(&vlan_notify_work, vlan_do_notify);
diff --git a/version.h.in b/version.h.in
new file mode 100644
index 00000000..1e87ac6b
--- /dev/null
+++ b/version.h.in
@@ -0,0 +1 @@
+#define ACCEL_PPP_VERSION "@ACCEL_PPP_VERSION@"