diff --git a/Makefile b/Makefile index 3106403..bc69f67 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ EXTRACFLAGS=-DHTMLPATH=\"$(SHAREDIR)\" endif CPPFLAGS+=-DMODES_DUMP1090_VERSION=\"$(DUMP1090_VERSION)\" -CFLAGS+=-O2 -g -Wall -Werror -W `pkg-config --cflags librtlsdr` +CFLAGS+=-O2 -g -Wall -Werror -W LIBS=-lpthread -lm -lrt LIBS_RTL=`pkg-config --libs librtlsdr` CC=gcc @@ -25,6 +25,8 @@ all: dump1090 view1090 %.o: %.c *.h $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRACFLAGS) -c $< -o $@ +dump1090.o: CFLAGS += `pkg-config --cflags librtlsdr` + dump1090: dump1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o crc.o demod_2000.o demod_2400.o stats.o cpr.o icao_filter.o track.o util.o convert.o $(CC) -g -o $@ $^ $(LIBS) $(LIBS_RTL) $(LDFLAGS) diff --git a/dump1090.c b/dump1090.c index 781fc2d..756ba7a 100644 --- a/dump1090.c +++ b/dump1090.c @@ -49,6 +49,8 @@ #include "dump1090.h" +#include + #include #include