summaryrefslogtreecommitdiffstats
path: root/lib/src.mk
blob: 6ec6928bdafabcead66394ba3f42fe234007b49b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Copyright 2022 Alejandro Colomar <alx@kernel.org>
# SPDX-License-Identifier:  LGPL-3.0-or-later WITH LGPL-3.0-linking-exception


ifndef LIB_SRC_MK_
LIB_SRC_MK_ := 1


include $(srcdir)/lib/cmd.mk
include $(srcdir)/lib/version.mk


INCLUDEDIR  := $(srcdir)/include
SRCDIR      := $(srcdir)/src
LIBDIR      := $(srcdir)/lib
DATAROOTDIR := $(srcdir)/share
PCDIR       := $(DATAROOTDIR)/pkgconfig
MANDIR      := $(DATAROOTDIR)/man
TESTSDIR    := $(DATAROOTDIR)/tests/$(libname)


mk := $(srcdir)/Makefile $(shell $(FIND) $(LIBDIR) -type f | $(GREP) '\.mk$$')


TU_h    := $(shell $(FIND) $(INCLUDEDIR) -type f | $(GREP) '\.h$$' | $(SORT))
TU_c    := $(shell $(FIND) $(SRCDIR)     -type f | $(GREP) '\.c$$' | $(SORT))
LIB_pc  := $(PCDIR)/$(libname)-uninstalled.pc
MAN_man := $(shell $(FIND) $(MANDIR)     -type f | $(GREP) '\.[1-9]$$' | $(SORT))


TU_DIRS := $(filter-out $(INCLUDEDIR),$(shell $(FIND) $(INCLUDEDIR) -type d | $(SORT)))


endif  # include guard