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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
Name
Install - instructions for installing the library into the system
Synopsis
sudo make [-j] install [V=1] [prefix=...] [DESTDIR=...] [...]
Description
(a) Use a package manager
If you want to install the library into your system, consiter installing
it through your package manager from an official release, instead of
installing it from this repository. This repository contains the
upstream library, but using an official release and the system package
manager offers important benefits.
If you prefer to install the library from this repository, maybe because
your system doesn't ship it, or ships a too-old version, consider
packaging it yourself, or updating the official package. See the
<RELEASE> file, and also talk to the maintainer of the package in your
distribution.
(b) Install manually from source
If you are contributing to the project, or can't use a package for any
reasons, you may want to install the library from this repository.
In most cases, you just want to install the entire library. To install
all the files in the default system directories (per GNU guidelines),
use:
$ make # optional
$ sudo make install
You can install in parallel if you want. A few features can be used to
tweak the install:
Directory variables
To check about all of the directory variables available, compare
the GNU Coding Standards with the Makefile and the helper makefiles
(see the sections "Standards" and "Files" below). The most common
ones that you may use are:
- DESTDIR
- prefix
Command Variables
Some commands use flags. A command named 'command' will have a
variable COMMAND to specify an alternative command name. To append
flags to the default ones, set the variable EXTRA_COMMANDFLAGS. To
overwrite the flags, set the variable COMMANDFLAGS.
Verbose
Use V=1 for a more verbose output from the makefiles:
$ sudo make install V=1
Uninstall
TODO
Targets
There are targets for more granular control, such as 'install-dev'.
See the help to know all of them:
$ make help
Dependencies:
- Build-depends:
- Generic:
- cd(1)
- cp(1)
- cut(1)
- echo(1)
- find(1)
- gcc(1)
- gcc-ar(1)
- grep(1)
- install(1)
- libc
- ln(1)
- make(1) - GNU Make is required
- mkdir(1)
- pkgconf(1)
- rm(1)
- sed(1) - GNU sed is required
- sort(1)
- touch(1)
- xargs(1)
- For linting C source:
- checkpatch
- clang-tidy(1)
- cppcheck(1)
- cpplint(1)
- iwyu(1)
- Depends:
- libc
- pkgconf(1)
Lint
You can lint the source code. See 'make help' for a list of targets
that can be used.
Files
Makefile
Main makefile.
lib/build*.mk
Makefiles for building the library.
lib/install*.mk
Makefiles for installing the library.
lib/lint*.mk
Makefiles for linting the source code.
lib/*.mk
Other makefiles.
include/c/mem/*
Header files.
src/*
Source code.
share/pkgconfig/*.pc
pc(5) file.
/usr/local/include/c/mem/*.h
Installed header files.
/usr/local/lib/libc-mem.a
Static library file.
/usr/local/lib/libc-mem.so*
Shared library.
/usr/local/share/pkgconfig/libc-mem.pc
Installed pc(5) file.
Standards
This project tries to follow closely the GNU Coding Standards:
<https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>.
<https://www.gnu.org/prep/standards/html_node/Command-Variables.html>.
And the Filesystem Hierarchy Standard:
<https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html>
But deviate in some cases.
|