Avoid librtlsdr dependency for utilities that don't use it.
Tne only place that really needs the rtlsdr headers/libs is dump1090.c itself. There is a dependency on rtlsdr_dev_t in the shared Modes struct in dump1090.h, but this is a pointer type so we can just use a dummy struct definition there to avoid the header dependency. This lets us build faup1090 (for the piaware package) without needing a useless librtlsdr-dev build-time dependency.
This commit is contained in:
parent
069ebf37c7
commit
9aa60c46ef
|
|
@ -29,6 +29,7 @@
|
||||||
//
|
//
|
||||||
#include "coaa.h"
|
#include "coaa.h"
|
||||||
#include "dump1090.h"
|
#include "dump1090.h"
|
||||||
|
#include "rtl-sdr.h"
|
||||||
//
|
//
|
||||||
// ============================= Utility functions ==========================
|
// ============================= Utility functions ==========================
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -57,11 +57,9 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include "rtl-sdr.h"
|
|
||||||
#include "anet.h"
|
#include "anet.h"
|
||||||
#else
|
#else
|
||||||
#include "winstubs.h" //Put everything Windows specific in here
|
#include "winstubs.h" //Put everything Windows specific in here
|
||||||
#include "rtl-sdr.h"
|
|
||||||
#include "anet.h"
|
#include "anet.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -187,6 +185,10 @@
|
||||||
|
|
||||||
//======================== structure declarations =========================
|
//======================== structure declarations =========================
|
||||||
|
|
||||||
|
// forward declaration of RTL-SDR device struct to avoid a dependency
|
||||||
|
// on RTL-SDR for those utils that don't actually use it
|
||||||
|
typedef struct rtlsdr_dev rtlsdr_dev_t;
|
||||||
|
|
||||||
// Structure used to describe a networking client
|
// Structure used to describe a networking client
|
||||||
struct client {
|
struct client {
|
||||||
struct client* next; // Pointer to next client
|
struct client* next; // Pointer to next client
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ SHAREDIR=$(PREFIX)/share/$(PROGNAME)
|
||||||
EXTRACFLAGS=-DHTMLPATH=\"$(SHAREDIR)\"
|
EXTRACFLAGS=-DHTMLPATH=\"$(SHAREDIR)\"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS=-O2 -g -Wall -W `pkg-config --cflags librtlsdr`
|
CFLAGS=-O2 -g -Wall -W
|
||||||
LIBS=`pkg-config --libs librtlsdr` -lpthread -lm
|
LIBS=-lpthread -lm
|
||||||
CC=gcc
|
CC=gcc
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ SHAREDIR=$(PREFIX)/share/$(PROGNAME)
|
||||||
EXTRACFLAGS=-DHTMLPATH=\"$(SHAREDIR)\"
|
EXTRACFLAGS=-DHTMLPATH=\"$(SHAREDIR)\"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS=-O2 -g -Wall -W `pkg-config --cflags librtlsdr`
|
CFLAGS=-O2 -g -Wall -W
|
||||||
LIBS=`pkg-config --libs librtlsdr` -lpthread -lm
|
LIBS=-lpthread -lm
|
||||||
CC=gcc
|
CC=gcc
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,6 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include "rtl-sdr.h"
|
|
||||||
#include "anet.h"
|
#include "anet.h"
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,6 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include "rtl-sdr.h"
|
|
||||||
#include "anet.h"
|
#include "anet.h"
|
||||||
#else
|
#else
|
||||||
#include "winstubs.h" //Put everything Windows specific in here
|
#include "winstubs.h" //Put everything Windows specific in here
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue