The branch, eeprom-new has been updated
via ade814a59b4660c5af865dd86cdd48cfa55e1ae5 (commit)
from e47d7975a1c8648e3a86f980eb01eaf96c86a023 (commit)
- Log -----------------------------------------------------------------
commit ade814a59b4660c5af865dd86cdd48cfa55e1ae5
Author: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
Date: Sat Oct 23 19:26:12 2010 +0200
Add ftdi_eeprom target (currently disabled). Get version info from
CMakeLists.txt
-----------------------------------------------------------------------
Summary of changes:
ftdi_eeprom/CMakeLists.txt | 18 ++++++++++++++++--
ftdi_eeprom/ftdi_eeprom_version.h.in | 8 ++++++++
ftdi_eeprom/main.c | 3 ++-
3 files changed, 26 insertions(+), 3 deletions(-)
create mode 100644 ftdi_eeprom/ftdi_eeprom_version.h.in
diff --git a/ftdi_eeprom/CMakeLists.txt b/ftdi_eeprom/CMakeLists.txt
index 04fce52..fff31a8 100644
--- a/ftdi_eeprom/CMakeLists.txt
+++ b/ftdi_eeprom/CMakeLists.txt
@@ -9,11 +9,25 @@ if (FTDI_EEPROM)
LINK_DIRECTORIES(${Confuse_LIBRARY_DIRS})
SET(libs ${libs} ${Confuse_LIBRARIES})
- if(Confuse_FOUND)
+ if(Confuse_FOUND_DISABLED_FOR_NOW)
set(FTDI_BUILD_EEPROM True PARENT_SCOPE)
message(STATUS "Building ftdi_eeprom")
- # TODO: Add real ftdi_eeprom source + binary
+ # Version defines
+ set(EEPROM_MAJOR_VERSION 0)
+ set(EEPROM_MINOR_VERSION 17)
+ set(EEPROM_VERSION_STRING
${EEPROM_MAJOR_VERSION}.${EEPROM_MINOR_VERSION})
+
+ include_directories(${CMAKE_SOURCE_DIR}/src)
+ include_directories(${CMAKE_BINARY_DIR}/ftdi_eeprom)
+
+ configure_file(
+ "ftdi_eeprom_version.h.in"
+ "${CMAKE_BINARY_DIR}/ftdi_eeprom/ftdi_eeprom_version.h"
+ )
+
+ add_executable(ftdi_eeprom main.c)
+ target_link_libraries(ftdi_eeprom ftdi)
else(Confuse_FOUND)
message(STATUS "libConfuse not found, won't build ftdi_eeprom")
diff --git a/ftdi_eeprom/ftdi_eeprom_version.h.in
b/ftdi_eeprom/ftdi_eeprom_version.h.in
new file mode 100644
index 0000000..db7717d
--- /dev/null
+++ b/ftdi_eeprom/ftdi_eeprom_version.h.in
@@ -0,0 +1,8 @@
+#ifndef _FTDI_EEPROM_VERSION_H
+#define _FTDI_EEPROM_VERSION_H
+
+#define EEPROM_MAJOR_VERSION @EEPROM_MAJOR_VERSION@
+#define EEPROM_MINOR_VERSION @EEPROM_MINOR_VERSION@
+#define EEPROM_VERSION_STRING "@EEPROM_VERSION_STRING@"
+
+#endif
diff --git a/ftdi_eeprom/main.c b/ftdi_eeprom/main.c
index 81e6e93..551973f 100644
--- a/ftdi_eeprom/main.c
+++ b/ftdi_eeprom/main.c
@@ -24,6 +24,7 @@
#include <confuse.h>
#include <ftdi.h>
+#include <ftdi_eeprom_version.h>
int str_to_cbus(char *str, int max_allowed)
{
@@ -99,7 +100,7 @@ int main(int argc, char *argv[])
struct ftdi_context ftdi;
struct ftdi_eeprom eeprom;
- printf("\nFTDI eeprom generator v%s\n", VERSION);
+ printf("\nFTDI eeprom generator v%s\n", EEPROM_VERSION_STRING);
printf ("(c) Intra2net AG <opensource@xxxxxxxxxxxxx>\n");
if (argc != 2 && argc != 3)
hooks/post-receive
--
port libftdi to libusb-1.0
--
libftdi-git - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi-git+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|