summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2012-10-09 19:13:20 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2012-10-09 19:13:20 +0200
commitab78594d091c8be7e942ff77d7937550261db6c7 (patch)
tree9d322cb1157efc74bc5f2834e3d69a081d68ef9e
parent31477a2d3ea7aed871b9dcc87c8a157c747bfae8 (diff)
parent047cd8feb375de9528dd627e25961863acf4e10a (diff)
downloadpcitool-ab78594d091c8be7e942ff77d7937550261db6c7.tar.gz
pcitool-ab78594d091c8be7e942ff77d7937550261db6c7.tar.bz2
pcitool-ab78594d091c8be7e942ff77d7937550261db6c7.tar.xz
pcitool-ab78594d091c8be7e942ff77d7937550261db6c7.zip
Merge fixes to build system
-rw-r--r--CMakeLists.txt15
-rw-r--r--driver/Makefile4
-rw-r--r--ipecamera/CMakeLists.txt1
3 files changed, 14 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 54a7120..cb3be58 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,14 +26,22 @@ add_subdirectory(dma)
add_subdirectory(ipecamera)
add_subdirectory(pcitool)
+include_directories(
+ ${FASTWRITER_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${FASTWRITER_LIBRARY_DIRS}
+ ${UFODECODE_LIBRARY_DIRS}
+)
+
add_library(pcilib SHARED pci.c register.c kmem.c irq.c dma.c event.c default.c tools.c error.c)
-target_link_libraries(pcilib ufodecode dma ipecamera)
+target_link_libraries(pcilib dma ipecamera ${CMAKE_THREAD_LIBS_INIT} ${UFODECODE_LIBRARIES} )
add_dependencies(pcilib dma ipecamera)
set_target_properties(pcilib PROPERTIES
VERSION ${PCILIB_VERSION}
SOVERSION ${PCILIB_ABI_VERSION}
- LINK_FLAGS ${CMAKE_THREAD_LIBS_INIT}
# LINK_FLAGS "-pthread"
# LINK_FLAGS "-pthread -Wl,--whole-archive,dma/libdma.a,ipecamera/libipecamera.a,--no-whole-archive"
)
@@ -41,7 +49,7 @@ set_target_properties(pcilib PROPERTIES
if (NOT DISABLE_PCITOOL)
add_executable(pci cli.c)
add_dependencies(pci pcitool)
- target_link_libraries(pci pcilib pcitool fastwriter)
+ target_link_libraries(pci pcilib pcitool ${FASTWRITER_LIBRARIES})
set_target_properties(pci PROPERTIES
LINK_FLAGS ${CMAKE_THREAD_LIBS_INIT}
)
@@ -51,7 +59,6 @@ endif (NOT DISABLE_PCITOOL)
# LINK_FLAGS "-Wl,pcitool/libpcitool.a"
#)
-
if(NOT DEFINED BIN_INSTALL_DIR)
set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
endif(NOT DEFINED BIN_INSTALL_DIR)
diff --git a/driver/Makefile b/driver/Makefile
index ac4a14c..92fa913 100644
--- a/driver/Makefile
+++ b/driver/Makefile
@@ -10,7 +10,7 @@ EXTRA_CFLAGS += -I$(M)/..
default:
@KERNEL_GCC_VERSION=`cat /proc/version | head -n1 | cut -d " " -f 7` ;\
- GCC_VERSION=`$(CC) --version | head -n 1 | awk 'BEGIN { FPAT = "([^[:space:]]*)|(\\\\([^)]+\\\\))" } { print $$3 }'` ;\
+ GCC_VERSION=`$(CC) --version | head -n 1 | tr ' ' '\n' | tail -n 1` ;\
if [ $$KERNEL_GCC_VERSION != $$GCC_VERSION ]; then \
echo "Kernel is compiled with gcc $$KERNEL_GCC_VERSION, but you are now using $$GCC_VERSION" ;\
GCC_MAJOR=`echo $$KERNEL_GCC_VERSION | cut -d "." -f 1-2` ;\
@@ -20,7 +20,7 @@ default:
echo "No compiler of $$GCC_MAJOR series is installed" ;\
exit 1 ;\
fi ;\
- GCC_VERSION=`$$CC --version | head -n 1 | awk 'BEGIN { FPAT = "([^[:space:]]*)|(\\\\([^)]+\\\\))" } { print $$3 }'` ;\
+ GCC_VERSION=`$$CC --version | head -n 1 | tr ' ' '\n' | tail -n 1` ;\
if [ $$KERNEL_GCC_VERSION != $$GCC_VERSION ]; then \
echo "The $$GCC_VERSION of $$GCC_MAJOR series is installed" ;\
exit 1 ;\
diff --git a/ipecamera/CMakeLists.txt b/ipecamera/CMakeLists.txt
index 87699fa..5b536f2 100644
--- a/ipecamera/CMakeLists.txt
+++ b/ipecamera/CMakeLists.txt
@@ -1,5 +1,6 @@
include_directories(
${CMAKE_SOURCE_DIR}
+ ${UFODECODE_INCLUDE_DIRS}
)
set(HEADERS ${HEADERS} ipecamera.h model.h reader.h events.h data.h public.h private.h)