libbladeRF: Changed default include path to include ../../common
This will make things slightly less of a pain in the butt for the time being. Someone remind me to fix this later.
This commit is contained in:
parent
ff772abcf4
commit
709d2d0fdc
2 changed files with 12 additions and 6 deletions
|
|
@ -28,11 +28,17 @@ STATIC_LIB := $(LIB_DIR)/$(LIB_NAME).a
|
|||
LIB_VER_FLAG := -DLIB_VERSION=\"v$(LIB_VER_MAJ).$(LIB_VER_MIN).$(LIB_VER_PAT)\"
|
||||
|
||||
# Path to driver interface headers
|
||||
DRIVER_HEADER_DIR ?= /usr/include
|
||||
# Changing default to make our lives easier for now...
|
||||
##DRIVER_HEADER_DIR ?= /usr/include
|
||||
DRIVER_HEADER_DIR ?= ../../common
|
||||
|
||||
CFLAGS := -Wall -Wextra -Wno-unused-parameter -fPIC -std=gnu99 $(LIB_VER_FLAG) \
|
||||
-I$(INC_DIR) -I$(DRIVER_HEADER_DIR)
|
||||
LDFLAGS :=
|
||||
|
||||
CFLAGS := -Wall -Wextra -Wno-unused-parameter \
|
||||
-fPIC \
|
||||
-std=gnu99 -D_GNU_SOURCE $(LIB_VER_FLAG) \
|
||||
-I$(INC_DIR) -I$(DRIVER_HEADER_DIR)
|
||||
|
||||
LDFLAGS := -fPIC
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -O0 -ggdb3
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include "bladeRF.h" /* Kernel module interface */
|
||||
|
||||
|
||||
|
||||
/* TODO Should there be a "big-lock" wrapped around accesses to a device */
|
||||
struct bladerf {
|
||||
int fd; /* File descriptor to associated driver device node */
|
||||
|
|
@ -17,7 +16,7 @@ struct bladerf {
|
|||
ssize_t bladerf_get_device_list(struct bladerf_devinfo **devices)
|
||||
{
|
||||
struct bladerf_devinfo *ret;
|
||||
const size_t num_devices = 3; /* Initial guess */
|
||||
const size_t num_devices = 3; /* Initial guess. Realloc as neccessary */
|
||||
|
||||
ret = calloc(num_devices, sizeof(*ret));
|
||||
if (!ret) {
|
||||
|
|
@ -50,6 +49,7 @@ struct bladerf * bladerf_open(const char *dev_path)
|
|||
return ret;
|
||||
|
||||
/* Test that this device is actually a bladeRF */
|
||||
return ret;
|
||||
}
|
||||
|
||||
void bladerf_close(struct bladerf *dev)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue