2013-05-24 22:24:16 +02:00
|
|
|
#
|
|
|
|
# When building a package or installing otherwise in the system, make
|
|
|
|
# sure that the variable PREFIX is defined, e.g. make PREFIX=/usr/local
|
|
|
|
#
|
|
|
|
PROGNAME=dump1090
|
|
|
|
|
2015-01-22 14:19:15 +01:00
|
|
|
ifndef DUMP1090_VERSION
|
|
|
|
DUMP1090_VERSION=$(shell git describe --tags)
|
|
|
|
endif
|
|
|
|
|
2013-05-24 22:24:16 +02:00
|
|
|
ifdef PREFIX
|
|
|
|
BINDIR=$(PREFIX)/bin
|
|
|
|
SHAREDIR=$(PREFIX)/share/$(PROGNAME)
|
|
|
|
EXTRACFLAGS=-DHTMLPATH=\"$(SHAREDIR)\"
|
|
|
|
endif
|
|
|
|
|
2015-01-22 14:19:15 +01:00
|
|
|
CPPFLAGS+=-DMODES_DUMP1090_VERSION=\"$(DUMP1090_VERSION)\"
|
2015-01-04 21:08:33 +01:00
|
|
|
CFLAGS+=-O2 -g -Wall -Werror -W `pkg-config --cflags librtlsdr`
|
2014-12-06 20:39:48 +01:00
|
|
|
LIBS=-lpthread -lm -lrt
|
2014-12-05 20:34:40 +01:00
|
|
|
LIBS_RTL=`pkg-config --libs librtlsdr`
|
2013-01-05 13:52:25 +01:00
|
|
|
CC=gcc
|
2013-05-24 22:24:16 +02:00
|
|
|
|
2013-10-07 11:59:10 +02:00
|
|
|
all: dump1090 view1090
|
2013-01-05 13:52:25 +01:00
|
|
|
|
2015-01-12 19:50:01 +01:00
|
|
|
%.o: %.c dump1090.h
|
2015-01-20 19:41:44 +01:00
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRACFLAGS) -c $< -o $@
|
2013-01-05 13:52:25 +01:00
|
|
|
|
2015-02-08 15:27:03 +01:00
|
|
|
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
|
2015-01-20 19:41:44 +01:00
|
|
|
$(CC) -g -o $@ $^ $(LIBS) $(LIBS_RTL) $(LDFLAGS)
|
2013-01-05 13:52:25 +01:00
|
|
|
|
2015-02-08 15:27:03 +01: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
|
2015-01-20 19:41:44 +01:00
|
|
|
$(CC) -g -o $@ $^ $(LIBS) $(LDFLAGS)
|
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
|
|
|
|
2013-01-05 13:52:25 +01:00
|
|
|
clean:
|
2015-01-21 00:04:05 +01:00
|
|
|
rm -f *.o dump1090 view1090 cprtests crctests
|
2015-01-20 19:41:44 +01:00
|
|
|
|
|
|
|
test: cprtests
|
|
|
|
$(PWD)/cprtests
|
|
|
|
|
|
|
|
cprtests: cpr.o cprtests.o
|
2015-01-21 00:04:05 +01:00
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRACFLAGS) -g -o $@ $^ -lm
|
|
|
|
|
|
|
|
crctests: crc.c crc.h
|
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRACFLAGS) -g -DCRCDEBUG -o $@ $<
|