[hamradio-commits] [dump1090] 06/389: Makefile: use pkgconfig instead of hardcoded paths

Matthew Ernisse mernisse-guest at moszumanska.debian.org
Wed Nov 5 00:19:34 UTC 2014


This is an automated email from the git hooks/post-receive script.

mernisse-guest pushed a commit to branch master
in repository dump1090.

commit c059d01febb684a5092a8f3647faa5ba0b60494c
Author: Steve Markgraf <steve at steve-m.de>
Date:   Sat Jan 5 19:55:15 2013 +0100

    Makefile: use pkgconfig instead of hardcoded paths
---
 Makefile | 11 ++++-------
 README   |  9 +--------
 2 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/Makefile b/Makefile
index b6ece6f..62c261f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,18 +1,15 @@
-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
-LIBS=-lusb-1.0 -lrtlsdr -lpthread -lm
+CFLAGS=-O2 -g -Wall -W `pkg-config --cflags librtlsdr`
+LIBS=`pkg-config --libs librtlsdr` -lpthread -lm
 CC=gcc
 PROGNAME=mode1090
 
 all: mode1090
 
 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
-	$(CC) -g -L$(LIBUSB_LIB_PATH) -L$(LIBRTLSDR_LIB_PATH) -o mode1090 mode1090.o $(LIBS)
+	$(CC) -g -o mode1090 mode1090.o $(LIBS)
 
 clean:
 	rm -f *.o mode1090
diff --git a/README b/README
index 3c3fd62..3da9e92 100644
--- a/README
+++ b/README
@@ -18,14 +18,7 @@ The main features are:
 Installation
 ---
 
-Edit the Makefile and set the following variables according to your system:
-
-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".
+Type "make".
 
 Normal usage
 ---

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/dump1090.git



More information about the pkg-hamradio-commits mailing list