From bdff0e2faab98b13f9d54bf489ea537ca5e75d6e Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 11 Dec 2011 13:41:16 +0100 Subject: use pkg-config instead of hardcoding compiler options Signed-off-by: Florian Pritz --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile') 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 "" $< $@ -- cgit v1.2.3-24-g4f1b