forked from CTassisF/dump1090_mr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefaup1090
More file actions
60 lines (45 loc) · 1.45 KB
/
makefaup1090
File metadata and controls
60 lines (45 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#
# 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=faup1090
DUMP1090=dump1090
include /usr/share/dpkg/buildflags.mk
PREFIX=/usr
ifdef PREFIX
BINDIR=$(PREFIX)/bin
SHAREDIR=$(PREFIX)/share/$(DUMP1090)
HTMLDIR=$(SHAREDIR)/public_html
EXTRACFLAGS=-DHTMLPATH=\"$(HTMLDIR)\"
endif
#CFLAGS=-O2 -g -Wall -W `pkg-config --cflags librtlsdr`
#CFLAGS+=-Wall -W `pkg-config --cflags librtlsdr`
CFLAGS+=-Wall -W
#LIBS=`pkg-config --libs librtlsdr` -lpthread -lm
LIBS=-lpthread -lm
CC=gcc
info:
@echo "'make all' compile faup1090"
@echo "'make install-faup1090' install faup1090"
@echo "'make install-dump1090' install dump1090"
@echo "'make install-autostart' make dump1090 autostart upon boot"
@echo "'make full-install' all of the above"
all: faup1090
%.o: %.c
$(CC) $(CFLAGS) $(EXTRACFLAGS) -c $<
faup1090.o: faup1090.c faup1090.h
faup1090: faup1090.o
faup1090: faup1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o
$(CC) $(LDFLAGS) -g -o faup1090 faup1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o $(LIBS)
clean:
rm -f *.o faup1090
install-faup1090: faup1090
install $(PROGNAME) $(BINDIR)
install-dump1090:
install $(DUMP1090) $(BINDIR)
mkdir -p $(HTMLDIR)
cp -R public_html $(SHAREDIR)
install-autostart:
install fadump1090.sh /etc/init.d/
update-rc.d fadump1090.sh defaults
full-install: install-faup1090 install-dump1090 install-autostart