Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use PKG_CONFIG variables for pkg-config #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ UDEVLIBDIR=/lib/udev
DRACUTLIBDIR=/lib/dracut
INSTALL=install
CFLAGS+=-O2 -Wall -g
PKG_CONFIG=pkg-config

all: make-bcache probe-bcache bcache-super-show bcache-register

Expand All @@ -20,13 +21,13 @@ install: make-bcache probe-bcache bcache-super-show
clean:
$(RM) -f make-bcache probe-bcache bcache-super-show bcache-test -- *.o

bcache-test: LDLIBS += `pkg-config --libs openssl` -lm
make-bcache: LDLIBS += `pkg-config --libs uuid blkid`
make-bcache: CFLAGS += `pkg-config --cflags uuid blkid`
bcache-test: LDLIBS += `$(PKG_CONFIG) --libs openssl` -lm
make-bcache: LDLIBS += `$(PKG_CONFIG) --libs uuid blkid`
make-bcache: CFLAGS += `$(PKG_CONFIG) --cflags uuid blkid`
make-bcache: bcache.o
probe-bcache: LDLIBS += `pkg-config --libs uuid blkid`
probe-bcache: CFLAGS += `pkg-config --cflags uuid blkid`
bcache-super-show: LDLIBS += `pkg-config --libs uuid`
probe-bcache: LDLIBS += `$(PKG_CONFIG) --libs uuid blkid`
probe-bcache: CFLAGS += `$(PKG_CONFIG) --cflags uuid blkid`
bcache-super-show: LDLIBS += `$(PKG_CONFIG) --libs uuid`
bcache-super-show: CFLAGS += -std=gnu99
bcache-super-show: bcache.o
bcache-register: bcache-register.o