Makefile: use pkgconfig instead of hardcoded paths
This commit is contained in:
parent
f01670e425
commit
c059d01feb
11
Makefile
11
Makefile
|
@ -1,18 +1,15 @@
|
||||||
LIBUSB_INC_PATH=/usr/local/Cellar/libusb/1.0.9/include/libusb-1.0
|
CFLAGS=-O2 -g -Wall -W `pkg-config --cflags librtlsdr`
|
||||||
LIBUSB_LIB_PATH=/usr/local/Cellar/libusb/1.0.9/lib
|
LIBS=`pkg-config --libs librtlsdr` -lpthread -lm
|
||||||
LIBRTLSDR_INC_PATH=/usr/local/Cellar/rtlsdr/HEAD/include
|
|
||||||
LIBRTLSDR_LIB_PATH=/usr/local/Cellar/rtlsdr/HEAD/lib
|
|
||||||
LIBS=-lusb-1.0 -lrtlsdr -lpthread -lm
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
PROGNAME=mode1090
|
PROGNAME=mode1090
|
||||||
|
|
||||||
all: mode1090
|
all: mode1090
|
||||||
|
|
||||||
mode1090.o: mode1090.c
|
mode1090.o: mode1090.c
|
||||||
$(CC) -O2 -g -Wall -W -I$(LIBUSB_INC_PATH) -I$(LIBRTLSDR_INC_PATH) mode1090.c -c -o mode1090.o
|
$(CC) $(CFLAGS) mode1090.c -c -o mode1090.o
|
||||||
|
|
||||||
mode1090: mode1090.o
|
mode1090: mode1090.o
|
||||||
$(CC) -g -L$(LIBUSB_LIB_PATH) -L$(LIBRTLSDR_LIB_PATH) -o mode1090 mode1090.o $(LIBS)
|
$(CC) -g -o mode1090 mode1090.o $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o mode1090
|
rm -f *.o mode1090
|
||||||
|
|
9
README
9
README
|
@ -18,14 +18,7 @@ The main features are:
|
||||||
Installation
|
Installation
|
||||||
---
|
---
|
||||||
|
|
||||||
Edit the Makefile and set the following variables according to your system:
|
Type "make".
|
||||||
|
|
||||||
LIBUSB_INC_PATH=/usr/local/Cellar/libusb/1.0.9/include/libusb-1.0
|
|
||||||
LIBUSB_LIB_PATH=/usr/local/Cellar/libusb/1.0.9/lib
|
|
||||||
LIBRTLSDR_INC_PATH=/usr/local/Cellar/rtlsdr/HEAD/include
|
|
||||||
LIBRTLSDR_LIB_PATH=/usr/local/Cellar/rtlsdr/HEAD/lib
|
|
||||||
|
|
||||||
Then save the modified Makefile and type "make".
|
|
||||||
|
|
||||||
Normal usage
|
Normal usage
|
||||||
---
|
---
|
||||||
|
|
Loading…
Reference in a new issue