projects
/
centaur.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use pkg-config
[centaur.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index b62b9ab7582ca6af70f0a73df2d214b412ad8cce..41e8fe5a34ee5be4a53b272f363d20e1e0179d2e 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,5
+1,7
@@
PROJ := elfedit
PROJ := elfedit
+LIBRARIES := libelf
+
BUILDDIR := build
INCLUDEDIR := include
SRCDIR := src
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))
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))