-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
59 lines (49 loc) · 1.51 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
56
57
58
59
OCAMLBUILD=bapbuild -no-hygiene
BAPBUNDLE=bapbundle
ROOT_MODULE=dwarfsynth
TARBALL=dwarfsynth.tar.gz
LIBDWARFW_SO=libdwarfw/build/libdwarfw.so
LIBDWARFW_SO_MESON=libdwarfw/build/build.ninja
all: install ml_dwarf_write.bin
.PHONY: ml_dwarf_write.bin
ml_dwarf_write.bin: $(LIBDWARFW_SO)
$(MAKE) -C DwarfSynth/c_bindings
ln -fs DwarfSynth/c_bindings/ml_dwarf_write.bin .
.PHONY: $(LIBDWARFW_SO)
$(LIBDWARFW_SO):
cd libdwarfw && test -d build || meson build
ninja -C libdwarfw/build
.PHONY: $(ROOT_MODULE).plugin
$(ROOT_MODULE).plugin:
$(OCAMLBUILD) $(ROOT_MODULE).plugin
###############################################################################
.PHONY: install
install: $(ROOT_MODULE).plugin
$(BAPBUNDLE) install $<
###############################################################################
.PHONY: clean
clean:
rm -rf _build
###############################################################################
tarball: $(TARBALL)
.PHONY: $(TARBALL)
$(TARBALL):
tar czf $(TARBALL) \
--exclude=.git \
--exclude=.gitignore \
--exclude=libdwarfw/build \
--exclude-backups \
--exclude=*.bck \
--exclude=*.bin \
--exclude=*.o \
--exclude=*.cmi \
--exclude=*.cmx \
--exclude=*.tar.gz \
--exclude=testsuite/sqlite3/sqlite \
--exclude=testsuite/gnupg/gnupg \
--exclude=testsuite/gnupg/gnupg \
--exclude=csmith/kept_tests \
--transform='s#^#dwarfsynth/#g' \
csmith DwarfSynth dwarfsynth.ml DwarfSynth.mlpack HEURISTICS.md \
libdwarfw LICENSE Makefile README.md synthesize_dwarf.sh _tags \
testsuite