-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
12,787 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
This version of dump1090 is licensed under the GPL, v2 or later. | ||
|
||
Please see the individual source files and the file COPYING | ||
for full copyright and license details. | ||
|
||
If you need to use dump1090 in a way that is incompatible with | ||
the GPL, please contact Oliver Jowett <[email protected]> | ||
to discuss your requirements. | ||
|
||
The source code incorporates work that was released under a | ||
BSD-style license, reproduced below. For unmodified versions | ||
of the original work that may be used under the terms of that | ||
license, please see https://github.com/antirez/dump1090 and | ||
https://github.com/MalcolmRobb/dump1090. | ||
|
||
// Copyright (C) 2012 by Salvatore Sanfilippo <[email protected]> | ||
// | ||
// All rights reserved. | ||
// | ||
// Redistribution and use in source and binary forms, with or without | ||
// modification, are permitted provided that the following conditions are | ||
// met: | ||
// | ||
// * Redistributions of source code must retain the above copyright | ||
// notice, this list of conditions and the following disclaimer. | ||
// | ||
// * Redistributions in binary form must reproduce the above copyright | ||
// notice, this list of conditions and the following disclaimer in the | ||
// documentation and/or other materials provided with the distribution. | ||
// | ||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# | ||
# 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 | ||
SDRPLAY=1 | ||
DUMP1090_VERSION="dump1090_mutability_sdrplay" | ||
|
||
|
||
ifndef DUMP1090_VERSION | ||
DUMP1090_VERSION=$(shell git describe --tags --match=v*) | ||
endif | ||
|
||
ifdef PREFIX | ||
BINDIR=$(PREFIX)/bin | ||
SHAREDIR=$(PREFIX)/share/$(PROGNAME) | ||
EXTRACFLAGS=-DHTMLPATH=\"$(SHAREDIR)\" | ||
endif | ||
|
||
ifdef SDRPLAY | ||
SDRPLAY_LIBS = | ||
SDRPLAY_CFLAGS= -DSDRPLAY -I./ | ||
endif | ||
|
||
CPPFLAGS+=-DMODES_DUMP1090_VERSION=\"$(DUMP1090_VERSION)\" | ||
CFLAGS+= -O3 -g -Wall -Werror -W -static | ||
#CFLAGS+= -g -Wall -Werror -W | ||
CFLAGS+=$(SDRPLAY_CFLAGS) | ||
LIBS= -L./ -lmir_sdr_api -lpthread -lm | ||
LIBS+=$(SDRPLAY_LIBS) | ||
LIBS_RTL=`pkg-config --libs librtlsdr` | ||
CC=gcc | ||
|
||
UNAME := $(shell uname) | ||
|
||
ifeq ($(UNAME), Linux) | ||
LIBS+=-lrt | ||
endif | ||
ifeq ($(UNAME), Darwin) | ||
# TODO: Putting GCC in C11 mode breaks things. | ||
CFLAGS+=-std=c11 | ||
COMPAT+=compat/clock_gettime/clock_gettime.o compat/clock_nanosleep/clock_nanosleep.o | ||
endif | ||
|
||
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 demod_8000.o stats.o cpr.o icao_filter.o track.o util.o convert.o $(COMPAT) dump1090.h | ||
$(CC) -g -o $@ $^ $(LIBS) $(LIBS_RTL) $(LDFLAGS) | ||
|
||
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) dump1090.h | ||
$(CC) -g -o $@ $^ $(LIBS) $(LDFLAGS) | ||
|
||
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) dump1090.h | ||
$(CC) -g -o $@ $^ $(LIBS) $(LDFLAGS) | ||
|
||
clean: | ||
rm -f *.o compat/clock_gettime/*.o compat/clock_nanosleep/*.o dump1090 view1090 faup1090 cprtests crctests | ||
|
||
test: cprtests | ||
./cprtests | ||
|
||
cprtests: cpr.o cprtests.o | ||
$(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRACFLAGS) -g -o $@ $^ -lm | ||
|
||
crctests: crc.c crc.h | ||
$(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRACFLAGS) -g -DCRCDEBUG -o $@ $< |
Oops, something went wrong.