fix Makefile.am to use pkg-config

This commit is contained in:
Kent Overstreet 2014-03-20 14:28:57 -07:00
parent 214dd0cb2d
commit 93c17b5f5f
3 changed files with 27 additions and 7 deletions

View File

@ -2,7 +2,7 @@
AUTOMAKE_OPTIONS=subdir-objects
PREFIX=/usr
AM_CFLAGS=-O2 -Wall -g
AM_CFLAGS=-O2 -Wall -g -std=gnu99
bin_PROGRAMS=make-bcache \
@ -12,18 +12,22 @@ bin_PROGRAMS=make-bcache \
noinst_PROGRAMS=bcache-test
make_bcache_SOURCES=make-bcache.c bcache.c
make_bcache_LDADD= -lm -lssl -lcrypto -luuid
make_bcache_LDFLAGS=`pkg-config --libs uuid blkid`
make_bcache_CFLAGS=$(AM_CFLAGS) `pkg-config --cflags uuid blkid`
probe_bcache_SOURCES=probe-bcache.c bcache.c
probe_bcache_LDADD=-luuid
probe_bcache_LDFLAGS=`pkg-config --libs uuid blkid`
probe_bcache_CFLAGS=$(AM_CFLAGS) `pkg-config --cflags uuid blkid`
bcache_super_show_SOURCES=bcache-super-show.c bcache.c
bcache_super_show_LDADD=-luuid
bcache_super_show_LDFLAGS=`pkg-config --libs uuid`
bcache_super_show_CFLAGS=$(AM_CFLAGS) `pkg-config --cflags uuid`
bcache_test_SOURCE=bcache-test.c
bcache_test_LDADD= -lm -lssl -lcrypto
bcache_test_LDFLAGS=-lm `pkg-config --libs openssl`
bcache_test_CFLAGS=$(AM_CFLAGS) `pkg-config --cflags openssl`
udevrule_DATA=61-bcache.rules
udevrule_DATA=69-bcache.rules
udevruledir=$(prefix)/lib/udev/rules.d
udevr_DATA=bcache-register

16
bcache-tools.spec Normal file
View File

@ -0,0 +1,16 @@
Summary: bcache-tools
Name: bcache-tools
Version: 0.1
Release: %{?release:%{release}}%{!?release:eng}
Source0: %{name}-%{version}.tar.gz
License: GPL
Group: tools
BuildRoot: %{_tmppath}/%{name}-root
Requires: libblkid1
BuildRequires: pkg-config libblkid-dev
%package dev
%description
%files

View File

@ -115,7 +115,7 @@ static const uint64_t crc_table[256] = {
0x9AFCE626CE85B507ULL
};
inline uint64_t crc64(const void *_data, size_t len)
uint64_t crc64(const void *_data, size_t len)
{
uint64_t crc = 0xFFFFFFFFFFFFFFFFULL;
const unsigned char *data = _data;