Skip to content

Commit

Permalink
prebuilt binary for linux with the latest fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
o-oconnell committed Jan 4, 2023
1 parent 9110d5b commit f0fb0fb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
BIN := bin
LIB := lib

.PHONY: defs bindings all

current_dir_no_prefix:= $(notdir $(shell pwd))
current_dir:= $(shell pwd)
MP4GREP_LIBS:=${MP4GREP_INSTALL_PREFIX}/mp4grep-libs

# -ccopt is how you pass options to gcc from ocamlc
prebuilt-binary-gcc-options := -ccopt -I$(current_dir)/include -ccopt -L$(current_dir)/lib -cclib -lvosk -ccopt -Wl,-rpath=$(LIB)
installation-gcc-options := -ccopt -I$(current_dir)/include -ccopt -L$(current_dir)/lib -cclib -lvosk -ccopt -Wl,-rpath=$(MP4GREP_LIBS)

$(info mp4grep is being installed to MP4GREP_INSTALL_PREFIX=${MP4GREP_INSTALL_PREFIX})
$(info mp4grep libraries are being installed to ${MP4GREP_LIBS})


prebuilt-binary: defs bindings mp4grep.ml
ocamlc -custom -o $(BIN)/mp4grep unix.cma -I $(OPAM_SWITCH_PREFIX)/lib/parmap/ $(OPAM_SWITCH_PREFIX)/lib/parmap/parmap.cma str.cma defs.cmo mp4grep.ml vosk_bindings.o $(prebuilt-binary-gcc-options)

install: check-env copy-dynlibs copy-convertscript defs bindings mp4grep.ml
ocamlc -custom -o $(MP4GREP_INSTALL_PREFIX)/mp4grep unix.cma -I $(OPAM_SWITCH_PREFIX)/lib/parmap/ $(OPAM_SWITCH_PREFIX)/lib/parmap/parmap.cma str.cma defs.cmo mp4grep.ml vosk_bindings.o -ccopt -I$(current_dir)/include -ccopt -L$(current_dir)/lib -cclib -lvosk -ccopt -Wl,-rpath=$(MP4GREP_LIBS)
ocamlc -custom -o $(MP4GREP_INSTALL_PREFIX)/mp4grep unix.cma -I $(OPAM_SWITCH_PREFIX)/lib/parmap/ $(OPAM_SWITCH_PREFIX)/lib/parmap/parmap.cma str.cma defs.cmo mp4grep.ml vosk_bindings.o $(installation-gcc-options)

copy-dynlibs:
if [ -a $(MP4GREP_LIBS) ]; then rm -r $(MP4GREP_LIBS); fi;
Expand Down
Binary file modified bin/mp4grep
Binary file not shown.

0 comments on commit f0fb0fb

Please sign in to comment.