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
|
|
|
|
|
2013-01-05 19:55:15 +01:00
|
|
|
CFLAGS=-O2 -g -Wall -W `pkg-config --cflags librtlsdr`
|
|
|
|
LIBS=`pkg-config --libs librtlsdr` -lpthread -lm
|
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-01-05 19:57:09 +01:00
|
|
|
all: dump1090
|
2013-01-05 13:52:25 +01:00
|
|
|
|
2013-01-10 20:58:13 +01:00
|
|
|
%.o: %.c
|
2013-05-24 22:24:16 +02:00
|
|
|
$(CC) $(CFLAGS) $(EXTRACFLAGS) -c $<
|
2013-01-05 13:52:25 +01:00
|
|
|
|
2013-01-10 20:58:13 +01:00
|
|
|
dump1090: dump1090.o anet.o
|
|
|
|
$(CC) -g -o dump1090 dump1090.o anet.o $(LIBS)
|
2013-01-05 13:52:25 +01:00
|
|
|
|
|
|
|
clean:
|
2013-01-05 19:57:09 +01:00
|
|
|
rm -f *.o dump1090
|