From d6405ddefd81603af6544816e567f9ea76666a3b Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Mon, 26 Jul 2021 20:25:35 +0800 Subject: [PATCH] Ignore bogus -I/ from librtlsdr pkgconfig --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 38414eb..a85d154 100644 --- a/Makefile +++ b/Makefile @@ -107,8 +107,11 @@ ifeq ($(RTLSDR), yes) # some packaged .pc files are massively broken, try to handle it # FreeBSD's librtlsdr.pc includes -std=gnu89 in cflags + # some linux librtlsdr packages return a bare -I/ with no path in --cflags RTLSDR_CFLAGS := $(shell pkg-config --cflags librtlsdr) - CFLAGS += $(filter-out -std=%,$(RTLSDR_CFLAGS)) + RTLSDR_CFLAGS := $(filter-out -std=%,$(RTLSDR_CFLAGS)) + RTLSDR_CFLAGS := $(filter-out -I/,$(RTLSDR_CFLAGS)) + CFLAGS += $(RTLSDR_CFLAGS) # some linux librtlsdr packages return a bare -L with no path in --libs # which horribly confuses things because it eats the next option on the command line