/
Makefile
52 lines (44 loc) · 1.74 KB
/
Makefile
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
###########################################################################
## ##
## OByteLib ##
## ##
## Benoit Vaugon ##
## ##
## This file is distributed under the terms of the CeCILL license. ##
## See file LICENSE-en. ##
## ##
###########################################################################
include etc/Makefile.conf
all: config
@make --no-print-directory -C src
config:
@if [ etc/Makefile.conf -ot VERSION -o \
etc/Makefile.conf -ot configure ]; then \
echo 'Configuration files are not up to date.' 1>&2; \
echo 'Please run `./configure` (with right options).' 1>&2; \
exit 1; \
fi
install: all
mkdir -p "$(LIBDIR)"
mkdir -p "$(MAN3DIR)"
cp META "$(LIBDIR)/"
cp lib/oByteLib.cmi "$(LIBDIR)/"
cp lib/oByteLib.cmx "$(LIBDIR)/"
cp lib/obytelib.cma "$(LIBDIR)/"
cp lib/obytelib.cmxa "$(LIBDIR)/"
cp lib/obytelib.a "$(LIBDIR)/"
cp man/OByteLib*.3o "$(MAN3DIR)/"
uninstall:
rm -f "$(LIBDIR)/META"
rm -f "$(LIBDIR)/oByteLib.cmi"
rm -f "$(LIBDIR)/oByteLib.cmx"
rm -f "$(LIBDIR)/obytelib.cma"
rm -f "$(LIBDIR)/obytelib.cmxa"
rm -f "$(LIBDIR)/obytelib.a"
rm -f "$(MAN3DIR)/OBytelib*.3o"
etc/Makefile.conf:
@echo "You must run ./configure before" 1>&2
@exit 1
clean:
@make --no-print-directory -C src clean
.PHONY: all config install uninstall clean