Merge pull request #68 from smunaut/pending
Misc patches I needed to make it work properly
This commit is contained in:
@ -50,7 +50,7 @@ OBJDUMP = $(PREFIX)-objdump
|
|||||||
GDB = $(PREFIX)-gdb
|
GDB = $(PREFIX)-gdb
|
||||||
TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX)
|
TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX)
|
||||||
|
|
||||||
CFLAGS += -std=c99 -Os -g3 -Wall -Wextra -I$(LIBOPENCM3)/include -I../common \
|
CFLAGS += -std=gnu99 -Os -g3 -Wall -Wextra -I$(LIBOPENCM3)/include -I../common \
|
||||||
-fno-common -mcpu=cortex-m4 -mthumb -MD \
|
-fno-common -mcpu=cortex-m4 -mthumb -MD \
|
||||||
-mfloat-abi=hard -mfpu=fpv4-sp-d16 \
|
-mfloat-abi=hard -mfpu=fpv4-sp-d16 \
|
||||||
$(HACKRF_OPTS)
|
$(HACKRF_OPTS)
|
||||||
|
@ -43,6 +43,38 @@ include_directories(${LIBUSB_INCLUDE_DIR} ${THREADS_PTHREADS_INCLUDE_DIR})
|
|||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# Create Pkg Config File
|
||||||
|
########################################################################
|
||||||
|
FOREACH(inc ${LIBUSB_INCLUDE_DIR})
|
||||||
|
LIST(APPEND HACKRF_PC_CFLAGS "-I${inc}")
|
||||||
|
ENDFOREACH(inc)
|
||||||
|
|
||||||
|
# use space-separation format for the pc file
|
||||||
|
STRING(REPLACE ";" " " HACKRF_PC_CFLAGS "${HACKRF_PC_CFLAGS}")
|
||||||
|
STRING(REPLACE ";" " " HACKRF_PC_LIBS "${HACKRF_PC_LIBS}")
|
||||||
|
|
||||||
|
# unset these vars to avoid hard-coded paths to cross environment
|
||||||
|
IF(CMAKE_CROSSCOMPILING)
|
||||||
|
UNSET(HACKRF_PC_CFLAGS)
|
||||||
|
UNSET(HACKRF_PC_LIBS)
|
||||||
|
ENDIF(CMAKE_CROSSCOMPILING)
|
||||||
|
|
||||||
|
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||||
|
set(exec_prefix \${prefix})
|
||||||
|
set(libdir \${exec_prefix}/lib)
|
||||||
|
set(includedir \${prefix}/include)
|
||||||
|
|
||||||
|
CONFIGURE_FILE(
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/libhackrf.pc.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/libhackrf.pc
|
||||||
|
@ONLY)
|
||||||
|
|
||||||
|
INSTALL(
|
||||||
|
FILES ${CMAKE_CURRENT_BINARY_DIR}/libhackrf.pc
|
||||||
|
DESTINATION lib/pkgconfig
|
||||||
|
)
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Create uninstall target
|
# Create uninstall target
|
||||||
########################################################################
|
########################################################################
|
||||||
|
11
host/libhackrf/libhackrf.pc.in
Normal file
11
host/libhackrf/libhackrf.pc.in
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
libdir=@libdir@
|
||||||
|
includedir=@includedir@
|
||||||
|
|
||||||
|
Name: HackRF Library
|
||||||
|
Description: C Utility Library
|
||||||
|
Version: @VERSION@
|
||||||
|
Cflags: -I${includedir}/ @HACKRF_PC_CFLAGS@
|
||||||
|
Libs: -L${libdir} -lhackrf
|
||||||
|
Libs.private: @HACKRF_PC_LIBS@
|
@ -894,7 +894,7 @@ static void* transfer_threadproc(void* arg)
|
|||||||
while( (device->streaming) && (do_exit == false) )
|
while( (device->streaming) && (do_exit == false) )
|
||||||
{
|
{
|
||||||
error = libusb_handle_events_timeout(g_libusb_context, &timeout);
|
error = libusb_handle_events_timeout(g_libusb_context, &timeout);
|
||||||
if( error != 0 )
|
if( (error != 0) && (error != LIBUSB_ERROR_INTERRUPTED) )
|
||||||
{
|
{
|
||||||
device->streaming = false;
|
device->streaming = false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user