dwarf-synthesis/Makefile

54 lines
1.3 KiB
Makefile
Raw Normal View History

OCAMLBUILD=bapbuild -no-hygiene
2018-10-23 19:21:57 +02:00
BAPBUNDLE=bapbundle
ROOT_MODULE=dwarfsynth
2019-05-28 21:37:16 +02:00
TARBALL=dwarfsynth.tar.gz
2018-10-23 19:21:57 +02:00
2019-05-28 17:01:04 +02:00
LIBDWARFW_SO=libdwarfw/build/libdwarfw.so
LIBDWARFW_SO_MESON=libdwarfw/build/build.ninja
2018-10-23 19:21:57 +02:00
all: install ml_dwarf_write.bin
.PHONY: ml_dwarf_write.bin
2019-05-28 17:01:04 +02:00
ml_dwarf_write.bin: $(LIBDWARFW_SO)
$(MAKE) -C DwarfSynth/c_bindings
ln -fs DwarfSynth/c_bindings/ml_dwarf_write.bin .
2018-10-23 19:21:57 +02:00
2019-05-28 17:01:04 +02:00
.PHONY: $(LIBDWARFW_SO)
$(LIBDWARFW_SO):
cd libdwarfw && test -d build || meson build
ninja -C libdwarfw/build
2018-10-23 19:21:57 +02:00
.PHONY: $(ROOT_MODULE).plugin
$(ROOT_MODULE).plugin:
$(OCAMLBUILD) $(ROOT_MODULE).plugin
2019-05-28 21:37:16 +02:00
###############################################################################
2018-10-23 19:21:57 +02:00
.PHONY: install
install: $(ROOT_MODULE).plugin
$(BAPBUNDLE) install $<
2019-05-28 21:37:16 +02:00
###############################################################################
2018-10-23 19:21:57 +02:00
.PHONY: clean
clean:
rm -rf _build
2019-05-28 21:37:16 +02:00
###############################################################################
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 \
--transform='s#^#dwarfsynth/#g' \
DwarfSynth dwarfsynth.ml DwarfSynth.mlpack libdwarfw LICENSE Makefile \
README.md synthesize_dwarf.sh _tags