6997715fed
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.
28 lines
646 B
Makefile
28 lines
646 B
Makefile
#
|
|
# 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
|
|
|
|
CFLAGS=-O2 -g -Wall -W `pkg-config --cflags librtlsdr`
|
|
LIBS=`pkg-config --libs librtlsdr` -lpthread -lm
|
|
CC=gcc
|
|
|
|
|
|
all: dump1090
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) $(EXTRACFLAGS) -c $<
|
|
|
|
dump1090: dump1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o
|
|
$(CC) -g -o dump1090 dump1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o $(LIBS)
|
|
|
|
clean:
|
|
rm -f *.o dump1090
|