Rename CLI to elfucli
[centaur.git] / Makefile
index 32dbe7c1d595e05e109c4d381028898a5d8aa784..fc7c567fe1940daaec46a038d9702dc37b5c812b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
-PROJ := elfedit
+PROJ := elfucli
+
+LIBRARIES := libelf
 
 BUILDDIR   := build
 INCLUDEDIR := include
@@ -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))