Install dump1090 support files in a reasonable place
* Install dump1090 and faup1090 to /usr/bin (It's Linux-standard, not my first choice.) * Build dump1090 to expect HTML and Javascript files in /usr/share/dump1090/public_html * Make 'make -f makefaup1090 install' install the dump1090 HTML and Javscript files in the above directory. * With this build style dump1090 can be invoked from anywhere and it will find its files.
This commit is contained in:
parent
2b92b01194
commit
2be5074721
5
Makefile
5
Makefile
|
|
@ -6,10 +6,13 @@ PROGNAME=dump1090
|
||||||
|
|
||||||
include /usr/share/dpkg/buildflags.mk
|
include /usr/share/dpkg/buildflags.mk
|
||||||
|
|
||||||
|
PREFIX=/usr
|
||||||
|
|
||||||
ifdef PREFIX
|
ifdef PREFIX
|
||||||
BINDIR=$(PREFIX)/bin
|
BINDIR=$(PREFIX)/bin
|
||||||
SHAREDIR=$(PREFIX)/share/$(PROGNAME)
|
SHAREDIR=$(PREFIX)/share/$(PROGNAME)
|
||||||
EXTRACFLAGS=-DHTMLPATH=\"$(SHAREDIR)\"
|
HTMLDIR=$(SHAREDIR)/public_html
|
||||||
|
EXTRACFLAGS=-DHTMLPATH=\"$(HTMLDIR)\"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#CFLAGS=-O2 -g -Wall -W `pkg-config --cflags librtlsdr`
|
#CFLAGS=-O2 -g -Wall -W `pkg-config --cflags librtlsdr`
|
||||||
|
|
|
||||||
15
makefaup1090
15
makefaup1090
|
|
@ -3,13 +3,17 @@
|
||||||
# sure that the variable PREFIX is defined, e.g. make PREFIX=/usr/local
|
# sure that the variable PREFIX is defined, e.g. make PREFIX=/usr/local
|
||||||
#
|
#
|
||||||
PROGNAME=faup1090
|
PROGNAME=faup1090
|
||||||
|
DUMP1090=dump1090
|
||||||
|
|
||||||
include /usr/share/dpkg/buildflags.mk
|
include /usr/share/dpkg/buildflags.mk
|
||||||
|
|
||||||
|
PREFIX=/usr
|
||||||
|
|
||||||
ifdef PREFIX
|
ifdef PREFIX
|
||||||
BINDIR=$(PREFIX)/bin
|
BINDIR=$(PREFIX)/bin
|
||||||
SHAREDIR=$(PREFIX)/share/$(PROGNAME)
|
SHAREDIR=$(PREFIX)/share/$(DUMP1090)
|
||||||
EXTRACFLAGS=-DHTMLPATH=\"$(SHAREDIR)\"
|
HTMLDIR=$(SHAREDIR)/public_html
|
||||||
|
EXTRACFLAGS=-DHTMLPATH=\"$(HTMLDIR)\"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#CFLAGS=-O2 -g -Wall -W `pkg-config --cflags librtlsdr`
|
#CFLAGS=-O2 -g -Wall -W `pkg-config --cflags librtlsdr`
|
||||||
|
|
@ -32,7 +36,10 @@ faup1090: faup1090.o
|
||||||
faup1090: faup1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.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)
|
$(CC) $(LDFLAGS) -g -o faup1090 faup1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o $(LIBS)
|
||||||
|
|
||||||
install: faup1090
|
|
||||||
install faup1090 /usr/bin/faup1090
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o faup1090
|
rm -f *.o faup1090
|
||||||
|
|
||||||
|
install:
|
||||||
|
install $(PROGNAME) $(DUMP1090) $(BINDIR)
|
||||||
|
mkdir -p $(HTMLDIR)
|
||||||
|
cp -R public_html $(SHAREDIR)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue