File: Makefile

package info (click to toggle)
pmdk 1.13.1-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 28,944 kB
  • sloc: ansic: 126,815; sh: 21,543; cpp: 9,413; python: 5,893; makefile: 3,119; perl: 2,294; pascal: 1,442
file content (21 lines) | stat: -rw-r--r-- 569 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018, Intel Corporation

check_package = $(shell pkg-config $(1) && echo y || echo n)

HAS_LIBPMEMOBJ := $(call check_package, libpmemobj --atleast-version $(LIBPMEMOBJ_MIN_VERSION) --print-errors)

LIBS += $(shell pkg-config --libs libpmemobj)
CFLAGS += $(shell pkg-config --cflags libpmemobj)

ifeq ($(HAS_LIBPMEMOBJ),n)
$(error libpmemobj(version >= $(LIBPMEMOBJ_MIN_VERSION)) is missing)
endif

test_package: test_package.c
	$(CC) test_package.c $(LIBS) $(CFLAGS) -o $@

clean:
	rm -f test_package

.PHONY: clean