2013-05-24 22:24:16 +02:00
|
|
|
PROGNAME=dump1090
|
|
|
|
|
2016-09-16 18:16:28 +02:00
|
|
|
CC=gcc -std=c1x
|
|
|
|
CPPFLAGS += -DMODES_DUMP1090_VERSION=\"$(DUMP1090_VERSION)\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\"
|
2015-01-22 14:19:15 +01:00
|
|
|
|
2016-09-16 18:16:28 +02:00
|
|
|
ifneq ($(RTLSDR_PREFIX),"")
|
|
|
|
CPPFLAGS += -I$(RTLSDR_PREFIX)/include
|
|
|
|
LDFLAGS += -L$(RTLSDR_PREFIX)/lib
|
2013-05-24 22:24:16 +02:00
|
|
|
endif
|
|
|
|
|
2016-09-16 18:16:28 +02:00
|
|
|
ifneq ($(HTMLPATH),"")
|
|
|
|
CPPFLAGS += -DHTMLPATH=\"$(HTMLPATH)\"
|
2016-03-02 18:32:53 +01:00
|
|
|
endif
|
2013-05-24 22:24:16 +02:00
|
|
|
|
2016-09-16 18:16:28 +02:00
|
|
|
CFLAGS += -O2 -g -Wall -Werror -W -D_DEFAULT_SOURCE
|
|
|
|
LIBS = -lpthread -lm -lrt
|
2015-09-03 05:41:00 +02:00
|
|
|
|
2016-09-16 18:16:28 +02:00
|
|
|
ifeq ($(STATIC), yes)
|
|
|
|
LIBS_RTLSDR = -Wl,-Bstatic -lrtlsdr -Wl,-Bdynamic -lusb-1.0
|
|
|
|
else
|
|
|
|
LIBS_RTLSDR = -lrtlsdr -lusb-1.0
|
2015-09-03 05:41:00 +02:00
|
|
|
endif
|
|
|
|
|
2013-10-07 11:59:10 +02:00
|
|
|
all: dump1090 view1090
|
2013-01-05 13:52:25 +01:00
|
|
|
|
2015-02-08 18:58:46 +01:00
|
|
|
%.o: %.c *.h
|
2016-09-16 18:16:28 +02:00
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
|
2015-06-26 18:49:21 +02:00
|
|
|
|
2016-05-31 13:23:58 +02:00
|
|
|
dump1090: dump1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o crc.o demod_2400.o stats.o cpr.o icao_filter.o track.o util.o convert.o $(COMPAT)
|
2016-09-16 18:16:28 +02:00
|
|
|
$(CC) -g -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBS_RTLSDR)
|
2013-01-05 13:52:25 +01:00
|
|
|
|
2015-09-07 13:58:49 +02:00
|
|
|
view1090: view1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o crc.o stats.o cpr.o icao_filter.o track.o util.o $(COMPAT)
|
2016-09-16 18:16:28 +02:00
|
|
|
$(CC) -g -o $@ $^ $(LDFLAGS) $(LIBS)
|
Implement a remote interactive screen
No changes to dump1090, (except the version number)
Include a sample Linux batch start file called dump1090.sh for use when
running dump1090 headless. This file needs to be copied to the
/etc/init.d/ subdirectory on your raspberry pi, and marked as
executable. Then when you re-start your RPi, dump1090 will start-up
auto-magically and run as a sort of server to allow both local and
remote connection to it's various internet ports.
Modified the Makefile to build a new headless helper application called
view1090
Added view1090. This is an executable that allows you to connect to
dump1090 when it is running and 'see' the interactive screen display.
The default is to try and connect to dump1090 on IP address 127.0.0.1
port 30005. This should work if you are running on the same RPi as
dump1090 and using the default dump1090 port settings. However, if
you're running on a different machine you will have to specify the IP
address of the RPi running dump1090 using the --net-bo-ipaddr switch.
Something like "view1090 --net-bo-ipaddr 192.168.2.65" . You may also
have to sudo it, depending on your privilige settings.
I've also compiled view1090 as a Wiin32 exe, so you should be able to
run it under any 32 bit version of Microsoft Windows - i.e. Win95, Win
2K, Win XP, Win 7 etc. It may work on Win 8 and 64 bit Windows, but I
haven't tried it. The Win32 version is compiled from the same source, so
takes all the same command line switches.
2013-09-24 19:37:54 +02:00
|
|
|
|
2015-09-07 13:58:49 +02:00
|
|
|
faup1090: faup1090.o anet.o mode_ac.o mode_s.o net_io.o crc.o stats.o cpr.o icao_filter.o track.o util.o $(COMPAT)
|
2016-09-16 18:16:28 +02:00
|
|
|
$(CC) -g -o $@ $^ $(LDFLAGS) $(LIBS)
|
2015-06-26 18:54:23 +02:00
|
|
|
|
2013-01-05 13:52:25 +01:00
|
|
|
clean:
|
2015-09-03 05:41:00 +02:00
|
|
|
rm -f *.o compat/clock_gettime/*.o compat/clock_nanosleep/*.o dump1090 view1090 faup1090 cprtests crctests
|
2015-01-20 19:41:44 +01:00
|
|
|
|
|
|
|
test: cprtests
|
2015-02-19 13:03:08 +01:00
|
|
|
./cprtests
|
2015-01-20 19:41:44 +01:00
|
|
|
|
|
|
|
cprtests: cpr.o cprtests.o
|
2016-09-16 18:16:28 +02:00
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -g -o $@ $^ -lm
|
2015-01-21 00:04:05 +01:00
|
|
|
|
|
|
|
crctests: crc.c crc.h
|
2016-09-16 18:16:28 +02:00
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -g -DCRCDEBUG -o $@ $<
|