Skip to content

Commit

Permalink
Add libs to LDLIBS and leave LDFLAGS untouched. $(shell ) only evalua…
Browse files Browse the repository at this point in the history
…tes once.
  • Loading branch information
xmw committed Mar 10, 2015
1 parent f43777b commit 45856db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CFLAGS?=-O2 -g -Wall -W `pkg-config --cflags librtlsdr`
LDFLAGS?=`pkg-config --libs librtlsdr` -lpthread -lm
CFLAGS?=-O2 -g -Wall -W $(shell pkg-config --cflags librtlsdr)
LDLIBS+=$(shell pkg-config --libs librtlsdr) -lpthread -lm
CC?=gcc
PROGNAME=dump1090

Expand All @@ -9,7 +9,7 @@ all: dump1090
$(CC) $(CFLAGS) -c $<

dump1090: dump1090.o anet.o
$(CC) -g -o dump1090 dump1090.o anet.o $(LDFLAGS)
$(CC) -g -o dump1090 dump1090.o anet.o $(LDFLAGS) $(LDLIBS)

clean:
rm -f *.o dump1090

0 comments on commit 45856db

Please sign in to comment.