forked from chxdeng/mabain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (44 loc) · 1.32 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
53
54
55
#mabain Makefile
ifndef MABAIN_INSTALL_DIR
MABAIN_INSTALL_DIR=/usr/local
endif
build:
make -C src build
make -C binaries build
install: build
echo "mabain install directory: $(MABAIN_INSTALL_DIR)"
mkdir -p $(MABAIN_INSTALL_DIR)/include/mabain
cp src/db.h $(MABAIN_INSTALL_DIR)/include/mabain
cp src/mb_data.h $(MABAIN_INSTALL_DIR)/include/mabain
cp src/mabain_consts.h $(MABAIN_INSTALL_DIR)/include/mabain
cp src/lock.h $(MABAIN_INSTALL_DIR)/include/mabain
cp src/error.h $(MABAIN_INSTALL_DIR)/include/mabain
cp src/integer_4b_5b.h $(MABAIN_INSTALL_DIR)/include/mabain
mkdir -p $(MABAIN_INSTALL_DIR)/lib
cp src/libmabain.so $(MABAIN_INSTALL_DIR)/lib
mkdir -p $(MABAIN_INSTALL_DIR)/bin
cp binaries/mbc $(MABAIN_INSTALL_DIR)/bin
uninstall:
rm -rf $(MABAIN_INSTALL_DIR)/include/mabain
rm -f $(MABAIN_INSTALL_DIR)/lib/libmabain.so
rm -f $(MABAIN_INSTALL_DIR)/bin/mbc
clean:
-make -C src clean
-make -C binaries clean
-make -C examples clean
distclean: clean
-rm -rf doc/*
-rm -f tags
index:
-ctags -R *
-doxygen doxygen.conf
-echo "Generating documentation..."
-echo "Use following index file : "
-readlink -f doc/html/index.html
-echo "Done with doxygen"
unit-test: build
make -C src unit-test
.PHONY: docker
docker:
docker build --rm -t chxdeng/mabain:latest .
docker rmi $$(docker images -q -f dangling=true)