summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-12-11 13:41:16 +0100
committerFlorian Pritz <bluewind@xinu.at>2011-12-11 13:41:16 +0100
commitbdff0e2faab98b13f9d54bf489ea537ca5e75d6e (patch)
tree401f688e583a6de6fb1e36f5ddc82f5a892b3bfa /Makefile
parent301004a70fc000f758913db3272b846a94551d23 (diff)
use pkg-config instead of hardcoding compiler options
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 2ffeeb5..07857fc 100644
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,9 @@ VERSION:=$(shell git describe --dirty | sed 's/^v//; s/-/./g')
MANDIR=/usr/share/man
BINDIR=/usr/bin
LIBDIR=/usr/lib
-CC=gcc
+CC=cc
CFLAGS?=-O2 -std=c99 -Wall -Wextra -pedantic
+LIBCURL:=$(shell pkg-config --silence-errors --libs --cflags libcurl)
all: fb.1 fb fb-helper
@@ -13,7 +14,7 @@ fb: fb.in
chmod 755 $@
fb-helper: fb-helper.c
- $(CC) $(CFLAGS) -lcurl -DVERSION=\"$(VERSION)\" -o $@ $<
+ $(CC) $(CFLAGS) $(LIBCURL) -DVERSION=\"$(VERSION)\" -o $@ $<
fb.1: fb.pod
pod2man -c "" $< $@