Guess where unknown functions are in .rel.plt
[centaur.git] / Makefile
index 32dbe7c1d595e05e109c4d381028898a5d8aa784..41e8fe5a34ee5be4a53b272f363d20e1e0179d2e 100644 (file)
--- 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)) -I /usr/include/libelf
-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))