From: norly Date: Tue, 12 Feb 2013 15:44:48 +0000 (+0000) Subject: Use pkg-config X-Git-Url: https://git.enpas.org/?p=centaur.git;a=commitdiff_plain;h=030aeb591f867263f734ca2e232c45dc98f3ec50 Use pkg-config --- diff --git a/Makefile b/Makefile index b62b9ab..41e8fe5 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ PROJ := elfedit +LIBRARIES := libelf + BUILDDIR := build INCLUDEDIR := include SRCDIR := src @@ -11,9 +13,9 @@ HEADERS += $(shell find $(SRCDIR)/ -iname "*.h") SOURCES := $(shell find $(SRCDIR)/ -iname "*.c") OBJS := $(patsubst %.c, $(BUILDDIR)/%.o, $(SOURCES)) -INCLUDES := $(patsubst %, -I%, $(INCLUDEDIR) $(SRCDIR)) -CFLAGS := -g -Wall -LDFLAGS := -lelf +INCLUDES := $(patsubst %, -I%, $(INCLUDEDIR) $(SRCDIR)) $(shell pkg-config --cflags-only-I $(LIBRARIES)) +CFLAGS := -g -Wall $(shell pkg-config --cflags-only-other $(LIBRARIES)) +LDFLAGS := $(shell pkg-config --libs $(LIBRARIES))