diff options
-rw-r--r-- | CMakeLists.txt | 42 | ||||
-rw-r--r-- | apps/pio_test.c | 1 | ||||
-rw-r--r-- | apps/xilinx.c | 1 | ||||
-rw-r--r-- | dma/CMakeLists.txt | 2 | ||||
-rw-r--r-- | dma/ipe.c | 1 | ||||
-rw-r--r-- | dma/ipe_benchmark.c | 1 | ||||
-rw-r--r-- | dma/nwl.c | 1 | ||||
-rw-r--r-- | dma/nwl_engine.c | 1 | ||||
-rw-r--r-- | dma/nwl_loopback.c | 1 | ||||
-rw-r--r-- | pcilib/CMakeLists.txt | 2 | ||||
-rw-r--r-- | pcilib/bar.c | 1 | ||||
-rw-r--r-- | pcilib/error.c | 1 | ||||
-rw-r--r-- | pcilib/fifo.c | 1 | ||||
-rw-r--r-- | pcilib/pci.c | 1 | ||||
-rw-r--r-- | pcilib/xml.c | 7 | ||||
-rw-r--r-- | pcitool/CMakeLists.txt | 2 | ||||
-rw-r--r-- | pcitool/cli.c | 1 | ||||
-rw-r--r-- | protocols/CMakeLists.txt | 2 |
18 files changed, 47 insertions, 22 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d090433..8ad9c98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,28 @@ set(DISABLE_PCITOOL FALSE CACHE BOOL "Build only the library") #list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") +if(NOT DEFINED BIN_INSTALL_DIR) + set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin") +endif(NOT DEFINED BIN_INSTALL_DIR) + +if(NOT DEFINED LIB_INSTALL_DIR) + set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib") +endif(NOT DEFINED LIB_INSTALL_DIR) + +if(NOT DEFINED INCLUDE_INSTALL_DIR) + set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include") +endif(NOT DEFINED INCLUDE_INSTALL_DIR) + +if(NOT DEFINED DATA_INSTALL_DIR) + set(DATA_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share") +endif(NOT DEFINED DATA_INSTALL_DIR) + +if(NOT DEFINED LOCALE_INSTALL_DIR) + set(LOCALE_INSTALL_DIR "${DATA_INSTALL_DIR}/locale") +endif(NOT DEFINED LOCALE_INSTALL_DIR) + +SET(ENV{PKG_CONFIG_PATH} "${LIB_INSTALL_DIR}/pkgconfig:$ENV{PKG_CONFIG_PATH}") + find_package(PkgConfig REQUIRED) find_package(Threads REQUIRED) find_package(PythonLibs REQUIRED) @@ -47,26 +69,6 @@ set(PACKAGE_TARNAME "${TARNAME}") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "http://ufo.kit.edu/ufo/newticket") -if(NOT DEFINED BIN_INSTALL_DIR) - set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin") -endif(NOT DEFINED BIN_INSTALL_DIR) - -if(NOT DEFINED LIB_INSTALL_DIR) - set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib") -endif(NOT DEFINED LIB_INSTALL_DIR) - -if(NOT DEFINED INCLUDE_INSTALL_DIR) - set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include") -endif(NOT DEFINED INCLUDE_INSTALL_DIR) - -if(NOT DEFINED DATA_INSTALL_DIR) - set(DATA_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share") -endif(NOT DEFINED DATA_INSTALL_DIR) - -if(NOT DEFINED LOCALE_INSTALL_DIR) - set(LOCALE_INSTALL_DIR "${DATA_INSTALL_DIR}/locale") -endif(NOT DEFINED LOCALE_INSTALL_DIR) - set(PCILIB_PLUGIN_DIR "${LIB_INSTALL_DIR}/pcilib" CACHE PATH "Directory to install plugins") set(PCILIB_DATA_DIR "${DATA_INSTALL_DIR}/pcilib" CACHE PATH "Directory to install data files") set(PCILIB_MODEL_DIR "${PCILIB_DATA_DIR}/models" CACHE PATH "Directory to install XML models") diff --git a/apps/pio_test.c b/apps/pio_test.c index 84439ee..f211bf1 100644 --- a/apps/pio_test.c +++ b/apps/pio_test.c @@ -1,4 +1,5 @@ #define _BSD_SOURCE +#define _DEFAULT_SOURCE #define _POSIX_C_SOURCE 199309L #include <stdio.h> #include <stdlib.h> diff --git a/apps/xilinx.c b/apps/xilinx.c index 0fe146b..a7b63e1 100644 --- a/apps/xilinx.c +++ b/apps/xilinx.c @@ -1,4 +1,5 @@ #define _BSD_SOURCE +#define _DEFAULT_SOURCE #define _POSIX_C_SOURCE 199309L #include <stdio.h> #include <stdlib.h> diff --git a/dma/CMakeLists.txt b/dma/CMakeLists.txt index 38f13eb..4ddaece 100644 --- a/dma/CMakeLists.txt +++ b/dma/CMakeLists.txt @@ -1,6 +1,8 @@ include_directories( ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/pcilib + ${CMAKE_BINARY_DIR}/pcilib ) set(HEADERS ${HEADERS} nwl.h nwl_private.h nwl_engine.h nwl_irq.h nwl_loopback.h ipe.h ipe_private.h) @@ -1,5 +1,6 @@ #define _PCILIB_DMA_IPE_C #define _BSD_SOURCE +#define _DEFAULT_SOURCE #include <stdio.h> #include <stdlib.h> diff --git a/dma/ipe_benchmark.c b/dma/ipe_benchmark.c index 3ce04d3..2f86444 100644 --- a/dma/ipe_benchmark.c +++ b/dma/ipe_benchmark.c @@ -1,5 +1,6 @@ #define _PCILIB_DMA_IPE_C #define _BSD_SOURCE +#define _DEFAULT_SOURCE #include <stdio.h> #include <stdlib.h> @@ -1,5 +1,6 @@ #define _PCILIB_DMA_NWL_C #define _BSD_SOURCE +#define _DEFAULT_SOURCE #define _GNU_SOURCE #include <stdio.h> diff --git a/dma/nwl_engine.c b/dma/nwl_engine.c index 15ae27e..c3dea49 100644 --- a/dma/nwl_engine.c +++ b/dma/nwl_engine.c @@ -1,4 +1,5 @@ #define _BSD_SOURCE +#define _DEFAULT_SOURCE #include <stdio.h> #include <stdlib.h> diff --git a/dma/nwl_loopback.c b/dma/nwl_loopback.c index 1a0cd93..e5de50e 100644 --- a/dma/nwl_loopback.c +++ b/dma/nwl_loopback.c @@ -1,4 +1,5 @@ #define _BSD_SOURCE +#define _DEFAULT_SOURCE #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/pcilib/CMakeLists.txt b/pcilib/CMakeLists.txt index 428f898..4c36141 100644 --- a/pcilib/CMakeLists.txt +++ b/pcilib/CMakeLists.txt @@ -2,7 +2,9 @@ include_directories( ${CMAKE_SOURCE_DIR} ${PYTHON_INCLUDE_DIRS} ${XMLLIB_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/pcilib + ${CMAKE_BINARY_DIR}/pcilib ) set(HEADERS pcilib.h pci.h export.h bar.h fifo.h model.h bank.h register.h diff --git a/pcilib/bar.c b/pcilib/bar.c index 2666506..3dc27c9 100644 --- a/pcilib/bar.c +++ b/pcilib/bar.c @@ -1,4 +1,5 @@ #define _BSD_SOURCE +#define _DEFAULT_SOURCE #define _POSIX_C_SOURCE 200809L #include <stdio.h> diff --git a/pcilib/error.c b/pcilib/error.c index 2c4296e..06af292 100644 --- a/pcilib/error.c +++ b/pcilib/error.c @@ -1,4 +1,5 @@ #define _BSD_SOURCE +#define _DEFAULT_SOURCE #include <stdio.h> #include <stdlib.h> diff --git a/pcilib/fifo.c b/pcilib/fifo.c index 593400f..7ed87b8 100644 --- a/pcilib/fifo.c +++ b/pcilib/fifo.c @@ -1,4 +1,5 @@ #define _BSD_SOURCE +#define _DEFAULT_SOURCE #define _POSIX_C_SOURCE 200809L #include <stdio.h> diff --git a/pcilib/pci.c b/pcilib/pci.c index 8a0ee29..3a0073b 100644 --- a/pcilib/pci.c +++ b/pcilib/pci.c @@ -1,6 +1,7 @@ //#define PCILIB_FILE_IO #define _XOPEN_SOURCE 700 #define _BSD_SOURCE +#define _DEFAULT_SOURCE #define _POSIX_C_SOURCE 200809L #include <stdio.h> diff --git a/pcilib/xml.c b/pcilib/xml.c index d4c84be..55cdf11 100644 --- a/pcilib/xml.c +++ b/pcilib/xml.c @@ -21,6 +21,10 @@ #include "bank.h" #include "register.h" #include <libxml/xmlschemastypes.h> +#include <libxml/tree.h> +#include <libxml/parser.h> +#include <libxml/xpath.h> +#include <libxml/xpathInternals.h> #include <dirent.h> #include <errno.h> @@ -450,7 +454,6 @@ void pcilib_xml_initialize_registers(pcilib_t* pci,xmlDocPtr doc){ xmlChar *type=NULL; xmlNodePtr mynode; xmlXPathContextPtr context; - int number_registers; pcilib_register_description_t *registers=NULL; pcilib_register_description_t myregister; int i,j; @@ -488,7 +491,7 @@ void pcilib_xml_initialize_registers(pcilib_t* pci,xmlDocPtr doc){ /**we arrange the register for them to be well placed for pci-l*/ pcilib_xml_arrange_registers(registers,nodesetadress->nodeNr+nodesetsubadress->nodeNr); /**we fille the pcilib_t struct*/ - pcilib_add_registers(pci,number_registers,registers); + pcilib_add_registers(pci,nodesetadress->nodeNr+nodesetsubadress->nodeNr,registers); } diff --git a/pcitool/CMakeLists.txt b/pcitool/CMakeLists.txt index 4aea142..0c0eef2 100644 --- a/pcitool/CMakeLists.txt +++ b/pcitool/CMakeLists.txt @@ -1,6 +1,8 @@ include_directories( ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/pcilib + ${CMAKE_BINARY_DIR}/pcilib ${FASTWRITER_INCLUDE_DIRS} ) diff --git a/pcitool/cli.c b/pcitool/cli.c index e9c9574..e0aaf28 100644 --- a/pcitool/cli.c +++ b/pcitool/cli.c @@ -1,6 +1,7 @@ #define _XOPEN_SOURCE 700 #define _POSIX_C_SOURCE 200112L #define _BSD_SOURCE +#define _DEFAULT_SOURCE #include <stdio.h> #include <stdlib.h> diff --git a/protocols/CMakeLists.txt b/protocols/CMakeLists.txt index 2c482f6..88a1e8e 100644 --- a/protocols/CMakeLists.txt +++ b/protocols/CMakeLists.txt @@ -1,6 +1,8 @@ include_directories( ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/pcilib + ${CMAKE_BINARY_DIR}/pcilib ) set(HEADERS ${HEADERS} default.h software.h) |