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
|
|
|
|
|
|
|
|
ifdef PREFIX
|
|
|
|
BINDIR=$(PREFIX)/bin
|
|
|
|
SHAREDIR=$(PREFIX)/share/$(PROGNAME)
|
|
|
|
EXTRACFLAGS=-DHTMLPATH=\"$(SHAREDIR)\"
|
|
|
|
endif
|
|
|
|
|
2014-12-05 20:33:46 +01:00
|
|
|
CFLAGS+=-O2 -g -Wall -W `pkg-config --cflags librtlsdr`
|
2014-12-05 20:34:40 +01:00
|
|
|
LIBS=-lpthread -lm
|
|
|
|
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-01-05 13:52:25 +01:00
|
|
|
|
2013-10-07 11:59:10 +02:00
|
|
|
all: dump1090 view1090
|
2013-01-05 13:52:25 +01:00
|
|
|
|
2013-01-10 20:58:13 +01:00
|
|
|
%.o: %.c
|
2014-12-05 20:33:46 +01:00
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRACFLAGS) -c $<
|
2013-01-05 13:52:25 +01:00
|
|
|
|
Split into separate module files
Ok - this is likely to upset some people. Up until now, the vast
majority of the code has been in just one file - dump1090.c. This file
has grown so that it was approaching of 5000 lines long, and it was
becoming unmanagable. So I've split the file into several modules,
hopefully along fairly logical boundaries. The files are :
1) dump1090.c : Basically just the main() entry function, the help
function, the RTL dongle hardware interface, and a few orphan functions
that don't really fit anywhere else.
2) mode_s.c : This contains all the mode S / ADSB decoding functions.
3) mode_ac.c : This contains all the mode A & C decoding functions
4) interactive.c : This contains all the functions to maintain an
internal list of aircraft seen over the last period, and functions to
print them out to the local console.
5) net_io.c : This contains all the network input/output functions
allowing data to be passed in/out to/from other receivers, in formats
such as SBS-1/3, Beast, AVR and JavaScript.
Hopefully this should provide an easier way forward if/when more
functions are added.
2013-08-19 19:57:03 +02:00
|
|
|
dump1090: dump1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o
|
2014-12-05 20:34:40 +01:00
|
|
|
$(CC) -g -o dump1090 dump1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o $(LIBS) $(LIBS_RTL) $(LDFLAGS)
|
2013-01-05 13:52:25 +01:00
|
|
|
|
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
|
|
|
view1090: view1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o
|
2013-10-10 00:45:35 +02:00
|
|
|
$(CC) -g -o view1090 view1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.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:
|
2013-10-07 11:59:10 +02:00
|
|
|
rm -f *.o dump1090 view1090
|